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


C# QueryBuilder.addCondition方法代码示例

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


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

示例1: PLBuildQueryFilter

        public override QueryBuilder PLBuildQueryFilter()
        {
            QueryBuilder filter = new QueryBuilder(BIEN_MUC.FILTER_STRING);
            filter.addSoPhieu(BIEN_MUC.MA_BANG, MaBang.Text);
            filter.addLike("LOWER(" + BIEN_MUC.NOI_DUNG + ")", NoiDung.Text.ToLower());
            AppCtrl.addID(filter, BIEN_MUC.SO_DKCB_HD, SoDKHDCB);
            AppCtrl.addID(filter, BIEN_MUC.TIET_MUC, TietMuc);
            AppCtrl.addID(filter, BIEN_MUC.LOAI_LUU_TRU, LoaiBang);
            AppCtrl.addID(filter, BIEN_MUC.DON_VI_CUNG_CAP, DonViCungCap);
            AppCtrl.addID(filter, BIEN_MUC.DON_VI_SO_HUU, DonViSoHuu);
            filter.addIn(BIEN_MUC.POST_MASTER, AppCtrl.GetCheckedValues(TinhTrang, true));
            filter.addIn(BIEN_MUC.IS_THANH_LY, AppCtrl.GetCheckedValues(ThanhLy, true));
            AppCtrl.addFilterFromTo(filter, BIEN_MUC.NGAY_NHAP, ngayNhap);
            AppCtrl.addFilterFromTo(filter, BIEN_MUC.NAM_SAN_XUAT, NamSXTu.Value, NamSXDen.Value);
            long[] IDs = QuocGia._getSelectedIDs();
            if (IDs.Length > 0 && IDs.Length < QuocGia.Properties.GetItems().Count)
            {
                string cond = "(";
                foreach (long id in IDs)
                {
                    cond += BIEN_MUC.NUOC_SAN_XUAT + " like '%," + id + ",%' or ";
                }
                cond = cond.TrimEnd(' ', 'r', 'o');
                cond = cond += ")";
                filter.addCondition(cond);
            }
            filter.addCondition("1=1");
            filter.setDescOrderBy(BIEN_MUC.NGAY_CAP_NHAT);

            return filter;
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:31,代码来源:frmBienMucTimPopupBanded.cs

示例2: LoadSchema

 public static DataTable LoadSchema()
 {
     QueryBuilder query = new QueryBuilder(
         "select * from fw_tham_so_ung_dung where 1=1");
     query.addCondition("1=-1");
     return DABase.getDatabase().LoadReadOnlyDataSet(query).Tables[0];
 }
开发者ID:khanhdtn,项目名称:my-fw-win,代码行数:7,代码来源:frmAppParamsHelp.cs

示例3: InitChonChuyenMuc

 public static void InitChonChuyenMuc(PLCombobox PLChuyenMuc, long ID_Dien_Dan)
 {
     QueryBuilder query = null;
     query = new QueryBuilder("SELECT * FROM CHUYEN_MUC where 1=1");
     query.addCondition("VISIBLE_BIT='Y'");
     query.addID("ID_NHOM_DIEN_DAN", ID_Dien_Dan);
     DataSet ds = DienDanPermission.I._LoadDataSetWithResPermission(query, "ID");
     PLChuyenMuc._init(ds.Tables[0], "NAME", "ID");
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:9,代码来源:PLDienDan.cs

示例4: ChonNhomTin

 public static void ChonNhomTin(PLImgCombobox Input, bool? IsAdd)
 {
     DataSet dsNTT;
     //true:add, false:edit, null:xem
     QueryBuilder query = new QueryBuilder("select ID,NAME from DM_NHOM_TIN_TUC WHERE 1=1");
     if (IsAdd == true)
         query.addCondition("VISIBLE_BIT='Y'");
     query.setAscOrderBy("NAME");
     dsNTT = TinTucPermission.I._LoadDataSetWithResGroupPermission(query, "ID");
     Input._init(dsNTT.Tables[0], "NAME", "ID");
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:11,代码来源:PLTinTuc.cs

示例5: PLBuildQueryFilter

        public override QueryBuilder PLBuildQueryFilter()
        {
            QueryBuilder filter = null;
            string sql = UpdateRow();
            filter = new QueryBuilder(sql);

            filter.addCondition("1=1");
            if (this.ASCSortClause != "")
                filter.setAscOrderBy(ASCSortClause);
            if (this.DESCSortClause != "")
                filter.setDescOrderBy(DESCSortClause);
            return filter;
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:13,代码来源:frmBienMucTimPopupBandedBudget.cs

示例6: InitCot

        public static RepositoryItemLookUpEdit InitCot(GridColumn column, string fieldName, bool? IsAdd)
        {
            string sql = string.Format(@"SELECT *
                           From {0}
                           where 1=1", TABLE_MAP);

            QueryBuilder query = new QueryBuilder(sql);
            if (IsAdd == true)
                query.addCondition("VISIBLE_BIT='Y'");
            query.setAscOrderBy("lower(NAME)");
            DataSet ds = HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP);
            return HelpGridColumn.CotCombobox(column, ds, "ID", "NAME", fieldName);
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:13,代码来源:DMDaiTruyenHinh.cs

示例7: GetDataSet

        public static DataSet GetDataSet(bool? IsAdd)
        {
            string sql = string.Format(@"SELECT *
                           From {0}
                           where 1=1", TABLE_MAP);

            QueryBuilder query = new QueryBuilder(sql);
            if (IsAdd == true)
                query.addCondition("VISIBLE_BIT='Y'");
            query.setAscOrderBy("lower(NAME)");
            DataSet ds = HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP);
            return ds;
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:13,代码来源:DMLoaiBang.cs

示例8: GetUsingLoaiGhiChu

 public static DataTable GetUsingLoaiGhiChu()
 {
     string sql = string.Format(@"SELECT NAME,ID
     From  {0}
     where exists(select first 1 1 from chuong_trinh_ghi_chu where loai_ghi_chu=id) and 1=1", TABLE_MAP);
     var query = new QueryBuilder(sql);
         query.addCondition("VISIBLE_BIT='Y'");
     query.setAscOrderBy("ID");
     DataSet ds = HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP);
     if (ds != null && ds.Tables.Count > 0)
         return ds.Tables[0];
     return null;
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:13,代码来源:DMLoaiGhiChu.cs

示例9: getStatusChot

 public bool getStatusChot(string BangLuong)
 {
     QueryBuilder query = new QueryBuilder("select is_chot from bang_luong where 1=1");
     query.addCondition("thang_nam='" + BangLuong + "'");
     DatabaseFB fb = HelpDB.getDatabase();
     DataSet ds = new DataSet();
     fb.LoadDataSet(ds,query, "BANG_LUONG");
     if (ds.Tables[0].Rows.Count > 0)
     {
         if (ds.Tables[0].Rows[0]["IS_CHOT"].ToString() == "Y")
             return true;
     }
     return false;
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:14,代码来源:DALuong.cs

示例10: InitCtrl

        public static void InitCtrl(PLCombobox Input, bool? IsAdd)
        {
            string sql = string.Format(@"SELECT *
                           From {0}
                           where 1=1", TABLE_MAP);

            QueryBuilder query = new QueryBuilder(sql);
            if (IsAdd == true)
                query.addCondition("VISIBLE_BIT='Y'");
            query.setAscOrderBy("lower(NAME)");
            DataSet ds = HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP);
            Input.DataSource = ds.Tables[0];
            Input.DisplayField = "NAME";
            Input.ValueField = "ID";
            Input._init();
        }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:16,代码来源:DMDoiTuongKG.cs

示例11: GetUsingDTH

 public static DataTable GetUsingDTH(bool? isAdd)
 {
     string sql = string.Format(@"SELECT NAME,id
     From  {0}
     where (exists(select first 1 1 from chuong_trinh_npdt  where dai_truyen_hinh=id)
     or  exists(select first 1 1 from chuong_trinh_psk  where dai_truyen_hinh=id)) and
     1=1", TABLE_MAP);
     var query = new QueryBuilder(sql);
     if (isAdd == true)
         query.addCondition("VISIBLE_BIT='Y'");
     query.setAscOrderBy("ID");
     DataSet ds = HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP);
     if (ds != null && ds.Tables.Count > 0)
         return ds.Tables[0];
     return null;
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:16,代码来源:DMDaiTruyenHinh.cs

示例12: CreateDataset

 public void CreateDataset(long perForCurrentFormID, params long[] idNguoiNhan)
 {
     InitColumn(false);
     QueryBuilder query = new QueryBuilder(@"SELECT * FROM DM_NHAN_VIEN WHERE 1=1");
     query.addCondition("(DEPARTMENT_ID IS NOT NULL )");
     query.addBoolean("VISIBLE_BIT", true);
     dsSource = HelpDB.getDatabase().LoadDataSet(query);
     dsSource.Tables[0].Columns.Add("CHON", typeof(System.String));
     foreach (DataRow row in dsSource.Tables[0].Rows)
     {
         row["CHON"] = "N";
     }
     this.gridControlNguoiTheoDoi.DataSource = _SetDefault(dsSource.Tables[0], perForCurrentFormID, idNguoiNhan);
     HelpGridExt1.DisableCaptionGroupCol(this.gridViewNguoiTheoDoi);
     this.gridViewNguoiTheoDoi.BestFitColumns();
     this.gridViewNguoiTheoDoi.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
 }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:17,代码来源:GuiMail.cs

示例13: GetAddressList

        public static AddressList GetAddressList(long[] Keys)
        {
            QueryBuilder query = new QueryBuilder(@"SELECT e.ID, e.NAME, cat.USERID as ID, cat.USERNAME, e.EMAIL FROM USER_CAT cat left join DM_NHAN_VIEN e on e.ID=cat.EMPLOYEE_ID WHERE 1=1");
            query.addBoolean("e.VISIBLE_BIT", true);
            query.addCondition("(EMAIL<>'')");
            if (Keys.Length > 0)
                query.addID("e.ID", Keys);
            DataSet dsTo = HelpDB.getDatabase().LoadDataSet(query, "CAT");

            AddressList to = new AddressList();
            foreach (DataRow row in dsTo.Tables[0].Rows)
            {
                if (!to.ToAddressListString().Contains(row["EMAIL"].ToString()))
                    to.Add(new MailboxAddress(row["NAME"].ToString(), row["EMAIL"].ToString()));
            }

            return to;
        }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:18,代码来源:HelpZPLOMail.cs

示例14: InitCtrl

 public static void InitCtrl(PLCombobox Input, bool? IsAdd)
 {
     string sql = string.Format(@"SELECT *
                    From {0}
                    where 1=1", TABLE_MAP);
     QueryBuilder query = new QueryBuilder(sql);
     if (IsAdd == true)
     {
         query.addID("CONG_TY",  FrameworkParams.LoginCompanyID);
         query.addCondition("VISIBLE_BIT='Y'");
     }
     query.setAscOrderBy("lower(NAME)");
     DataSet ds = HelpDB.getDatabase().LoadDataSet(query,TABLE_MAP);
     Input.MainCtrl.Properties.SortColumnIndex = -1;
     Input.DataSource = AppUtil.SortLogicalTable(ds.Tables[0], "NAME");
     Input.DisplayField = "NAME";
     Input.ValueField = "ID";
     Input._init();
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:19,代码来源:DMHardDisks.cs

示例15: btnView_Click

 private void btnView_Click(object sender, EventArgs e)
 {
     var sql =string.Format(@"SELECT PGS_ID,NAME,
         TU_NGAY, DEN_NGAY, MA_PGS,IS_DELETE,FILE_NAME, NGUOI_TAO,
         NGAY_TAO, NGUOI_CAP_NHAT, NGAY_CAP_NHAT,CONG_TY,
         PHONG_BAN,GHI_CHU,NULL CONTENT_FILE,'' PATH_FILE
         FROM TNS_PROGRAMS_GRID_SCR pgs
         WHERE (is_delete='N' or is_delete is null) and 1=1");
     var query = new QueryBuilder(sql);
     query.addLike("LOWER(" + TNS_PROGRAMS_GRID_SCR.NAME + ")", TenNguon.Text.ToLower());
     query.addLike("LOWER(" + TNS_PROGRAMS_GRID_SCR.FILE_NAME + ")", TenFile.Text.ToLower());
     AppCtrl.addID(query, TNS_PROGRAMS_GRID_SCR.NGUOI_TAO, NguoiLap);
     AppCtrl.addFilterFromTo(query, TNS_PROGRAMS_GRID_SCR.NGAY_TAO, NgayLap);
     query.addDateFromTo(TNS_PROGRAMS_GRID_SCR.TU_NGAY, StartDateFrom.DateTime, StartDateTo.DateTime);
     query.addDateFromTo(TNS_PROGRAMS_GRID_SCR.DEN_NGAY, EndDateFrom.DateTime, EndDateTo.DateTime);
     query.addCondition("1=1");
     query.setDescOrderBy("NGAY_TAO");
     var ds = HelpDB.getDBService().LoadDataSet(query);
     if(ds!=null&&ds.Tables.Count>0)
     {
         gridControlDetail.DataSource = ds.Tables[0];
     }
 }
开发者ID:khanhdtn,项目名称:did-vlib-2011,代码行数:23,代码来源:frmTNSProgramGrid.cs


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