コード例 #1
0
        private void barbtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Lead-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Lead-Delete");
                return;
            }

            m_iLeadId = Convert.ToInt32(grdLeadRegView.GetFocusedRowCellValue("LeadId"));
            bool bAns = NewLeadBL.FoundLeadDetils(m_iLeadId);

            if (bAns == true)
            {
                MessageBox.Show("Transaction Exists", "Lead", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            bool bFinalised = BusinessLayer.CallSheetEntryBL.GetFinalisedFlat(0, m_iLeadId);

            if (bFinalised == true)
            {
                MessageBox.Show("Do not delete Finalise Lead", "Lead", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MessageBox.Show("Do You Want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                if (NewLeadBL.Delete_LeadDetils(m_iLeadId) == true)
                {
                    grdLeadRegView.DeleteRow(grdLeadRegView.FocusedRowHandle);
                }
            }
        }
コード例 #2
0
        private void PopulateExecutive()
        {
            DataTable dtE = new DataTable();

            dtE = NewLeadBL.GetEmailExecutive();

            DataRow dr = null;

            dr = dtE.NewRow();
            dr["ExecutiveId"]   = 0;
            dr["ExecutiveName"] = "All";
            dtE.Rows.InsertAt(dr, 0);

            if (dtE.Rows.Count > 0)
            {
                Executive.DataSource = dtE;
                Executive.PopulateColumns();
                Executive.DisplayMember = "ExecutiveName";
                Executive.ValueMember   = "ExecutiveId";
                Executive.Columns["ExecutiveId"].Visible = false;
                Executive.ShowFooter = false;
                Executive.ShowHeader = false;
            }
            cboExecutive.EditValue = 0;
        }
コード例 #3
0
        private void PopulateProject()
        {
            DataTable dtOpCC = new DataTable();

            dtOpCC = NewLeadBL.GetOpCostCentre();

            DataRow dr = null;

            dr = dtOpCC.NewRow();
            dr["CostCentreId"]   = 0;
            dr["CostCentreName"] = "All";
            dtOpCC.Rows.InsertAt(dr, 0);

            if (dtOpCC.Rows.Count > 0)
            {
                Project.DataSource = dtOpCC;
                Project.PopulateColumns();
                Project.DisplayMember = "CostCentreName";
                Project.ValueMember   = "CostCentreId";
                Project.Columns["CostCentreId"].Visible = false;
                Project.ShowFooter = false;
                Project.ShowHeader = false;
            }
            cboProject.EditValue = 0;
        }
コード例 #4
0
        public void FillData()
        {
            dt = NewLeadBL.GetReligionMaster();
            grdReli.DataSource = dt;

            grdReliView.Columns["ReligionId"].Visible = false;
            grdReliView.Columns["Description"].BestFit();
            dt.GetChanges();
        }
コード例 #5
0
ファイル: frmLeadPickList.cs プロジェクト: SDivyaprabha/CRM1
        public void UpdateData()
        {
            DataTable dtA  = new DataTable();
            DataTable dtM  = new DataTable();
            bool      bAns = false;

            dtA = dt.GetChanges(DataRowState.Added);
            dtM = dt.GetChanges(DataRowState.Modified);

            if (dtA != null)
            {
                for (int i = 0; i < dtA.Rows.Count; i++)
                {
                    if (dtA.Rows[i]["Description"].ToString() != "")
                    {
                        if (m_sType == "Cost" || m_sType == "Income" || m_sType == "AptSize")
                        {
                            if (dtA.Rows[i]["Description"].ToString().Contains('-') == false)
                            {
                                MessageBox.Show("Invalid Format"); return;
                            }
                        }
                        bAns = NewLeadBL.CheckDesc(dtA.Rows[i]["Description"].ToString(), m_sType);
                        if (bAns == true)
                        {
                            MessageBox.Show("Already Exist"); return;
                        }
                        NewLeadBL.InsertPLMaster(dtA.Rows[i]["Description"].ToString(), m_sType);
                    }
                }
            }

            if (dtM != null)
            {
                for (int i = 0; i < dtM.Rows.Count; i++)
                {
                    if (dtM.Rows[i]["Description"].ToString() != "")
                    {
                        if (m_sType == "Cost" || m_sType == "Income" || m_sType == "AptSize")
                        {
                            if (dtM.Rows[i]["Description"].ToString().Contains('-') == false)
                            {
                                MessageBox.Show("Invalid Format"); return;
                            }
                        }
                        bAns = NewLeadBL.CheckDesc(dtM.Rows[i]["Description"].ToString(), m_sType);
                        if (bAns == true)
                        {
                            MessageBox.Show("Already Exist"); return;
                        }
                        NewLeadBL.UpdatePLMaster(Convert.ToInt32(dtM.Rows[i]["Id"]), dtM.Rows[i]["Description"].ToString(), m_sType);
                    }
                }
            }
        }
コード例 #6
0
        private void PopulateData()
        {
            DataTable dt = new DataTable();

            dt = NewLeadBL.GetLoanStatus();
            GrdLead.DataSource = dt;

            grdLeadView.PopulateColumns();
            GrdLead.ForceInitialize();
            //grdLeadView.Columns["LeadName"].Group();
            grdLeadView.ExpandAllGroups();

            grdLeadView.Columns["LeadName"].Caption      = "Client Name";
            grdLeadView.Columns["FinaliseDate"].Caption  = "Booking Date";
            grdLeadView.Columns["ExecutiveName"].Caption = "Booked By Executive Name";
            grdLeadView.Columns["BrokerName"].Caption    = "Booked By Broker Name";
            grdLeadView.Columns["HomeLoan"].Caption      = "Referral Agent For Home Loan";

            //grdLeadView.Columns["LeadId"].Visible = false;
            //grdLeadView.Columns["CostCentreId"].Visible = false;
            //grdLeadView.Columns["CallTypeId"].Visible = false;

            //grdLeadView.Columns["LeadId"].OptionsColumn.ShowInCustomizationForm = false;
            //grdLeadView.Columns["CostCentreId"].OptionsColumn.ShowInCustomizationForm = false;
            //grdLeadView.Columns["CallTypeId"].OptionsColumn.ShowInCustomizationForm = false;

            //grdLeadView.Columns["LeadName"].Width = 300;
            //grdLeadView.Columns["LeadDate"].Width = 100;
            //grdLeadView.Columns["Mobile"].Width = 100;
            //grdLeadView.Columns["Email"].Width = 200;
            //grdLeadView.Columns["CostCentre"].Width = 300;
            //grdLeadView.Columns["ExecutiveName"].Width = 300;

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

            grdLeadView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdLeadView.Appearance.FocusedCell.ForeColor = Color.White;
            grdLeadView.Appearance.FocusedRow.ForeColor  = Color.Black;
            grdLeadView.Appearance.FocusedRow.BackColor  = Color.White;
            grdLeadView.BestFitColumns();

            grdLeadView.OptionsSelection.EnableAppearanceHideSelection = false;
        }
コード例 #7
0
        private void PopulateBuyer()
        {
            DataTable dt = new DataTable();

            dt = NewLeadBL.GetEmailBuyers(cboBuyerType.EditValue.ToString(), m_iExecId, m_iCCId, m_sType, deFrom, deTo);

            grdMail.DataSource = dt;
            grdMail.ForceInitialize();
            grdViewMail.PopulateColumns();

            grdViewMail.Columns["LeadName"].Width = 300;
            grdViewMail.Columns["Email"].Width    = 290;
            grdViewMail.Columns["To"].Width       = 100;
            grdViewMail.Columns["CC"].Width       = 100;
            grdViewMail.Columns["BCC"].Width      = 100;

            grdViewMail.Columns["LeadId"].Visible       = false;
            grdViewMail.Columns["ExecutiveId"].Visible  = false;
            grdViewMail.Columns["CostCentreId"].Visible = false;
            grdViewMail.Columns["Mobile"].Visible       = false;

            grdViewMail.Columns["LeadName"].OptionsColumn.AllowEdit = false;
            grdViewMail.Columns["Email"].OptionsColumn.AllowEdit    = false;
            grdViewMail.Columns["LeadName"].OptionsColumn.ReadOnly  = true;
            grdViewMail.Columns["Email"].OptionsColumn.ReadOnly     = true;

            grdViewMail.Columns["To"].AppearanceHeader.TextOptions.HAlignment  = DevExpress.Utils.HorzAlignment.Center;
            grdViewMail.Columns["CC"].AppearanceHeader.TextOptions.HAlignment  = DevExpress.Utils.HorzAlignment.Center;
            grdViewMail.Columns["BCC"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;

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

            grdViewMail.Appearance.FocusedCell.BackColor = Color.Teal;
            grdViewMail.Appearance.FocusedCell.ForeColor = Color.White;
            grdViewMail.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdViewMail.Appearance.FocusedRow.BackColor  = Color.White;
        }
コード例 #8
0
ファイル: frmLeadPickList.cs プロジェクト: SDivyaprabha/CRM1
        private void PopulateGrid()
        {
            dt = NewLeadBL.GetPLMaster(m_sType);
            grdList.DataSource = dt;
            grdViewList.PopulateColumns();
            grdList.ForceInitialize();
            grdViewList.Columns["Id"].Visible = false;
            grdViewList.Columns["Description"].BestFit();
            dt.GetChanges();

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

            grdViewList.Appearance.FocusedCell.BackColor = Color.Teal;
            grdViewList.Appearance.FocusedCell.ForeColor = Color.White;
            grdViewList.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdViewList.Appearance.FocusedRow.BackColor  = Color.White;
        }
コード例 #9
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 = NewLeadBL.ShowLeadDate(fdate, tdate, Convert.ToBoolean(ChkExec.EditValue));
            GrdLeadRegister.DataSource = dt;
            PopulateGrid();
        }
コード例 #10
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int  iRelId = Convert.ToInt32(CommFun.IsNullCheck(grdReliView.GetFocusedRowCellValue("ReligionId"), CommFun.datatypes.vartypenumeric));
            bool bAns   = false;

            bAns = NewLeadBL.FoundReligion(iRelId);

            if (bAns == true)
            {
                MessageBox.Show("Do not Delete, Religion Already Used"); return;
            }

            DialogResult result1 = MessageBox.Show("Are you sure", "Religion Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result1 == DialogResult.Yes)
            {
                NewLeadBL.DeleteReligionMaster(iRelId);
                grdReliView.DeleteSelectedRows();
            }
        }
コード例 #11
0
        public void UpdateData()
        {
            DataTable dtA = new DataTable();
            DataTable dtM = new DataTable();

            dtA = dt.GetChanges(DataRowState.Added);
            dtM = dt.GetChanges(DataRowState.Modified);
            bool b_Ans = false;

            if (dtA != null)
            {
                for (int i = 0; i < dtA.Rows.Count; i++)
                {
                    b_Ans = NewLeadDL.CheckRelDesc(dtA.Rows[i]["Description"].ToString());
                    if (b_Ans == true)
                    {
                        MessageBox.Show("Alreay Exist"); return;
                    }
                    if (dtA.Rows[i]["Description"].ToString() != "")
                    {
                        NewLeadBL.InsertReligionMaster(dtA.Rows[i]["Description"].ToString());
                    }
                }
            }

            if (dtM != null)
            {
                for (int i = 0; i < dtM.Rows.Count; i++)
                {
                    b_Ans = NewLeadDL.CheckRelDesc(dtM.Rows[i]["Description"].ToString());
                    if (b_Ans == true)
                    {
                        MessageBox.Show("Alreay Exist"); return;
                    }
                    if (dtM.Rows[i]["Description"].ToString() != "")
                    {
                        NewLeadBL.UpdateReligionMaster(Convert.ToInt32(dtM.Rows[i]["ReligionId"]), dtM.Rows[i]["Description"].ToString());
                    }
                }
            }
        }
コード例 #12
0
        private void FillLeadGrid()
        {
            fromDate = Convert.ToDateTime(dEFrm.EditValue);
            toDate   = Convert.ToDateTime(dETo.EditValue);

            string fdate = string.Format("{0:dd MMM yyyy}", fromDate);
            string tdate = string.Format("{0:dd MMM yyyy}", toDate);

            dt = new DataTable();
            GrdLeadRegister.DataSource = NewLeadBL.FillLeadGrid(fdate, tdate);
            GrdLeadRegister.ForceInitialize();
            grdLeadRegView.PopulateColumns();
            grdLeadRegView.Columns["LeadId"].Visible = false;
            grdLeadRegView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Style3D;
            grdLeadRegView.Appearance.HeaderPanel.Font = new Font(grdLeadRegView.Appearance.HeaderPanel.Font, FontStyle.Bold);

            grdLeadRegView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdLeadRegView.Appearance.FocusedCell.ForeColor = Color.HotPink;
            grdLeadRegView.Appearance.FocusedRow.ForeColor  = Color.Black;
            grdLeadRegView.Appearance.FocusedRow.BackColor  = Color.HotPink;

            grdLeadRegView.OptionsSelection.EnableAppearanceHideSelection = false;
        }