当前位置: 首页>>代码示例>>C#>>正文


C# QueryBuilder.AppendWhereString方法代码示例

本文整理汇总了C#中QueryBuilder.AppendWhereString方法的典型用法代码示例。如果您正苦于以下问题:C# QueryBuilder.AppendWhereString方法的具体用法?C# QueryBuilder.AppendWhereString怎么用?C# QueryBuilder.AppendWhereString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QueryBuilder的用法示例。


在下文中一共展示了QueryBuilder.AppendWhereString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMemosByMaintenanceID

 public MemoObjectCollection GetMemosByMaintenanceID(MaterialObject material)
 {
     MemoObjectCollection memos = new MemoObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(MemoObject.MAT_ID, material.MatID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
         builder.Append("AND " + MemoObject.MAT_ID + " is not null ");
         memos = MemoConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return memos;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:18,代码来源:MemoDataService.cs

示例2: GetByMaterialCateogry

 public RevisionObjectCollection GetByMaterialCateogry(MaterialCategoryObject materialCategory)
 {
     RevisionObjectCollection revisions = new RevisionObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(RevisionObject.MATCAT_ID, materialCategory.MatcatID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
         builder.Append("AND " + RevisionObject.MATCAT_ID + " is not null ");
         revisions = RevisionConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return revisions;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:18,代码来源:RevisionDataService.cs

示例3: GetByKeyName

        public ParameterSystemObject GetByKeyName(string keyName)
        {
            ParameterSystemObjectCollection parameters = new ParameterSystemObjectCollection();
            QueryBuilder builder;
            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(ParameterSystemObject.KEYNAME, keyName, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);
                builder.AppendOrderBy(ParameterSystemObject.KEYNAME, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
                parameters = ParameterSystemConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);

                if (parameters.Count > 0)
                    return parameters[0];
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return null;
        }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:21,代码来源:ParameterSystemDataService.cs

示例4: GetUnknownByEmail

        public UnknownObject GetUnknownByEmail(string email)
        {
            UnknownObject unknown = new UnknownObject();
            QueryBuilder builder;
            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(UnknownObject.EMAIL, email, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);

                DataSet result = this.ExecuteDataSet(builder.Query, false);
                if (result.Tables[0].Rows.Count > 0)
                    unknown = UnknownConvertor.UnknownRowToObject(result.Tables[0].Rows[0]);
                else
                    return null;

            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return unknown;
        }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:23,代码来源:UnknownDataService.cs

示例5: GetSubTypeByType

 public MaterialSubTypeObjectCollection GetSubTypeByType(MaterialTypeObject type)
 {
     MaterialSubTypeObjectCollection materialSubTypes = new MaterialSubTypeObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(MaterialSubTypeObject.MATTYP_ID, type.MatTypID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
         builder.Append("AND " + MaterialSubTypeObject.MATTYP_ID + " is not null ");
         builder.AppendOrderBy(MaterialSubTypeObject.SUBTYPE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
         materialSubTypes = MaterialSubTypeConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return materialSubTypes;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:19,代码来源:MaterialSubTypeDataService.cs

示例6: GetForbiddenFuelNotSendMail

        public FuelObjectCollection GetForbiddenFuelNotSendMail(string supplier, int transc_NawID, DateTime dateFrom, DateTime dateTo)
        {
            FuelObjectCollection fuels;
            QueryBuilder builder;
            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString("1", "1", QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                if (supplier != "" & supplier != null)
                    builder.AppendWhereString(FuelObject.SUPPLIER, supplier, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.MIDDLE);
                if (transc_NawID != -1)
                    builder.AppendWhereInteger(FuelObject.TRANSC_NAWID, transc_NawID, QueryBuilder.ParameterLocation.MIDDLE);
                if (dateFrom != DateTime.MinValue)
                    builder.AppendWhereString(FuelObject.DATE, dateFrom.Year + "-" + dateFrom.Month + "-" + dateFrom.Day, QueryBuilder.ComparisonOperators.GreaterAndEqual, QueryBuilder.ParameterLocation.MIDDLE);
                if (dateTo != DateTime.MaxValue)
                    builder.AppendWhereString(FuelObject.DATE, dateTo.Year + "-" + dateTo.Month + "-" + dateTo.Day, QueryBuilder.ComparisonOperators.SmallerAndEqual, QueryBuilder.ParameterLocation.MIDDLE);

                builder.Append(" AND " + FuelObject.DATEMAIL_FORBIDDENFUELING + " IS NULL ");

                builder.AppendOrderBy(FuelObject.DATE, QueryBuilder.OrderByType.DESC, QueryBuilder.ParameterLocation.FIRST_LAST);
                return fuels = FuelConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);

            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return fuels;
        }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:30,代码来源:FuelDataService.cs

示例7: GetFilter

        public FuelObjectCollection GetFilter(string supplier, int fuelType,
                                               string employee, string vehicle, DateTime dateFrom, DateTime dateTo,
                                                        Boolean privateFuel)
        {
            FuelObjectCollection fuels;
            QueryBuilder builder;
            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString("1", "1", QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                if (supplier != "" & supplier != null)
                    builder.AppendWhereString(FuelObject.SUPPLIER, supplier, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.MIDDLE);
                if (fuelType != -1)
                    builder.AppendWhereInteger(FuelObject.FUELTYPE, Convert.ToInt16(fuelType), QueryBuilder.ParameterLocation.MIDDLE);
                if (employee != "" & employee != null)
                    builder.AppendWhereString(FuelObject.EMPLOYEE, employee, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.MIDDLE);
                if (vehicle != "" & vehicle != null)
                    builder.AppendWhereString(FuelObject.VEHICLE_LICENSEPLATE, vehicle, QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.MIDDLE);
                if (dateFrom != DateTime.MinValue)
                    builder.AppendWhereString(FuelObject.DATE, dateFrom.Year + "-" + dateFrom.Month + "-" + dateFrom.Day, QueryBuilder.ComparisonOperators.GreaterAndEqual, QueryBuilder.ParameterLocation.MIDDLE);
                if (dateTo != DateTime.MaxValue)
                    builder.AppendWhereString(FuelObject.DATE, dateTo.Year + "-" + dateTo.Month + "-" + dateTo.Day, QueryBuilder.ComparisonOperators.SmallerAndEqual, QueryBuilder.ParameterLocation.MIDDLE);

                builder.AppendWhereBoolean(FuelObject.PRIVATE_TANKING, privateFuel, QueryBuilder.ParameterLocation.LAST);
                builder.AppendOrderBy(FuelObject.DATE, QueryBuilder.OrderByType.DESC, QueryBuilder.ParameterLocation.FIRST_LAST);
                return fuels = FuelConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);

            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return fuels;
        }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:35,代码来源:FuelDataService.cs

示例8: GetByTaskID

 public TaskScheduleObjectCollection GetByTaskID(Guid taskID)
 {
     TaskScheduleObjectCollection taskSchedules = new TaskScheduleObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(TaskScheduleObject.TASK_ID, taskID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);
         taskSchedules = TaskScheduleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return taskSchedules;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:17,代码来源:TaskScheduleDataService.cs

示例9: GetByVehicleID

 public MaintenanceVehicleObjectCollection GetByVehicleID(VehicleObject vehicle)
 {
     MaintenanceVehicleObjectCollection maintenanceVehicles = new MaintenanceVehicleObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(MaintenanceVehicleObject.VEH_ID, vehicle.VehID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
         builder.Append("AND " + MaintenanceVehicleObject.VEH_ID + " is not null ");
         maintenanceVehicles = MaintenanceVehicleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return maintenanceVehicles;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:18,代码来源:MaintenanceVehicleDataService.cs

示例10: GetAllActiveByEmployee

 public PopupObjectCollection GetAllActiveByEmployee(UserObject user)
 {
     PopupObjectCollection popups = new PopupObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(PopupUserObject.USER_ID, user.UsrID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
         builder.Append("AND " + PopupUserObject.USER_ID + " is not null ");
         builder.Append("AND " + PopupUserObject.POPUP_ID + " is not null ");
         builder.AppendWhereBoolean(PopupObject.ACTIVE, true, QueryBuilder.ParameterLocation.LAST);
         popups = PopupConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return popups;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:20,代码来源:PopupUserDataService.cs

示例11: GetFilter

 public TaskObjectCollection GetFilter(string dateFrom, string dateTo, string description)
 {
     TaskObjectCollection tasks = new TaskObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         if (dateFrom != null)
             builder.AppendWhereString(TaskObject.CREATION_DATE, dateFrom, QueryBuilder.ComparisonOperators.GreaterAndEqual, QueryBuilder.ParameterLocation.FIRST);
         if (dateTo != null)
             builder.AppendWhereString(TaskObject.CREATION_DATE, dateTo,QueryBuilder.ComparisonOperators.SmallerAndEqual, QueryBuilder.ParameterLocation.MIDDLE);
         if (description != "")
             builder.AppendWhereString(TaskObject.DESCRIPTION, description, QueryBuilder.ComparisonOperators.Like, QueryBuilder.ParameterLocation.LAST);
         builder.AppendOrderBy(TaskObject.CREATION_DATE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
         tasks = TaskConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return tasks;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:23,代码来源:TaskDataService.cs

示例12: GetUserByLogin

 public UserObject GetUserByLogin(string login)
 {
     UserObject user = new UserObject();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendWhereString(UserObject.LOGIN, DBFunctions.FixStringValue(login), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);
         user = UserConvertor.UserRowToObject(DBFunctions.FillDataRow(builder.Query
                          , true, "Generic", 30));
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return user;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:19,代码来源:UserDataService.cs

示例13: GetDescription

 public string GetDescription(Guid id)
 {
     string description = "";
     QueryBuilder builder;
     DataSet ds;
     try
     {
         builder = new QueryBuilder();
         builder.Select();
         builder.AppendColumn(TaskObject.DESCRIPTION);
         builder.AppendFromTable(TaskObject.TABLE);
         builder.AppendWhereString(TaskObject.TASK_ID, id.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST_LAST);
         ds = this.ExecuteDataSet(builder.Query, false);
         if (ds.Tables[0].Rows.Count > 0)
             description = ds.Tables[0].Rows[0][TaskObject.DESCRIPTION].ToString();
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return description;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:22,代码来源:TaskDataService.cs

示例14: GetFilter

 public CustomerObjectCollection GetFilter(string name, string vat)
 {
     CustomerObjectCollection customers = new CustomerObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         if (name != "")
             builder.AppendWhereString(CustomerObject.NAME, name, QueryBuilder.ComparisonOperators.Like, QueryBuilder.ParameterLocation.FIRST);
         if (vat != "")
             builder.AppendWhereString(CustomerObject.VAT, vat, QueryBuilder.ComparisonOperators.Like, QueryBuilder.ParameterLocation.LAST);
         builder.AppendOrderBy(CustomerObject.NAME, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
         customers = CustomerConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return customers;
 }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:21,代码来源:CustomerDataService.cs

示例15: GetFilter

        public FuelDeliveryObjectCollection GetFilter(DateTime dateFromDelivery, DateTime dateToDelivery)
        {
            FuelDeliveryObjectCollection fuelDeliveries;
            QueryBuilder builder;
            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString("1", "1", QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                if (dateFromDelivery != DateTime.MinValue)
                    builder.AppendWhereString(FuelDeliveryObject.DATE_INVOICE, PROF_IT.Common.Convert.DateFunctions.DateToStrDate(dateFromDelivery), QueryBuilder.ComparisonOperators.GreaterAndEqual, QueryBuilder.ParameterLocation.MIDDLE);
                if (dateToDelivery != DateTime.MaxValue)
                    builder.AppendWhereString(FuelDeliveryObject.DATE_INVOICE, PROF_IT.Common.Convert.DateFunctions.DateToStrDate(dateToDelivery), QueryBuilder.ComparisonOperators.SmallerAndEqual, QueryBuilder.ParameterLocation.MIDDLE);

                builder.AppendOrderBy(FuelDeliveryObject.DATE_INVOICE, QueryBuilder.OrderByType.DESC, QueryBuilder.ParameterLocation.FIRST_LAST);
                return fuelDeliveries = FuelDeliveryConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);

            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return fuelDeliveries;
        }
开发者ID:GianiWVL,项目名称:VUYLSTEKE,代码行数:24,代码来源:FuelDeliveryDataService.cs


注:本文中的QueryBuilder.AppendWhereString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。