Ejemplo n.º 1
0
        private void FlatView_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            CCId      = Convert.ToInt32(FlatView.GetFocusedRowCellValue("CostCentreId"));
            FlatId    = Convert.ToInt32(FlatView.GetFocusedRowCellValue("FlatId"));
            m_sFlatNo = FlatView.GetFocusedRowCellValue("FlatNo").ToString();

            m_iLandRegId = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("LandRegisterId"), CommFun.datatypes.vartypenumeric));

            if (m_iLandRegId != 0)
            {
                dtPaySchedule = PaymentScheduleBL.GetPaymentSchedulePlot(m_iLandRegId, FlatId);
            }
            else
            {
                dtPaySchedule = PaymentScheduleBL.GetPaymentScheduleFlat(CCId, FlatId);
            }
            grdPayment.DataSource = dtPaySchedule;

            if (dtPaySchedule.Rows.Count > 0)
            {
                decimal dAmt = 0;
                for (int i = 0; i < dtPaySchedule.Rows.Count; i++)
                {
                    dAmt = dAmt + Convert.ToDecimal(dtPaySchedule.Rows[i]["NetAmount"]);
                    dtPaySchedule.Rows[i]["CumulativeAmount"] = dAmt;
                }
            }

            PaymentView.Columns["PaymentSchId"].Visible = false;
            //PaymentView.Columns["CostCentreId"].Visible = false;
            //PaymentView.Columns["FlatId"].Visible = false;
            //PaymentView.Columns["OtherCostId"].Visible = false;

            PanelProgress.Controls.Clear();
            frmFlatTrans frmT = new frmFlatTrans();

            frmT.Dock            = DockStyle.Fill;
            frmT.TopLevel        = false;
            frmT.FormBorderStyle = FormBorderStyle.None;
            PanelProgress.Controls.Add(frmT);
            frmT.Execute(FlatId);

            int LandId            = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("LandRegisterId"), CommFun.datatypes.vartypenumeric));
            frmProgressChart frmP = new frmProgressChart();

            PanelProgress.Controls.Clear();
            frmP.Dock            = DockStyle.Fill;
            frmP.TopLevel        = false;
            frmP.FormBorderStyle = FormBorderStyle.None;
            PanelProgress.Controls.Add(frmP);
            frmP.m_iLandId = LandId;
            if (cboCheckList.EditValue.ToString() == "Handing Over")
            {
                frmP.Execute(FlatId, false, "H");
            }
            else if (cboCheckList.EditValue.ToString() == "Works")
            {
                frmP.Execute(FlatId, false, "W");
            }
            else if (cboCheckList.EditValue.ToString() == "Finalization")
            {
                frmP.Execute(FlatId, false, "F");
            }
            else if (cboCheckList.EditValue.ToString() == "Cancellation")
            {
                frmP.Execute(FlatId, false, "C");
            }

            PopulatePayInfo();
            PopulateBuyerInfo();
            PopulateCustomerFeedback();
        }
Ejemplo n.º 2
0
        private void PopulateFlatDetails()
        {
            DataTable dtFlat = new DataTable();

            dtFlat = ClientBL.GetFlatDetails(EnqId, m_FlatId);
            grdFlatDetails.DataSource = dtFlat;
            FlatView.Columns["CostCentreId"].Visible   = false;
            FlatView.Columns["LandRegisterId"].Visible = false;
            FlatView.Columns["FlatId"].Visible         = false;
            FlatView.Columns["FlatNo"].Caption         = CommFun.m_sFuncName + "/Plot No";
            FlatView.Columns["FlatType"].Caption       = CommFun.m_sFuncName + "/Plot Type";

            if (dtFlat.Rows.Count > 0)
            {
                FlatId       = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("FlatId"), CommFun.datatypes.vartypenumeric));
                CCId         = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("CostCentreId"), CommFun.datatypes.vartypenumeric));
                m_iLandRegId = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("LandRegisterId"), CommFun.datatypes.vartypenumeric));
            }
            if (m_iLandRegId != 0)
            {
                dtPaySchedule = PaymentScheduleBL.GetPaymentSchedulePlot(m_iLandRegId, FlatId);
            }
            else
            {
                dtPaySchedule = PaymentScheduleBL.GetPaymentScheduleFlat(CCId, FlatId);
            }
            grdPayment.DataSource = dtPaySchedule;

            if (dtPaySchedule.Rows.Count > 0)
            {
                decimal dAmt = 0;
                for (int i = 0; i < dtPaySchedule.Rows.Count; i++)
                {
                    dAmt = dAmt + Convert.ToDecimal(dtPaySchedule.Rows[i]["NetAmount"]);
                    dtPaySchedule.Rows[i]["CumulativeAmount"] = dAmt;
                }
            }

            PaymentView.Columns["PaymentSchId"].Visible = false;
            PaymentView.Columns["TemplateId"].Visible   = false;
            if (m_iLandRegId == 0)
            {
                PaymentView.Columns["BlockName"].Visible = false;
                PaymentView.Columns["LevelName"].Visible = false;
            }
            PaymentView.Columns["SchType"].Visible          = false;
            PaymentView.Columns["CumulativeAmount"].Visible = false;

            RepositoryItemTextEdit txtAmtEdit = new RepositoryItemTextEdit();

            PaymentView.Columns["NetAmount"].ColumnEdit = txtAmtEdit;

            txtAmtEdit.DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
            txtAmtEdit.DisplayFormat.FormatString = "f3";
            txtAmtEdit.Mask.EditMask = "f3";
            txtAmtEdit.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtAmtEdit.Mask.UseMaskAsDisplayFormat = true;

            RepositoryItemTextEdit txtCumAmt = new RepositoryItemTextEdit();

            PaymentView.Columns["CumulativeAmount"].ColumnEdit = txtCumAmt;
            txtCumAmt.DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Numeric;
            txtCumAmt.DisplayFormat.FormatString = "f3";
            txtCumAmt.Mask.EditMask = "f3";
            txtCumAmt.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtCumAmt.Mask.UseMaskAsDisplayFormat = true;

            PaymentView.Columns["SchPercent"].SummaryItem.SummaryType       = DevExpress.Data.SummaryItemType.Sum;
            PaymentView.Columns["Amount"].SummaryItem.SummaryType           = DevExpress.Data.SummaryItemType.Sum;
            PaymentView.Columns["NetAmount"].SummaryItem.SummaryType        = DevExpress.Data.SummaryItemType.Sum;
            PaymentView.Columns["CumulativeAmount"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;

            PaymentView.Columns["SchPercent"].SummaryItem.DisplayFormat       = BsfGlobal.g_sDigitFormatS;
            PaymentView.Columns["Amount"].SummaryItem.DisplayFormat           = BsfGlobal.g_sDigitFormatS;
            PaymentView.Columns["NetAmount"].SummaryItem.DisplayFormat        = BsfGlobal.g_sDigitFormatS;
            PaymentView.Columns["CumulativeAmount"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

            PaymentView.Columns["SchPercent"].AppearanceHeader.TextOptions.HAlignment       = DevExpress.Utils.HorzAlignment.Far;
            PaymentView.Columns["Amount"].AppearanceHeader.TextOptions.HAlignment           = DevExpress.Utils.HorzAlignment.Far;
            PaymentView.Columns["NetAmount"].AppearanceHeader.TextOptions.HAlignment        = DevExpress.Utils.HorzAlignment.Far;
            PaymentView.Columns["CumulativeAmount"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;

            PanelProgress.Controls.Clear();
            frmFlatTrans frmT = new frmFlatTrans();

            frmT.Dock            = DockStyle.Fill;
            frmT.TopLevel        = false;
            frmT.FormBorderStyle = FormBorderStyle.None;
            PanelProgress.Controls.Add(frmT);
            frmT.Execute(FlatId);

            int LandId            = Convert.ToInt32(CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("LandRegisterId"), CommFun.datatypes.vartypenumeric));
            frmProgressChart frmP = new frmProgressChart();

            PanelProgress.Controls.Clear();
            frmP.Dock            = DockStyle.Fill;
            frmP.TopLevel        = false;
            frmP.FormBorderStyle = FormBorderStyle.None;
            PanelProgress.Controls.Add(frmP);
            frmP.m_iLandId = LandId;
            if (cboCheckList.EditValue.ToString() == "Handing Over")
            {
                frmP.Execute(FlatId, false, "H");
            }
            else if (cboCheckList.EditValue.ToString() == "Works")
            {
                frmP.Execute(FlatId, false, "W");
            }
            else if (cboCheckList.EditValue.ToString() == "Finalization")
            {
                frmP.Execute(FlatId, false, "F");
            }
            else if (cboCheckList.EditValue.ToString() == "Cancellation")
            {
                frmP.Execute(FlatId, false, "C");
            }

            PopulatePayInfo();

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

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

            FlatView.OptionsSelection.EnableAppearanceHideSelection = false;

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

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

            PaymentView.OptionsSelection.EnableAppearanceHideSelection = false;
        }
Ejemplo n.º 3
0
        private void PopulatePaySchFlat()
        {
            dtPaySchFlat = new DataTable();
            dtPaySchFlat = PaymentScheduleBL.GetPaymentScheduleFlat(m_iCCId, m_iFlatId);

            grdPayFlat.DataSource = null;
            grdViewPayFlat.Columns.Clear();

            grdPayFlat.DataSource = dtPaySchFlat;
            grdViewPayFlat.PopulateColumns();

            grdViewPayFlat.Columns["PaymentSchId"].Visible     = false;
            grdViewPayFlat.Columns["SchType"].Visible          = false;
            grdViewPayFlat.Columns["TemplateId"].Visible       = false;
            grdViewPayFlat.Columns["LevelName"].Visible        = false;
            grdViewPayFlat.Columns["BlockName"].Visible        = false;
            grdViewPayFlat.Columns["NetAmount"].Visible        = false;
            grdViewPayFlat.Columns["CumulativeAmount"].Visible = false;

            grdViewPayFlat.Columns["SchPercent"].Caption = "%";

            grdViewPayFlat.Columns["Description"].OptionsColumn.AllowEdit = false;
            grdViewPayFlat.Columns["Amount"].OptionsColumn.AllowEdit      = false;
            grdViewPayFlat.Columns["SchDate"].OptionsColumn.AllowEdit     = true;

            bool bCheckBill = PaymentScheduleBL.CheckBillPassed(m_iFlatId);

            if (bCheckBill == true)
            {
                grdViewPayFlat.Columns["SchPercent"].OptionsColumn.AllowEdit = false;
                btnOK.Enabled = false;
            }
            else
            {
                grdViewPayFlat.Columns["SchPercent"].OptionsColumn.AllowEdit = true;
                btnOK.Enabled = true;
            }

            RepositoryItemButtonEdit txtDEdit = new RepositoryItemButtonEdit()
            {
                TextEditStyle = TextEditStyles.DisableTextEditor
            };

            txtDEdit.DisplayFormat.FormatType            = DevExpress.Utils.FormatType.DateTime;
            txtDEdit.DisplayFormat.FormatString          = "dd/MM/yyyy";
            grdViewPayFlat.Columns["SchDate"].ColumnEdit = txtDEdit;
            txtDEdit.DoubleClick += txtDEdit_DoubleClick;

            RepositoryItemTextEdit txtSchPer = new RepositoryItemTextEdit();

            grdViewPayFlat.Columns["SchPercent"].ColumnEdit = txtSchPer;
            txtSchPer.Mask.EditMask = BsfGlobal.g_sDigitFormat;
            grdViewPayFlat.Columns["SchPercent"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
            txtSchPer.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtSchPer.Mask.UseMaskAsDisplayFormat = true;
            txtSchPer.EditValueChanged           += txtSchPer_EditValueChanged;

            RepositoryItemTextEdit txtAmt = new RepositoryItemTextEdit();

            grdViewPayFlat.Columns["Amount"].ColumnEdit = txtAmt;
            txtAmt.Mask.EditMask = BsfGlobal.g_sDigitFormat;
            grdViewPayFlat.Columns["Amount"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
            txtAmt.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtAmt.Mask.UseMaskAsDisplayFormat = true;

            RepositoryItemButtonEdit txtAmtEdit = new RepositoryItemButtonEdit();

            txtAmtEdit.TextEditStyle = TextEditStyles.DisableTextEditor;
            grdViewPayFlat.Columns["NetAmount"].ColumnEdit = txtAmtEdit;
            txtAmtEdit.Mask.EditMask = BsfGlobal.g_sDigitFormat;
            txtAmtEdit.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtAmtEdit.DoubleClick  += txtAmtEdit_DoubleClick;
            //txtAmtEdit.EditValueChanged += txtPerEdit_EditValueChanged;

            grdViewPayFlat.Columns["Description"].Width = 300;
            grdViewPayFlat.Columns["SchDate"].Width     = 100;
            grdViewPayFlat.Columns["SchPercent"].Width  = 60;
            grdViewPayFlat.Columns["Amount"].Width      = 100;
            grdViewPayFlat.Columns["NetAmount"].Width   = 100;

            grdViewPayFlat.Columns["SchPercent"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewPayFlat.Columns["SchPercent"].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
            grdViewPayFlat.Columns["SchPercent"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

            grdViewPayFlat.Columns["Amount"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewPayFlat.Columns["Amount"].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
            grdViewPayFlat.Columns["Amount"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

            grdViewPayFlat.Columns["NetAmount"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdViewPayFlat.Columns["NetAmount"].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
            grdViewPayFlat.Columns["NetAmount"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

            grdViewPayFlat.OptionsCustomization.AllowFilter       = false;
            grdViewPayFlat.OptionsBehavior.AllowIncrementalSearch = true;
            grdViewPayFlat.OptionsView.ShowFooter      = true;
            grdViewPayFlat.OptionsView.ColumnAutoWidth = true;
            grdViewPayFlat.FocusedRowHandle            = 0;
            grdViewPayFlat.FocusedColumn = grdViewPayFlat.VisibleColumns[0];

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