예제 #1
0
        public void UpdateData()
        {
            DataTable dtA = new DataTable();
            DataTable dtM = new DataTable();

            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() != "")
                    {
                        int iFId = UnitDirBL.InsertFacing(CommFun.IsNullCheck(dtA.Rows[i]["Description"].ToString(), CommFun.datatypes.vartypestring).ToString(), m_iCCId);
                    }
                }
            }

            if (dtM != null)
            {
                for (int i = 0; i < dtM.Rows.Count; i++)
                {
                    if (dtM.Rows[i]["Description"].ToString() != "")
                    {
                        UnitDirBL.UpdateFacing(CommFun.IsNullCheck(dtM.Rows[i]["Description"].ToString(), CommFun.datatypes.vartypestring).ToString(), Convert.ToInt32(CommFun.IsNullCheck(dtM.Rows[i]["FacingId"].ToString(), CommFun.datatypes.vartypenumeric)), m_iCCId);
                    }
                }
            }
        }
예제 #2
0
        private void FillLevel()
        {
            dtF = new DataTable();
            dtF = UnitDirBL.GetFloorChangeRate(m_iCCId, m_iFlatTypeId);
            grdRate.DataSource = dtF;

            grdViewRate.Columns["LevelId"].Visible      = false;
            grdViewRate.Columns["FlatTypeId"].Visible   = false;
            grdViewRate.Columns["CostCentreId"].Visible = false;
            grdViewRate.BestFitColumns();

            grdViewRate.Columns["LevelName"].OptionsColumn.AllowEdit = false;
            grdViewRate.Columns["OldRate"].OptionsColumn.AllowEdit   = false;

            RepositoryItemTextEdit txtAmtEdit = new RepositoryItemTextEdit();

            grdViewRate.Columns["NewRate"].ColumnEdit = txtAmtEdit;
            txtAmtEdit.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtAmtEdit.Mask.EditMask = "########################";
            txtAmtEdit.Validating   += txtAmtEdit_Validating;

            grdViewRate.OptionsCustomization.AllowFilter       = false;
            grdViewRate.OptionsBehavior.AllowIncrementalSearch = true;
            grdViewRate.OptionsView.ShowAutoFilterRow          = false;
            grdViewRate.OptionsView.ShowViewCaption            = false;
            grdViewRate.OptionsView.ShowFooter           = false;
            grdViewRate.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
            grdViewRate.OptionsSelection.InvertSelection = false;
            grdViewRate.OptionsView.ColumnAutoWidth      = true;
            grdViewRate.Appearance.HeaderPanel.Font      = new Font(grdViewRate.Appearance.HeaderPanel.Font, FontStyle.Bold);
        }
예제 #3
0
        private void PopulateGrid()
        {
            DataTable dt = new DataTable();

            dt = UnitDirBL.GetSlots(m_iCCId, iBlockId, iTypeId);
            if (dt == null)
            {
                return;
            }

            grdChart.DataSource = null;
            grdChart.DataSource = dt;
            grdChart.ForceInitialize();
            grdChartView.PopulateColumns();
            grdChartView.Columns["FlatId"].Visible = false;
            grdChartView.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm = false;

            grdReport.DataSource = null;
            grdReport.DataSource = dt;
            grdReport.ForceInitialize();
            grdReportView.PopulateColumns();
            grdReportView.Columns["FlatId"].Visible = false;
            grdReportView.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm = false;

            grdReportView.Columns["CPPermitNo"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            grdReportView.Columns["CarPark"].AppearanceHeader.TextOptions.HAlignment    = DevExpress.Utils.HorzAlignment.Far;
            grdReportView.Columns["SlotNo"].AppearanceHeader.TextOptions.HAlignment     = DevExpress.Utils.HorzAlignment.Far;

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

            dt.Dispose();
        }
예제 #4
0
        private void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Area Master-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Area Master-Delete");
                return;
            }

            int  iAreaId = Convert.ToInt32(CommFun.IsNullCheck(grdAreaView.GetFocusedRowCellValue("AreaId"), CommFun.datatypes.vartypenumeric));
            bool bAns    = false;

            bAns = UnitDirBL.FoundArea(iAreaId);

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

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

            if (result1 == DialogResult.Yes)
            {
                UnitDirBL.DeleteAreaMaster(iAreaId);
                grdAreaView.DeleteSelectedRows();
            }
        }
예제 #5
0
        public void UpdateData()
        {
            DataTable dtA = new DataTable();
            DataTable dtM = new DataTable();

            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() != "")
                    {
                        UnitDirBL.InsertAreaMaster(dtA.Rows[i]["Description"].ToString());
                    }
                }
            }

            if (dtM != null)
            {
                for (int i = 0; i < dtM.Rows.Count; i++)
                {
                    if (dtM.Rows[i]["Description"].ToString() != "")
                    {
                        UnitDirBL.UpdateAreaMaster(Convert.ToInt32(dtM.Rows[i]["AreaId"]), dtM.Rows[i]["Description"].ToString());
                    }
                }
            }
        }
예제 #6
0
        public void FillData()
        {
            dt = UnitDirBL.GetOCGMaster();
            grdOC.DataSource = dt;

            grdOCView.Columns["GroupId"].Visible = false;
            grdOCView.Columns["GroupName"].BestFit();
            dt.GetChanges();

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

            grdOCView.Appearance.FocusedCell.BackColor = Color.Teal;
            grdOCView.Appearance.FocusedCell.ForeColor = Color.White;
            grdOCView.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdOCView.Appearance.FocusedRow.BackColor  = Color.White;
        }
예제 #7
0
        private void InsertData()
        {
            List <CarBO> OCar = new List <CarBO>();

            if (grdViewCar.RowCount > 0)
            {
                for (int i = 0; i < grdViewCar.RowCount; i++)
                {
                    OCar.Add(new CarBO()
                    {
                        CostCentreId = m_iCCId,
                        BlockId      = Convert.ToInt32(grdViewCar.GetRowCellValue(i, "BlockId")),
                        TypeId       = m_iTypeId,
                        NoOfSlots    = Convert.ToInt32(CommFun.IsNullCheck(grdViewCar.GetRowCellValue(i, "NoOfSlots"), CommFun.datatypes.vartypenumeric)),
                        AllotSlots   = Convert.ToInt32(CommFun.IsNullCheck(grdViewCar.GetRowCellValue(i, "AllottedSlots"), CommFun.datatypes.vartypenumeric))
                    }
                             );
                }
                if (OCar.Count > 0)
                {
                    dtCar = new DataTable();
                    dtCar = CommFun.GenericListToDataTable(OCar);
                }
            }
            CarBO.Slots1 = labelControl1.Text;
            CarBO.Slots2 = labelControl2.Text;
            CarBO.Cost1  = Convert.ToDecimal(textEdit1.EditValue);
            CarBO.Cost2  = Convert.ToDecimal(textEdit2.EditValue);
            CarBO.TId    = m_iTypeId;
            UnitDirBL.InsertCar(dtCar, m_iCCId);
        }
예제 #8
0
 private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (m_sType == "N")
     {
         dgvTransView.FocusedRowHandle = dgvTransView.FocusedRowHandle + 1;
         dtFlat = DGVTrans.DataSource as DataTable;
         if (dtFlat != null)
         {
             if (dtFlat.Rows.Count > 0)
             {
                 DataView dv = new DataView(dtFlat);
                 dv.RowFilter = "Sel=" + true + "";
                 dtFlat       = dv.ToTable();
                 UnitDirBL.UpdateUnitRateChange(dtFlat);
             }
         }
     }
     else if (m_sType == "Y")
     {
         grdViewReceipt.FocusedRowHandle = grdViewReceipt.FocusedRowHandle + 1;
         dtFlat = grdReceipt.DataSource as DataTable;
         if (dtFlat != null)
         {
             if (dtFlat.Rows.Count > 0)
             {
                 DataView dv = new DataView(dtFlat);
                 dv.RowFilter = "Sel=" + true + "";
                 dtFlat       = dv.ToTable();
                 UnitDirBL.UpdateReceiptUnitRateChange(dtFlat);
             }
         }
     }
     MessageBox.Show("Updated Successfully");
     Close();
 }
예제 #9
0
 private void PopulateEditData()
 {
     m_dtStage = new DataTable();
     m_dtStage = UnitDirBL.GetEditStgDetails(iStgId);
     if (m_dtStage.Rows.Count > 0)
     {
         Sdate.EditValue     = Convert.ToDateTime(m_dtStage.Rows[0]["StageDate"]);
         m_dOldDate          = Convert.ToDateTime(Sdate.EditValue);
         txtRefNo.Text       = m_dtStage.Rows[0]["RefNo"].ToString();
         cboProj.EditValue   = Convert.ToInt32(m_dtStage.Rows[0]["CostCentreId"]);
         cboSBlock.EditValue = Convert.ToInt32(m_dtStage.Rows[0]["BlockId"]);
         cboSLevel.EditValue = Convert.ToInt32(m_dtStage.Rows[0]["LevelId"]);
         SCdate.EditValue    = Convert.ToDateTime(m_dtStage.Rows[0]["CompletionDate"]);
         dEDue.EditValue     = Convert.ToDateTime(m_dtStage.Rows[0]["DueDate"]);
         if (m_dtStage.Rows[0]["SchType"].ToString() == "D")
         {
             comboBoxEdit1.EditValue = "SchDescription";
         }
         else if (m_dtStage.Rows[0]["SchType"].ToString() == "S")
         {
             comboBoxEdit1.EditValue = "Stagewise";
         }
         else if (m_dtStage.Rows[0]["SchType"].ToString() == "O")
         {
             comboBoxEdit1.EditValue = "OtherCost";
         }
         cboStage.EditValue = Convert.ToInt32(m_dtStage.Rows[0]["StageId"]);
         txtSRemark.Text    = m_dtStage.Rows[0]["Remarks"].ToString();
     }
 }
예제 #10
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Stage Details-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Stage Details-Delete");
                return;
            }

            if (grdViewStage.FocusedRowHandle >= 0)
            {
                int  iStageDetId = Convert.ToInt32(grdViewStage.GetFocusedRowCellValue("StageDetId").ToString());
                bool b_PB        = UnitDirBL.CheckPBStage(iStageDetId);
                if (b_PB == true)
                {
                    MessageBox.Show("Progress Bill Raised, Could not Delete", "Delete", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    return;
                }

                DialogResult result1 = MessageBox.Show("Are you sure", "Stage Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result1 == DialogResult.Yes)
                {
                    UnitDirBL.DeleteStage(iStageDetId);
                    grdViewStage.DeleteRow(grdViewStage.FocusedRowHandle);
                }
            }
        }
예제 #11
0
        private void grdCheckView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            if (barEditItem1.EditValue.ToString() == "Finalisation" && m_sType == "Flat")
            {
                m_sCType = "F";

                int i_CheckListId = Convert.ToInt32(CommFun.IsNullCheck(grdCheckView.GetFocusedRowCellValue("CheckListId"), CommFun.datatypes.vartypenumeric));
                if (i_CheckListId == 1)
                {
                    panelBuyerDetails.Visible = true;

                    string s_Status = UnitDirBL.FlatRegCheckList(m_iId, m_sCType);
                    if (s_Status == "ND")
                    {
                        m_bRegAns = false;
                    }
                    else if (s_Status == "D")
                    {
                        m_bRegAns = true;
                    }
                    else if (s_Status == "CND")
                    {
                        m_bRegAns = false;
                    }

                    if (m_sType == "Flat" && m_bRegAns == true)
                    {
                        DataTable dt = new DataTable();
                        dt = UnitDirBL.FlatBuyer(m_iId);
                        if (dt == null)
                        {
                            return;
                        }
                        if (dt.Rows.Count > 0)
                        {
                            m_iLeadId = Convert.ToInt32(dt.Rows[0]["LeadId"]);
                            txtBuyerName.EditValue = CommFun.IsNullCheck(dt.Rows[0]["LeadName"], CommFun.datatypes.vartypestring).ToString();
                            txtCoAppli.EditValue   = CommFun.IsNullCheck(dt.Rows[0]["CoApplicantName"], CommFun.datatypes.vartypestring).ToString();
                        }
                    }

                    if (m_bRegAns == true)
                    {
                        txtBuyerName.Enabled = false;
                        txtCoAppli.Enabled   = false;
                    }
                    else
                    {
                        txtBuyerName.Enabled = true;
                        txtCoAppli.Enabled   = true;
                    }
                }
                else
                {
                    m_bRegAns = true;
                    panelBuyerDetails.Visible = false;
                }
            }
        }
예제 #12
0
 private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (dt != null)
     {
         UnitDirBL.UpdateOCGList(dt);
     }
     Close();
 }
예제 #13
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int iFlatId = Convert.ToInt32(CommFun.IsNullCheck(cboFlat.EditValue, CommFun.datatypes.vartypenumeric));

            UnitDirBL.UpdateFlatSeletion(m_iCCId, m_iBlockId, m_iTypeId, m_iSlotNo, m_iFlatId, iFlatId);
            m_bOk = true;
            Close();
        }
예제 #14
0
 private void frmChangeRate_Load(object sender, EventArgs e)
 {
     dEDate.EditValue = Convert.ToDateTime(DateTime.Now.ToShortDateString());
     FillRateDetails();
     dEDate.EditValue = DateTime.Now;
     dtR = new DataTable();
     dtR = UnitDirBL.GetFloorRate(m_iCCId);
 }
예제 #15
0
        public void FillData()
        {
            dt = UnitDirBL.GetAreaMaster();
            grdArea.DataSource = dt;

            grdAreaView.Columns["AreaId"].Visible = false;
            grdAreaView.Columns["Description"].BestFit();
            dt.GetChanges();
        }
예제 #16
0
파일: frmUOM.cs 프로젝트: SDivyaprabha/CRM1
        private void frmUOM_Load(object sender, EventArgs e)
        {
            FillUOM();
            int iUnitId = UnitDirBL.FoundUOM(m_iCCId);

            if (iUnitId > 0)
            {
                cboUOM.EditValue = iUnitId;
            }
        }
예제 #17
0
 private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Flat Master-Block") == false)
     {
         MessageBox.Show("You don't have Rights to Flat Master-Block");
         return;
     }
     grdViewBlock.FocusedRowHandle = grdViewBlock.FocusedRowHandle + 1;
     UnitDirBL.UpdateBlockFlats(dt);
     Close();
 }
예제 #18
0
        private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Flat-Cancellation-Create") == false)
            {
                MessageBox.Show("You don't have Rights to Flat-Cancellation-Create");
                return;
            }
            string date = UnitDirBL.FoundCancelDate(m_iFlatId);

            if (Convert.ToDateTime(txtDate.EditValue) >= Convert.ToDateTime(CommFun.IsNullCheck(date, CommFun.datatypes.VarTypeDate)))
            {
            }
            else
            {
                MessageBox.Show("Date Earlier Than Current Date"); txtDate.Focus(); return;
            }
            if (txtAmt.EditValue == null || txtAmt.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Penalty Amount"); txtAmt.Focus(); return;
            }

            if (m_sStatus == "S")
            {
                DialogResult Result = MessageBox.Show("Are you sure, do you want to Cancel the Flat?", "CRM", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                {
                    if (Result == DialogResult.Yes)
                    {
                        DataTable dtTmp = new DataTable();
                        dtTmp = AllotBL.GetPaySchFlat(m_iFlatId);
                        if (dtTmp.Rows.Count > 0)
                        {
                            if (MessageBox.Show("PaymentSchedule Exists, You want to Cancel the Unit ?", "CRM", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                            {
                                decimal  dNetAmt     = Convert.ToDecimal(CommFun.IsNullCheck(txtRecvAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dPaidAmt    = Convert.ToDecimal(CommFun.IsNullCheck(txtRecdAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dPenaltyAmt = Convert.ToDecimal(CommFun.IsNullCheck(txtAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                decimal  dBalAmt     = Convert.ToDecimal(CommFun.IsNullCheck(txtBalAmt.EditValue, CommFun.datatypes.vartypenumeric));
                                DateTime dDate       = Convert.ToDateTime(txtDate.EditValue);
                                string   sRemarks    = CommFun.IsNullCheck(txtRemarks.Text, CommFun.datatypes.vartypestring).ToString();

                                AllotBL.InsertAllotment(m_iCCId, m_iFlatId, m_iBuyerId, dNetAmt, dPaidAmt, dPenaltyAmt, dBalAmt, dDate, m_sCancelType, sRemarks, m_iBlockId, m_sFlatNo, dtChk, m_bChkSend, m_sCCName);
                            }
                        }

                        MessageBox.Show("Allotment Cancelled", "Flat Cancellation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            else
            {
                MessageBox.Show("For Cancellation a Flat, You Should Select Sold Unit", "Flat Cancellation", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Close();
        }
예제 #19
0
        private void FillUOM()
        {
            DataTable dt = new DataTable();

            dt = UnitDirBL.UOM();
            cboUnit.Properties.DataSource = dt;
            cboUnit.Properties.PopulateColumns();
            cboUnit.Properties.DisplayMember = "Unit_Name";
            cboUnit.Properties.ValueMember   = "Unit_ID";
            cboUnit.Properties.Columns["Unit_ID"].Visible = false;
            cboUnit.Properties.ShowFooter = false;
            cboUnit.Properties.ShowHeader = false;
        }
예제 #20
0
        private void btnRef_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            grdViewUDS.FocusedRowHandle = grdViewUDS.FocusedRowHandle + 1;
            DataTable dt  = new DataTable();
            DataTable dtM = new DataTable();

            dtM = grdUDS.DataSource as DataTable;
            DataView dv = new DataView(dtM);

            dt = dv.ToTable();

            UnitDirBL.InsertFlatUDS(dt, m_iCCId);
        }
예제 #21
0
파일: frmUOM.cs 프로젝트: SDivyaprabha/CRM1
 private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Project UOM-Add") == false)
     {
         MessageBox.Show("You don't have Rights to Project UOM-Add");
         return;
     }
     if (Convert.ToInt32(CommFun.IsNullCheck(cboUOM.EditValue, CommFun.datatypes.vartypenumeric)) > 0)
     {
         UnitDirBL.UpdateUOM(m_iCCId, Convert.ToInt32(cboUOM.EditValue));
     }
     Close();
 }
예제 #22
0
        private void cboType_EditValueChanged_1(object sender, EventArgs e)
        {
            if (BsfGlobal.FindPermission("Car park Slots-Add") == false)
            {
                MessageBox.Show("You don't have Rights to Car park Slots-Add");
                Close();
                return;
            }

            if (m_iTypeId != 0)
            {
                grdViewCar.FocusedRowHandle = grdViewCar.FocusedRowHandle + 1;
                if (Convert.ToInt32(cboType.EditValue) != 0)
                {
                    InsertData();
                }
            }



            if (Convert.ToInt32(cboType.EditValue) != 0)
            {
                m_iTypeId = Convert.ToInt32(cboType.EditValue);

                textEdit1.Enabled = true;
                textEdit2.Enabled = true;
            }
            else
            {
                textEdit1.Enabled = false;
                textEdit2.Enabled = false;
            }

            FillCarPark();
            dtCost = new DataTable();
            dtCost = UnitDirBL.GetCarCost(m_iCCId, m_iTypeId);
            if (dtCost != null)
            {
                if (dtCost.Rows.Count > 0)
                {
                    textEdit1.EditValue = Convert.ToDecimal(dtCost.Rows[0]["Cost"]);
                    textEdit2.EditValue = Convert.ToDecimal(dtCost.Rows[0]["AddCost"]);
                }
                else
                {
                    textEdit1.EditValue = 0;
                    textEdit2.EditValue = 0;
                }
            }
        }
예제 #23
0
        private void GetData()
        {
            DataTable dt = new DataTable();

            //txtAmt.Enabled = false;
            txtCCName.Text    = m_sCCName;
            txtFlatNo.Text    = m_sFlatNo;
            txtBuyerName.Text = m_sBuyerName;
            dt = UnitDirBL.GetCancelPenalty(m_iCCId, m_iFlatId);
            if (dt.Rows.Count > 0)
            {
                if (m_sCancelType == "F")
                {
                    if (dt.Rows[0]["CancelType"].ToString() == "L")
                    {
                        txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["CancelPenalty"]);
                    }
                    else
                    {
                        txtAmt.EditValue = decimal.Round(Convert.ToDecimal(dt.Rows[0]["NetAmt"]) * Convert.ToDecimal(dt.Rows[0]["CancelPenalty"]) / 100, 3);
                    }
                }
                else
                {
                    if (dt.Rows[0]["BookingType"].ToString() == "L")
                    {
                        txtAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["BookingPenalty"]);
                    }
                    else
                    {
                        txtAmt.EditValue = decimal.Round(Convert.ToDecimal(dt.Rows[0]["NetAmt"]) * Convert.ToDecimal(dt.Rows[0]["BookingPenalty"]) / 100, 3);
                    }
                }
                txtRecvAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["NetAmt"]);
                txtRecdAmt.EditValue = Convert.ToDecimal(dt.Rows[0]["ReceivedAmount"]);
            }
            if (Convert.ToDecimal(txtRecdAmt.EditValue) == 0)
            {
                txtAmt.EditValue = 0;
            }
            if (Convert.ToDecimal(txtRecdAmt.EditValue) - Convert.ToDecimal(txtAmt.EditValue) < 0)
            {
                txtBalAmt.EditValue = 0;
            }
            else
            {
                txtBalAmt.EditValue = Convert.ToDecimal(txtRecdAmt.EditValue) - Convert.ToDecimal(txtAmt.EditValue);
            }
        }
예제 #24
0
        private void btnUnblk_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (sType == "B" || sType == "I")
            {
                iLead = Convert.ToInt32(cboLead.EditValue);
                AssignData();
                UnitDirBL.UpdateUnBlockUnits();

                txtProject.Text   = string.Empty;
                txtFlat.Text      = string.Empty;
                cboLead.EditValue = null;
                txtdate.EditValue = DateTime.Today;
                Close();
            }
        }
예제 #25
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            string sDate = UnitDirBL.FoundDateLand();

            if (sDate != "")
            {
                if (Convert.ToDateTime(CommFun.IsNullCheck(sDate, CommFun.datatypes.VarTypeDate)) > Convert.ToDateTime(dEDate.EditValue))
                {
                    MessageBox.Show("Enter Valid Date"); return;
                }
            }
            grdViewRate.FocusedRowHandle = grdViewRate.FocusedRowHandle + 1;
            FlatTypeBL.InsertChangeRate(dtRate, string.Format(Convert.ToDateTime(dEDate.EditValue).ToString("dd-MMM-yyyy")), dtR);
            Close();
        }
예제 #26
0
        public void FillData()
        {
            dt = UnitDirBL.GetFacing(m_iCCId);

            grdFac.DataSource = dt;
            grdViewFac.Columns["FacingId"].Visible = false;
            grdViewFac.Columns["Description"].BestFit();
            grdViewFac.Appearance.HeaderPanel.Font      = new Font(grdViewFac.Appearance.HeaderPanel.Font, FontStyle.Bold);
            grdViewFac.Appearance.FocusedCell.BackColor = Color.Teal;
            grdViewFac.Appearance.FocusedCell.ForeColor = Color.White;
            grdViewFac.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdViewFac.Appearance.FocusedRow.BackColor  = Color.White;

            grdViewFac.OptionsSelection.EnableAppearanceHideSelection = false;
        }
예제 #27
0
        private void Block()
        {
            RepositoryItemLookUpEdit cboBlk = cboBlock.Edit as RepositoryItemLookUpEdit;
            DataTable dt = new DataTable();

            dt = UnitDirBL.GetBlock(m_iCCId);

            cboBlk.DataSource    = dt;
            cboBlk.DisplayMember = "BlockName";
            cboBlk.ValueMember   = "BlockId";
            cboBlk.PopulateColumns();
            cboBlk.Columns["BlockId"].Visible = false;
            cboBlk.ShowHeader = false;
            cboBlk.ShowFooter = false;
        }
예제 #28
0
        private void frmQualifier_Load(object sender, EventArgs e)
        {
            if (m_bPayTypewise == true)
            {
                DataTable dt = new DataTable();
                dt = UnitDirBL.GetQualifier(m_iFlatId);

                grdQual.DataSource = dt;
                grdViewQual.PopulateColumns();
                grdViewQual.Columns["QualifierName"].Width            = 150;
                grdViewQual.Columns["Sign"].Width                     = 50;
                grdViewQual.Columns["Amount"].Width                   = 50;
                grdViewQual.Columns["Amount"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
            }
            else
            {
                DataTable dtTax = new DataTable();
                dtTax = OtherCostBL.GetQualifierMaster("B", m_iFlatId, "Flat");
                grdQual.DataSource = dtTax;
                grdViewQual.PopulateColumns();
                grdViewQual.Columns["QualifierId"].Visible = false;

                grdViewQual.Columns["Amount"].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Sum;
                grdViewQual.Columns["Amount"].SummaryItem.DisplayFormat = BsfGlobal.g_sDigitFormatS;

                RepositoryItemTextEdit txtAmt = new RepositoryItemTextEdit();
                grdViewQual.Columns["Amount"].ColumnEdit = txtAmt;
                txtAmt.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                txtAmt.Mask.EditMask = BsfGlobal.g_sDigitFormat;
                txtAmt.Mask.UseMaskAsDisplayFormat = true;

                grdViewQual.OptionsCustomization.AllowFilter       = false;
                grdViewQual.OptionsBehavior.AllowIncrementalSearch = true;
                grdViewQual.OptionsView.ShowAutoFilterRow          = false;
                grdViewQual.OptionsView.ShowViewCaption            = false;
                grdViewQual.OptionsView.ShowFooter           = true;
                grdViewQual.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
                grdViewQual.OptionsSelection.InvertSelection = false;
                grdViewQual.OptionsView.ColumnAutoWidth      = true;
                grdViewQual.Appearance.HeaderPanel.Font      = new Font(grdViewQual.Appearance.HeaderPanel.Font, FontStyle.Bold);
                grdViewQual.Appearance.FocusedCell.BackColor = Color.Teal;
                grdViewQual.Appearance.FocusedCell.ForeColor = Color.White;
                grdViewQual.Appearance.FocusedRow.ForeColor  = Color.Black;
                grdViewQual.Appearance.FocusedRow.BackColor  = Color.Teal;

                grdViewQual.OptionsSelection.EnableAppearanceHideSelection = false;
            }
        }
예제 #29
0
        private void FillData()
        {
            txtProject.Text     = m_sCCName;
            txtFlat.Text        = m_sFlatNo;
            txtAmount.EditValue = 0;
            if (radioGroup1.SelectedIndex == 0)
            {
                FillLead("Buyer");
            }
            else
            {
                FillLead("Investor");
            }

            DataTable dtBlock = new DataTable();

            dtBlock = UnitDirBL.GetBlockUnits(m_iFlatId);

            if (dtBlock.Rows.Count > 0)
            {
                if (dtBlock.Rows[0]["CustomerType"].ToString() == "B")
                {
                    radioGroup1.SelectedIndex = 0;
                }
                else
                {
                    radioGroup1.SelectedIndex = 1;
                }
                cboLead.EditValue    = Convert.ToInt32(dtBlock.Rows[0]["LeadId"]);
                txtdate.EditValue    = Convert.ToDateTime(dtBlock.Rows[0]["BlockUpto"].ToString());
                txtRemarks.EditValue = dtBlock.Rows[0]["Remarks"].ToString();
                if (m_sBlockType == "Block")
                {
                    txtAmount.EditValue = 0;
                }
                else
                {
                    if (dtBlock.Rows[0]["BlockingType"].ToString() == "L")
                    {
                        txtAmount.EditValue = Convert.ToDecimal(dtBlock.Rows[0]["BlockingPenalty"]);
                    }
                    else
                    {
                        txtAmount.EditValue = decimal.Round(Convert.ToDecimal(dtBlock.Rows[0]["NetAmt"]) * Convert.ToDecimal(dtBlock.Rows[0]["BlockingPenalty"]) / 100, 3);
                    }
                }
            }
        }
예제 #30
0
        public void FillData()
        {
            dt = new DataTable();

            DGVPay.DataSource = null;
            DGvTransPay.Columns.Clear();

            dt = UnitDirBL.PaySchType();
            DGVPay.DataSource = dt;
            DGvTransPay.PopulateColumns();
            DGvTransPay.Columns["TypeId"].Visible     = false;
            DGvTransPay.Columns["EMI"].Visible        = false;
            DGvTransPay.Columns["RoundValue"].Visible = false;
            DGvTransPay.Columns["NoOfMonths"].Visible = false;
            dt.GetChanges();
        }