private void barbtnfilter_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { DataTable dt = new DataTable(); m_Filter = ""; frmFilter fFilter = new frmFilter(); if (m_dtFil.Rows.Count > 0) { fFilter.Exe(m_dtFil, fromDate, toDate); } m_Filter = fFilter.Execute(fromDate, toDate); if (m_Filter != "") { m_dtFil = fFilter.m_dtFilter; dt = CommFun.FillRecord(m_Filter); GrdLeadRegister.DataSource = dt; PopulateGrid(); } else { m_dtFil.Clear(); } grdLeadRegView.FocusedRowHandle = i; }
private void btnFilter_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Lead-Filter") == false) { MessageBox.Show("You don't have Rights to Lead-Filter"); return; } DataTable dt = new DataTable(); m_Filter = ""; frmFilter fFilter = new frmFilter(); if (m_dtFil.Rows.Count > 0) { fFilter.Exe(m_dtFil, fromDate, toDate); } m_Filter = fFilter.Execute(fromDate, toDate); if (m_Filter != "") { m_dtFil = fFilter.m_dtFilter; dt = CommFun.FillRecord(m_Filter); DGvTrans.DataSource = dt; DGvTrans.ForceInitialize(); DGvTransView.PopulateColumns(); DGvTransView.Columns["LeadId"].Visible = false; DGvTransView.Columns["CostCentreId"].Visible = false; panelLeadEntry.Controls.Clear(); frmLeadInfo LeadInfo = new frmLeadInfo() { TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill }; panelLeadEntry.Controls.Add(LeadInfo); LeadInfo.Execute("E", Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId")), Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("CostCentreId")), "LeadReg"); } else { m_dtFil.Clear(); //FillEnquiry(); } DGvTransView.FocusedRowHandle = i; }