private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //string sMsg = PaymentScheduleBL.GetPaySchFlatValidate(m_iCCId, m_iFlatId); //if (sMsg == "Land") { MessageBox.Show("Mismatch Land Value"); return; } //if (sMsg == "Base") { MessageBox.Show("Mismatch Construction Value"); return; } //if (sMsg == "OtherCost") { MessageBox.Show("Mismatch OtherCost Value"); return; } //for (int x = 0; x < dtPaySchFlat.Rows.Count; x++) //{ // for (int i = 0; i < dtFlat.Rows.Count; i++) // { // if (Convert.ToInt32(dtFlat.Rows[i]["TemplateId"]) == Convert.ToInt32(dtPaySchFlat.Rows[x]["TemplateId"])) // { // dtFlat.Rows[i]["FlatId"] = m_iFlatId; // dtFlat.Rows[i]["SchDate"] = dtPaySchFlat.Rows[x]["SchDate"]; // dtFlat.Rows[i]["SchPercent"] = dtPaySchFlat.Rows[x]["SchPercent"]; // dTotal = dTotal + Convert.ToDecimal(dtFlat.Rows[i]["SchPercent"]); // } // } //} Cursor.Current = Cursors.WaitCursor; grdViewPayFlat.FocusedRowHandle = grdViewPayFlat.FocusedRowHandle + 1; decimal dTotal = Convert.ToDecimal(CommFun.IsNullCheck(grdViewPayFlat.Columns["SchPercent"].SummaryText, CommFun.datatypes.vartypenumeric)); if (dTotal != 100) { MessageBox.Show("Percentage should be 100"); return; } dtFlat = new DataTable(); dtFlat = PaymentScheduleBL.GetCommPaySchFlat(m_iCCId, m_iFlatId, m_iPayTypeId); if (bCheckBill == false) { if (m_bPayTypewise == true) { PaymentScheduleBL.UpdateFlatSchedule(m_iFlatId, dtFlat); } else { PaymentScheduleBL.UpdateFlatScheduleQual(m_iFlatId, dtFlat); } } //PaymentScheduleBL.UpdateFlatSchedule(m_iFlatId, dtFlat); PopulatePaySchFlat(); Close(); Cursor.Current = Cursors.Default; }
private void frmPaymentFlat_Load(object sender, EventArgs e) { dtFlat = new DataTable(); dtFlat = PaymentScheduleBL.GetCommPaySchFlat(m_iCCId, m_iFlatId, m_iPayTypeId); PopulatePaySchFlat(); }