示例#1
0
        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;
        }
示例#2
0
        private void DGvTransView_ColumnFilterChanged(object sender, EventArgs e)
        {
            int m_LeadId = 0;

            panelLeadEntry.Controls.Clear();

            if (DGvTransView.FocusedRowHandle >= 0)
            {
                m_LeadId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId"));
                string      s_LeadName = DGvTransView.GetFocusedRowCellValue("LeadName").ToString();
                int         iCCId      = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("CostCentreId"));
                frmLeadInfo LeadInfo   = new frmLeadInfo()
                {
                    TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill
                };
                panelLeadEntry.Controls.Add(LeadInfo);
                LeadInfo.Execute("E", m_LeadId, iCCId, "LeadReg");
            }
        }
示例#3
0
        private void DGvTransView_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            int m_LeadId = 0;

            panelLeadEntry.Controls.Clear();

            if (DGvTransView.FocusedRowHandle >= 0)
            {
                m_LeadId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId"));
                string      s_LeadName = DGvTransView.GetFocusedRowCellValue("LeadName").ToString();
                int         iCCId      = Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CostCentreId"), CommFun.datatypes.vartypenumeric));
                frmLeadInfo LeadInfo   = new frmLeadInfo()
                {
                    TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill
                };
                panelLeadEntry.Controls.Add(LeadInfo);
                LeadInfo.Execute("E", m_LeadId, iCCId, "LeadReg");
            }
        }
示例#4
0
        private void btnClear_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Lead-Clear Filter") == false)
            {
                MessageBox.Show("You don't have Rights to Lead-Clear Filter");
                return;
            }
            m_dtFil.Clear();
            DGvTrans.DataSource = null;
            //FillEnquiry();
            PopulateData();

            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");
        }
示例#5
0
        private void PopulateData()
        {
            m_bLayOut = false;

            //dETo.EditValue = Convert.ToDateTime(DateTime.Now.ToShortDateString());
            fromDate = Convert.ToDateTime(dEFrm.EditValue);
            if (dETo.EditValue == null)
            {
                dETo.EditValue = Convert.ToDateTime(DateTime.Now);
            }
            toDate = Convert.ToDateTime(dETo.EditValue);
            string fdate = string.Format("{0:dd MMM yyyy}", fromDate);
            string tdate = string.Format("{0:dd MMM yyyy}", toDate);//.AddDays(1));

            dt = new DataTable();
            dt = LeadBL.ShowLeadDate(fdate, tdate, Convert.ToBoolean(chkExec.EditValue));
            DGvTrans.DataSource = dt;
            DGvTrans.ForceInitialize();
            DGvTransView.PopulateColumns();
            DGvTransView.Columns["LeadId"].Visible        = false;
            DGvTransView.Columns["CostCentreId"].Visible  = false;
            DGvTransView.Columns["LeadDate"].Visible      = false;
            DGvTransView.Columns["Mobile"].Visible        = false;
            DGvTransView.Columns["Email"].Visible         = false;
            DGvTransView.Columns["CostCentre"].Visible    = false;
            DGvTransView.Columns["ExecutiveName"].Visible = false;

            DGvTransView.Columns["LeadName"].Width = 240;

            DGvTransView.Columns["LeadId"].OptionsColumn.ShowInCustomizationForm        = false;
            DGvTransView.Columns["CostCentreId"].OptionsColumn.ShowInCustomizationForm  = false;
            DGvTransView.Columns["Email"].OptionsColumn.ShowInCustomizationForm         = false;
            DGvTransView.Columns["CostCentre"].OptionsColumn.ShowInCustomizationForm    = false;
            DGvTransView.Columns["ExecutiveName"].OptionsColumn.ShowInCustomizationForm = false;

            DGvTransView.OptionsCustomization.AllowFilter       = true;
            DGvTransView.OptionsBehavior.AllowIncrementalSearch = true;
            DGvTransView.OptionsView.ShowAutoFilterRow          = true;
            DGvTransView.OptionsView.ShowViewCaption            = false;
            DGvTransView.OptionsView.ShowFooter           = true;
            DGvTransView.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
            DGvTransView.OptionsSelection.InvertSelection = false;
            DGvTransView.OptionsView.ColumnAutoWidth      = false;
            DGvTransView.Appearance.HeaderPanel.Font      = new Font(DGvTransView.Appearance.HeaderPanel.Font, FontStyle.Bold);
            DGvTransView.FocusedRowHandle = 0;
            DGvTransView.FocusedColumn    = DGvTransView.VisibleColumns[0];


            int m_LeadId = 0;

            panelLeadEntry.Controls.Clear();

            if (DGvTransView.FocusedRowHandle >= 0)
            {
                m_LeadId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId"));
                string      s_LeadName = DGvTransView.GetFocusedRowCellValue("LeadName").ToString();
                int         iCCId      = Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CostCentreId"), CommFun.datatypes.vartypenumeric));
                frmLeadInfo LeadInfo   = new frmLeadInfo()
                {
                    TopLevel = false, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill
                };
                panelLeadEntry.Controls.Add(LeadInfo);
                LeadInfo.Execute("E", m_LeadId, iCCId, "LeadReg");
            }

            DGvTransView.Appearance.HeaderPanel.Font = new Font(DGvTransView.Appearance.HeaderPanel.Font, FontStyle.Bold);

            DGvTransView.Appearance.FocusedCell.BackColor = Color.Teal;
            DGvTransView.Appearance.FocusedCell.ForeColor = Color.White;
            DGvTransView.Appearance.FocusedRow.ForeColor  = Color.Teal;
            DGvTransView.Appearance.FocusedRow.BackColor  = Color.White;

            DGvTransView.OptionsSelection.EnableAppearanceHideSelection = false;
            //DGvTransView.BestFitColumns();
            BsfGlobal.RestoreLayout("CRMLeadRegister", DGvTransView);
            m_bLayOut = true;
        }