Beispiel #1
0
        private void FillCall()
        {
            m_bLayout = false;

            DataTable dtCall = new DataTable();

            dtCall = CallSheetEntryBL.PostGetCall();

            grdCall.DataSource = null;
            grdViewCall.Columns.Clear();

            grdCall.DataSource = dtCall;
            grdViewCall.PopulateColumns();
            grdViewCall.Columns["LeadId"].Visible        = false;
            grdViewCall.Columns["CostCentreId"].Visible  = false;
            grdViewCall.Columns["NatureId"].Visible      = false;
            grdViewCall.Columns["CallTypeId"].Visible    = false;
            grdViewCall.Columns["FlatId"].Visible        = false;
            grdViewCall.Columns["PlotDetailsId"].Visible = false;
            grdViewCall.Columns["FollowUpReq"].Visible   = false;
            grdViewCall.Columns["NextCallDate"].Visible  = false;
            grdViewCall.Columns["BuyerDate"].Visible     = false;
            grdViewCall.Columns["Remarks"].Visible       = false;
            grdViewCall.Columns["Mobile"].Visible        = false;
            grdViewCall.Columns["Email"].Visible         = false;

            grdViewCall.Columns["LeadId"].OptionsColumn.ShowInCustomizationForm        = false;
            grdViewCall.Columns["CostCentreId"].OptionsColumn.ShowInCustomizationForm  = false;
            grdViewCall.Columns["NatureId"].OptionsColumn.ShowInCustomizationForm      = false;
            grdViewCall.Columns["CallTypeId"].OptionsColumn.ShowInCustomizationForm    = false;
            grdViewCall.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm        = false;
            grdViewCall.Columns["PlotDetailsId"].OptionsColumn.ShowInCustomizationForm = false;

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

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

            grdViewCall.OptionsSelection.EnableAppearanceHideSelection = false;

            BsfGlobal.RestoreLayout("PostFollowup", grdViewCall);
            m_bLayout = true;
        }
Beispiel #2
0
        private void PopulateBuyerCostSheet()
        {
            m_bLayout = false;

            DataTable dt = new DataTable();

            dt = FlatTypeBL.BuyerGetCostSheet(m_iCCId, m_bPayTypewise, m_iFlatId);

            grdF1.DataSource = null;
            grdViewF1.Columns.Clear();
            DataView dv = new DataView(dt);

            dv.RowFilter = "((ActualValue<>0 And DiscountValue<>0 And Type=true) or (Type=false))";
            dt           = dv.ToTable();

            grdF1.DataSource = dt;
            grdF1.ForceInitialize();
            grdViewF1.PopulateColumns();

            grdViewF1.Columns["ActualValue"].Visible   = false;
            grdViewF1.Columns["DiscountValue"].Visible = false;
            grdViewF1.Columns["Type"].Visible          = false;

            grdViewF1.Columns["Description"].Width = 500;
            grdViewF1.Columns["Actual"].Width      = 250;
            grdViewF1.Columns["Discount"].Width    = 250;

            grdViewF1.Columns["Discount"].Caption = "After Discount";

            grdViewF1.Columns["Description"].ColumnEdit = repositoryItemMemoEdit1;
            grdViewF1.Columns["Actual"].ColumnEdit      = repositoryItemMemoEdit1;
            grdViewF1.Columns["Discount"].ColumnEdit    = repositoryItemMemoEdit1;

            grdViewF1.OptionsView.ShowFooter      = true;
            grdViewF1.OptionsView.ColumnAutoWidth = false;
            grdViewF1.FocusedRowHandle            = 0;
            grdViewF1.FocusedColumn = grdViewF1.VisibleColumns[0];
            grdViewF1.OptionsCustomization.AllowColumnMoving = true;

            grdViewF1.OptionsSelection.InvertSelection = true;
            grdViewF1.OptionsSelection.EnableAppearanceHideSelection = false;
            grdViewF1.Appearance.FocusedRow.BackColor = Color.Teal;
            grdViewF1.Appearance.FocusedRow.ForeColor = Color.White;

            BsfGlobal.RestoreLayout("Format1", grdViewF1);
            m_bLayout = true;
        }
Beispiel #3
0
        private void PopulateGrid()
        {
            GrdLeadRegister.ForceInitialize();
            grdLeadRegView.PopulateColumns();
            grdLeadRegView.Columns["LeadName"].Group();
            grdLeadRegView.ExpandAllGroups();

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

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

            grdLeadRegView.Columns["LeadName"].Width      = 200;
            grdLeadRegView.Columns["LeadDate"].Width      = 100;
            grdLeadRegView.Columns["CampaignName"].Width  = 150;
            grdLeadRegView.Columns["Mobile"].Width        = 120;
            grdLeadRegView.Columns["Email"].Width         = 150;
            grdLeadRegView.Columns["CostCentre"].Width    = 200;
            grdLeadRegView.Columns["ExecutiveName"].Width = 150;
            grdLeadRegView.Columns["Remarks"].Width       = 150;
            grdLeadRegView.Columns["Address1"].Width      = 200;
            grdLeadRegView.Columns["Address2"].Width      = 200;
            grdLeadRegView.Columns["Locality"].Width      = 200;
            grdLeadRegView.Columns["City"].Width          = 150;
            grdLeadRegView.Columns["PinCode"].Width       = 100;
            grdLeadRegView.Columns["Gender"].Width        = 100;

            grdLeadRegView.OptionsView.ShowFooter           = true;
            grdLeadRegView.Appearance.HeaderPanel.Font      = new Font(grdLeadRegView.Appearance.HeaderPanel.Font, FontStyle.Bold);
            grdLeadRegView.OptionsSelection.InvertSelection = true;
            grdLeadRegView.OptionsSelection.EnableAppearanceHideSelection = false;
            grdLeadRegView.Appearance.FocusedRow.BackColor = Color.Teal;
            grdLeadRegView.Appearance.FocusedRow.ForeColor = Color.White;
            grdLeadRegView.OptionsView.ColumnAutoWidth     = false;
            //grdLeadRegView.BestFitColumns();

            grdLeadRegView.FocusedRowHandle = 0;
            grdLeadRegView.FocusedColumn    = grdLeadRegView.VisibleColumns[0];
            grdLeadRegView.Focus();

            BsfGlobal.RestoreLayout("CRMLeadRegister", grdLeadRegView);
            m_bLayOut = true;
        }
Beispiel #4
0
        private void PopulateAECostSheet()
        {
            m_bLayout = false;

            DataTable dt = new DataTable();

            if (m_sType == "AsOn")
            {
                dt = FlatTypeBL.GetAECostSheet(m_iCCId, m_bPayTypewise, Convert.ToDateTime(deDate.EditValue));
            }
            else
            {
                dt = FlatTypeBL.GetBWAECostSheet(m_iCCId, m_bPayTypewise, Convert.ToDateTime(deFrom), Convert.ToDateTime(deTo));
            }

            //DataView dv = new DataView(dt);
            //dv.RowFilter = "PaidNetAmount<>0";
            //dt = dv.ToTable();

            grdF2.DataSource = null;
            grdF2.DataSource = dt;
            grdF2.ForceInitialize();
            grdViewF2.PopulateColumns();

            grdViewF2.Columns["FlatId"].Visible = false;
            grdViewF2.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm = false;

            grdViewF2.Columns["BlockName"].Visible = false;
            grdViewF2.Columns["LevelName"].Visible = false;
            grdViewF2.Columns["Campaign"].Visible  = false;
            grdViewF2.Columns["Executive"].Visible = false;

            if (Convert.ToBoolean(dt.Columns.Contains("Registration")) == false)
            {
            }
            else
            {
                grdViewF2.Columns["Registration"].Visible = false;
            }
            grdViewF2.Columns["LeadName"].Caption    = "BUYER NAME";
            grdViewF2.Columns["FlatNo"].Caption      = CommFun.m_sFuncName.ToUpper() + " NO";
            grdViewF2.Columns["TypeName"].Caption    = "TYPE NAME";
            grdViewF2.Columns["BookingDate"].Caption = "BOOKING DATE";
            grdViewF2.Columns["Area"].Caption        = "AREA SQ.FT";
            grdViewF2.Columns["Rate"].Caption        = "RATE PER SQFT";
            grdViewF2.Columns["BaseAmt"].Caption     = "AMOUNT(RS)";

            grdViewF2.Columns["LeadName"].ColumnEdit    = repositoryItemMemoEdit1;
            grdViewF2.Columns["FlatNo"].ColumnEdit      = repositoryItemMemoEdit1;
            grdViewF2.Columns["TypeName"].ColumnEdit    = repositoryItemMemoEdit1;
            grdViewF2.Columns["Area"].ColumnEdit        = repositoryItemMemoEdit1;
            grdViewF2.Columns["Rate"].ColumnEdit        = repositoryItemMemoEdit1;
            grdViewF2.Columns["BaseAmt"].ColumnEdit     = repositoryItemMemoEdit1;
            grdViewF2.Columns["BookingDate"].ColumnEdit = repositoryItemDateEdit2;

            grdViewF2.Columns["Area"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewF2.Columns["Area"].DisplayFormat.FormatType                 = DevExpress.Utils.FormatType.Numeric;
            grdViewF2.Columns["Area"].DisplayFormat.FormatString               = BsfGlobal.g_sDigitFormat;
            grdViewF2.Columns["Rate"].AppearanceCell.TextOptions.HAlignment    = DevExpress.Utils.HorzAlignment.Far;
            grdViewF2.Columns["Rate"].DisplayFormat.FormatType                 = DevExpress.Utils.FormatType.Numeric;
            grdViewF2.Columns["Rate"].DisplayFormat.FormatString               = BsfGlobal.g_sDigitFormat;
            grdViewF2.Columns["BaseAmt"].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewF2.Columns["BaseAmt"].DisplayFormat.FormatType              = DevExpress.Utils.FormatType.Numeric;
            grdViewF2.Columns["BaseAmt"].DisplayFormat.FormatString            = BsfGlobal.g_sDigitFormat;

            grdViewF2.Columns["Area"].SummaryItem.SummaryType      = DevExpress.Data.SummaryItemType.Sum;
            grdViewF2.Columns["Area"].SummaryItem.DisplayFormat    = BsfGlobal.g_sDigitFormatS;
            grdViewF2.Columns["Rate"].SummaryItem.SummaryType      = DevExpress.Data.SummaryItemType.Sum;
            grdViewF2.Columns["Rate"].SummaryItem.DisplayFormat    = BsfGlobal.g_sDigitFormatS;
            grdViewF2.Columns["BaseAmt"].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
            grdViewF2.Columns["BaseAmt"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

            for (int i = 9; i < dt.Columns.Count; i++)
            {
                grdViewF2.Columns[i].Caption = grdViewF2.Columns[i].FieldName.ToUpper();
                grdViewF2.Columns[i].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
                grdViewF2.Columns[i].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat;
                grdViewF2.Columns[i].SummaryItem.SummaryType    = DevExpress.Data.SummaryItemType.Sum;
                grdViewF2.Columns[i].SummaryItem.DisplayFormat  = BsfGlobal.g_sDigitFormatS;
                grdViewF2.Columns[i].ColumnEdit = repositoryItemMemoEdit2;

                if (Convert.ToDecimal(grdViewF2.Columns[i].SummaryItem.SummaryValue) == 0)
                {
                    grdViewF2.Columns[i].Visible = false;
                }
            }
            grdViewF2.Columns["AmountReceivedLand"].Caption = "AMOUNT RECEIVED FOR LAND ON REGN";
            grdViewF2.Columns["LeadName"].Width             = 200;

            int x = grdViewF2.Columns["GrandTotal"].VisibleIndex;

            grdViewF2.Columns["UDS"].VisibleIndex = x + 1;

            int x1 = grdViewF2.Columns["UDS"].VisibleIndex;

            grdViewF2.Columns["LandValue"].VisibleIndex = x1 + 1;

            grdViewF2.OptionsView.RowAutoHeight   = true;
            grdViewF2.OptionsView.ShowFooter      = true;
            grdViewF2.OptionsView.ColumnAutoWidth = false;
            grdViewF2.FocusedRowHandle            = 0;
            grdViewF2.FocusedColumn = grdViewF2.VisibleColumns[0];
            grdViewF2.OptionsCustomization.AllowColumnMoving = true;

            grdViewF2.OptionsSelection.InvertSelection = true;
            grdViewF2.OptionsSelection.EnableAppearanceHideSelection = false;
            grdViewF2.Appearance.FocusedRow.BackColor = Color.Teal;
            grdViewF2.Appearance.FocusedRow.ForeColor = Color.White;
            grdViewF2.BestFitColumns();

            BsfGlobal.RestoreLayout("Format2", grdViewF2);
            m_bLayout = true;
        }
Beispiel #5
0
        private void PopulateCostSheet()
        {
            m_bLayout = false;

            DataTable dt = new DataTable();

            dt = FlatTypeBL.GetCostSheet(m_iCCId, m_bPayTypewise);

            grdF1.DataSource = null;
            grdViewF1.Columns.Clear();
            grdF1.DataSource = dt;
            grdF1.ForceInitialize();
            grdViewF1.PopulateColumns();

            grdViewF1.Columns["BlockName"].ColumnEdit = repositoryItemMemoEdit1;
            grdViewF1.Columns["LevelName"].ColumnEdit = repositoryItemMemoEdit1;
            grdViewF1.Columns["TypeName"].ColumnEdit  = repositoryItemMemoEdit1;
            grdViewF1.Columns["FlatNo"].ColumnEdit    = repositoryItemMemoEdit1;
            grdViewF1.Columns["Status"].ColumnEdit    = repositoryItemMemoEdit1;
            grdViewF1.Columns["Area"].ColumnEdit      = repositoryItemMemoEdit1;

            grdViewF1.Columns["FlatId"].Visible = false;
            grdViewF1.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm = false;
            grdViewF1.Columns["Area"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Far;
            grdViewF1.Columns["Area"].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
            grdViewF1.Columns["Area"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat;
            grdViewF1.Columns["Area"].SummaryItem.SummaryType    = DevExpress.Data.SummaryItemType.Sum;
            grdViewF1.Columns["Area"].SummaryItem.DisplayFormat  = BsfGlobal.g_sDigitFormatS;

            for (int i = 6; i < dt.Columns.Count; i++)
            {
                string sName = grdViewF1.Columns[i].FieldName;
                grdViewF1.Columns[sName].AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
                grdViewF1.Columns[sName].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
                grdViewF1.Columns[sName].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat;
                grdViewF1.Columns[sName].SummaryItem.SummaryType    = DevExpress.Data.SummaryItemType.Sum;
                grdViewF1.Columns[sName].SummaryItem.DisplayFormat  = BsfGlobal.g_sDigitFormatS;
                grdViewF1.Columns[sName].ColumnEdit = repositoryItemMemoEdit1;

                if (Convert.ToDecimal(grdViewF1.Columns[sName].SummaryItem.SummaryValue) == 0)
                {
                    grdViewF1.Columns[sName].Visible = false;
                }
            }
            grdViewF1.Columns["Total"].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
            grdViewF1.Columns["Total"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat;

            grdViewF1.Columns["Total"].Caption  = "Grand Total";
            grdViewF1.Columns["FlatNo"].Caption = CommFun.m_sFuncName + " No";

            grdViewF1.OptionsView.RowAutoHeight   = true;
            grdViewF1.OptionsView.ShowFooter      = true;
            grdViewF1.OptionsView.ColumnAutoWidth = false;
            grdViewF1.FocusedRowHandle            = 0;
            grdViewF1.FocusedColumn = grdViewF1.VisibleColumns[0];
            grdViewF1.OptionsCustomization.AllowColumnMoving = true;

            grdViewF1.OptionsSelection.InvertSelection = true;
            grdViewF1.OptionsSelection.EnableAppearanceHideSelection = false;
            grdViewF1.Appearance.FocusedRow.BackColor = Color.Teal;
            grdViewF1.Appearance.FocusedRow.ForeColor = Color.White;
            grdViewF1.BestFitColumns();

            BsfGlobal.RestoreLayout("Format1", grdViewF1);
            m_bLayout = true;
        }
        public void FillData()
        {
            m_bLayOut = false;

            grdReceipt.DataSource = null;

            dt = new DataTable();
            dt = ReceiptDetailBL.GetReceiptRegister();
            if (dt == null)
            {
                return;
            }

            Cursor.Current = Cursors.WaitCursor;

            grdReceipt.DataSource = dt;
            grdReceipt.ForceInitialize();
            grdViewReceipt.PopulateColumns();
            grdViewReceipt.Columns["ReceiptId"].Visible = false;
            grdViewReceipt.Columns["ReceiptId"].OptionsColumn.ShowInCustomizationForm = false;
            grdViewReceipt.Columns["Narration"].Visible = false;

            grdViewReceipt.Columns["ReceiptDate"].Width   = 50;
            grdViewReceipt.Columns["ReceiptDate"].Caption = "Ref. Date";
            grdViewReceipt.Columns["ReceiptDate"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["ReceiptDate"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["ReceiptNo"].Width   = 60;
            grdViewReceipt.Columns["ReceiptNo"].Caption = "Ref. No";
            grdViewReceipt.Columns["ReceiptNo"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["ReceiptNo"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["CostCentreId"].Visible = false;
            grdViewReceipt.Columns["CostCentreId"].OptionsColumn.ShowInCustomizationForm = false;

            grdViewReceipt.Columns["BuyerName"].Width   = 150;
            grdViewReceipt.Columns["BuyerName"].Caption = "Buyer";
            grdViewReceipt.Columns["BuyerName"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["BuyerName"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["FlatNo"].Width   = 80;
            grdViewReceipt.Columns["FlatNo"].Caption = CommFun.m_sFuncName + " No";
            grdViewReceipt.Columns["FlatNo"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["FlatNo"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["CostCentreName"].Width   = 170;
            grdViewReceipt.Columns["CostCentreName"].Caption = "Project";
            grdViewReceipt.Columns["CostCentreName"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["CostCentreName"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["Amount"].Width = 70;
            grdViewReceipt.Columns["Amount"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewReceipt.Columns["Amount"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Far;
            grdViewReceipt.Columns["Amount"].SummaryItem.SummaryType    = DevExpress.Data.SummaryItemType.Sum;
            grdViewReceipt.Columns["Amount"].SummaryItem.DisplayFormat  = BsfGlobal.g_sDigitFormatS;
            grdViewReceipt.Columns["Amount"].DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
            grdViewReceipt.Columns["Amount"].DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat;

            grdViewReceipt.Columns["PaymentAgainst"].Width   = 100;
            grdViewReceipt.Columns["PaymentAgainst"].Caption = "Pay Type";
            grdViewReceipt.Columns["PaymentAgainst"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            grdViewReceipt.Columns["PaymentAgainst"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Near;

            grdViewReceipt.Columns["Approve"].Width = 80;
            grdViewReceipt.Columns["Approve"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            grdViewReceipt.Columns["Approve"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Center;

            grdViewReceipt.Columns["ChequeDisbursement"].Width = 100;
            grdViewReceipt.Columns["ChequeDisbursement"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            grdViewReceipt.Columns["ChequeDisbursement"].AppearanceCell.TextOptions.HAlignment   = DevExpress.Utils.HorzAlignment.Center;

            grdViewReceipt.OptionsBehavior.AllowIncrementalSearch = true;
            grdViewReceipt.OptionsView.ShowAutoFilterRow          = true;
            grdViewReceipt.FocusedRowHandle = 0;
            grdViewReceipt.FocusedColumn    = grdViewReceipt.VisibleColumns[0];

            grdViewReceipt.OptionsSelection.InvertSelection = true;
            grdViewReceipt.OptionsSelection.EnableAppearanceHideSelection = false;
            grdViewReceipt.Appearance.FocusedRow.BackColor = Color.Teal;
            grdViewReceipt.Appearance.FocusedRow.ForeColor = Color.White;

            BsfGlobal.RestoreLayout("CRMReceiptRegister", grdViewReceipt);
            m_bLayOut = true;

            Cursor.Current = Cursors.Default;
        }
Beispiel #7
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;
        }