本文整理汇总了C#中QueryBuilder.addBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# QueryBuilder.addBoolean方法的具体用法?C# QueryBuilder.addBoolean怎么用?C# QueryBuilder.addBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryBuilder
的用法示例。
在下文中一共展示了QueryBuilder.addBoolean方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: InitCtrl
public void InitCtrl(PLDMGrid Input, bool ReadOnly, bool? IsAdd)
{
QueryBuilder query = new QueryBuilder(string.Format("SELECT * FROM {0} WHERE 1=1", TABLE_MAP));
if (IsAdd != null)
{
query.addBoolean("VISIBLE_BIT", true);
}
Input._init((ReadOnly == true ? GroupElementType.ONLY_CHOICE : GroupElementType.CHOICE_N_ADD), HelpDB.getDatabase().LoadDataSet(query, TABLE_MAP).Tables[0], "ID", "NAME",
new string[] { "ID" }, new string[] { "ID" }, HelpDanhMuc.CreateDM_BASIC_V, HelpDanhMuc.GetRuleDM_BASIC, null, null, null, null);
if (ReadOnly)
{
try
{
Input.GetDMGrid.btnUpdate.Visible = false;
Input.GetDMGrid.btnDel.Visible = false;
}
catch (Exception ex)
{
PLException.AddException(ex);
}
}
}
示例4: InitCtrlDuyet
public static void InitCtrlDuyet(PLDMGrid Input, bool ReadOnly, bool? IsAdd, string FeatureName)
{
QueryBuilder query = new QueryBuilder(@"
SELECT e.ID,e.NAME,e.DEPARTMENT_ID FROM USER_FEATURE_REL rel, USER_CAT u, DM_NHAN_VIEN e ,FEATURE_CAT fcat
WHERE e.ID = u.EMPLOYEE_ID AND rel.USERID=u.USERID AND fcat.ID=rel.FEATUREID AND 1=1");
query.add("fcat.NAME", Operator.Equal, FeatureName, DbType.String);
query.addBoolean("rel.ISREAD_BIT", true);
if (IsAdd != null)
{
query.addBoolean("e.VISIBLE_BIT", true);
}
Input._init((ReadOnly == true ? GroupElementType.ONLY_CHOICE : GroupElementType.CHOICE_N_ADD), HelpDB.getDatabase().LoadDataSet(query, "DM_NHAN_VIEN").Tables[0], "ID", "NAME",
new string[] { "ID" }, new string[] { "ID" }, DMNhanVienX.I.CreatePLDMGroupElementNhan_vien, DMNhanVienX.I.GetRuleDM_NHAN_VIEN, null, null, null, null);
if (ReadOnly)
{
try
{
((System.Windows.Forms.ToolStrip)Input.Controls[0].Controls[0].Controls[1]).Items[4].Visible = true;// Ẩn nút sửa
((System.Windows.Forms.ToolStrip)Input.Controls[0].Controls[0].Controls[1]).Items[5].Visible = true;// Ẩn nút Xóa
}
catch (Exception ex)
{
PLException.AddException(ex);
}
}
}
示例5: dsGetQuyen
public static DataSet dsGetQuyen(long keyFeature)
{
QueryBuilder query = new QueryBuilder(@"
SELECT e.ID FROM USER_FEATURE_REL rel, USER_CAT u, DM_NHAN_VIEN e ,FEATURE_CAT fcat
WHERE e.ID = u.EMPLOYEE_ID AND rel.USERID=u.USERID AND fcat.ID=rel.FEATUREID AND 1=1");
query.addID("fcat.ID", keyFeature);
query.addBoolean("rel.ISREAD_BIT", true);
return HelpDB.getDatabase().LoadDataSet(query);
}
示例6: frmTinTuc_Load
private void frmTinTuc_Load(object sender, EventArgs e)
{
try
{
HelpXtraForm.SetFix(this);
QueryBuilder query = new QueryBuilder(@"SELECT * FROM DM_NHAN_VIEN WHERE 1=1");
query.addBoolean("VISIBLE_BIT", true);
DataSet Employs = HelpDB.getDatabase().LoadDataSet(query);
List<long> IDs = new List<long>();
foreach (DataRow row in Employs.Tables[0].Rows)
{
IDs.Add(HelpNumber.ParseInt64(row["ID"]));
}
GUIValidation.SetMaxLength(new object[] {
txtTieude,200
});
PMSupport.SetTitle(this, Status);
if (IsAdd == true)
{
PLTinTuc.ChonNhomTin(PLNhomTT, IsAdd);
this.chkHieuLuc.Checked = true;
}
if (this.btnSave.Visible == true) {
//if (DATinTuc.Instance.getNguoiDuyet(143).Contains(FrameworkParams.currentUser.employee_id))
// this.Duyet.Enabled = true;
}
//HelpXtraForm.SetFix(this);
}
catch (Exception ex)
{
PLException.AddException(ex);
}
}
示例7: PLBuildQueryFilter
public override QueryBuilder PLBuildQueryFilter()
{
QueryBuilder query = new QueryBuilder(@"SELECT * FROM DM_NHAN_VIEN WHERE 1=1");
query.addBoolean("VISIBLE_BIT", true);
return query;
}
示例8: frmTinTuc_Load
private void frmTinTuc_Load(object sender, EventArgs e)
{
try
{
QueryBuilder query = new QueryBuilder(@"SELECT * FROM DM_NHAN_VIEN WHERE 1=1");
query.addBoolean("VISIBLE_BIT", true);
DataSet Employs = DABase.getDatabase().LoadDataSet(query);
List<long> IDs = new List<long>();
foreach (DataRow row in Employs.Tables[0].Rows)
{
IDs.Add(HelpNumber.ParseInt64(row["ID"]));
}
GUIValidation.SetMaxLength(new object[] {
txtTieude,200
});
PMSupport.SetTitle(this, Status);
if (IsAdd == true)
{
PLTinTuc.ChonNhomTin(PLNhomTT, IsAdd);
}
if (do_luu_tru_tt.TEN_FILE != null && do_luu_tru_tt.TEN_FILE!=string.Empty)
{
checkXoa_TT_DK.Visible = IsAdd == false ? true : false;
HelpControl.RedCheckEdit(checkXoa_TT_DK);
}
if (this.btnSave.Visible == true) {
if (DATinTuc.Instance.getNguoiDuyet(143).Contains(FrameworkParams.currentUser.employee_id))
this.Duyet.Enabled = true;
}
}
catch (Exception ex)
{
PLException.AddException(ex);
}
}
示例9: PLBuildQueryFilter
/// <summary>Step 5: Xây dựng Query Buider cho việc tìm kiếm
/// Xây dựng một QueryBuilder từ những chọn lựa trong phần filter.
/// Từ QueryBuilder này ta có thể lấy được dữ liệu thỏa điều kiện.
/// Nếu hỗ trợ duyệt thì trong câu truy vấn trả về
/// phải có cột là DUYET_BIT
/// </summary>
public override QueryBuilder PLBuildQueryFilter()
{
QueryBuilder query = null;
query = new QueryBuilder(
"SELECT * " +
"FROM PHIEU_THU_CHI " +
"WHERE 1=1"
);
query.addDateFromTo(PhieuThuChiExtFields.NGAY_PHAT_SINH, this.dateFrom.DateTime, this.dateTo.DateTime);
query.addSoPhieu(PhieuThuChiExtFields.CODE, this.txtCode.Text.Trim());
query.addID(PhieuThuChiExtFields.EMP_ID, this.cmbEmp._getSelectedID());
if (this.chkThu.Checked != this.chkChi.Checked)
{
if(this.chkThu.Checked)
query.addBoolean(PhieuThuChiExtFields.THU_CHI_BIT, true);
else
query.addBoolean(PhieuThuChiExtFields.THU_CHI_BIT, false);
}
query.addCondition("(1=1)");
return query;
}
示例10: GetListMail
private DataSet GetListMail()
{
QueryBuilder query = new QueryBuilder(@"SELECT e.NAME, cat.USERID as ID, cat.USERNAME 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(@"(cat.USERNAME<>'')");
DataSet dsTo = HelpDB.getDatabase().LoadDataSet(query);
return dsTo;
}
示例11: InitData
private void InitData()
{
DMNhanVienX.I.InitCtrl(cmbNguoiDuyet, false);
if (Phieu.NGUOI_DUYET != 0)
this.cmbNguoiDuyet._setSelectedID(Phieu.NGUOI_DUYET);
QueryBuilder query = new QueryBuilder(@"SELECT * FROM DM_NHAN_VIEN WHERE 1=1");
query.addBoolean("VISIBLE_BIT", true);
DataSet dsSource = DABase.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]);
if (this.IsAdd == true) checkSendMail.Checked = true;
else checkSendMail.Checked = false;
}
示例12: GetAddressList
private AddressList GetAddressList(long []Keys )
{
QueryBuilder query = new QueryBuilder(@"SELECT e.NAME, cat.USERID as ID, cat.USERNAME 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.addID("cat.USERID", Keys);
DataSet dsTo = HelpDB.getDatabase().LoadDataSet(query, "CAT");
AddressList to = new AddressList();
foreach (DataRow row in dsTo.Tables[0].Rows)
{
to.Add(new MailboxAddress(row["NAME"].ToString(), row["USERNAME"].ToString() + "@" + this.textSmartHost.Text));
}
return to;
}
示例13: PLBuildQueryFilter
public override QueryBuilder PLBuildQueryFilter()
{
FWWaitingMsg msg = new FWWaitingMsg();
QueryBuilder filter = new QueryBuilder(UpdateRow());
filter.addID("NLV.NV_ID", NhanVien._getSelectedID());
filter.addCondition("NLV.LOAI=" + (Int32)TimeInOutType.NghiPhep);
if (ngayLamViec.Types != SelectionTypes.None)
filter.addDateFromTo("NLV.NGAY_LAM_VIEC", ngayLamViec.FromDate, ngayLamViec.ToDate);
filter.setDescOrderBy("NLV.NGAY_LAM_VIEC");
filter.setAscOrderBy("NAME");
filter.addDuyet(PLConst.FIELD_DUYET, DuyetSelect.layTrangThai());
StringBuilder str = new StringBuilder();
if (chkNghi_KLuong.Checked && checkNghi_Nam.Checked)
filter.addCondition("NGHI_KHONG_LUONG = 'Y' OR NGHI_PHEP_NAM ='Y'");
else
{
if (chkNghi_KLuong.Checked) filter.addBoolean("NGHI_KHONG_LUONG", true);
if (checkNghi_Nam.Checked) filter.addBoolean("NGHI_PHEP_NAM", true);
}
DataSet ds = HelpDB.getDatabase().LoadDataSet(filter);
//ds.Tables[0].Columns.Add("IS_NGHI_BUOI_SANG",typeof(Int32));
if (ds == null || ds.Tables[0].Rows.Count == 0) barButtonItemDuyet.Enabled = barButtonItemK_Duyet.Enabled = false;
else
{
barButtonItemDuyet.Enabled = barButtonItemK_Duyet.Enabled = true;
}
msg.Finish();
return filter;
}