private void grdLevelBlockView_Click(object sender, EventArgs e) { if (selection.SelectedCount == 0) { for (int j = 0; j < grdLevelBlockView.RowCount; j++) { BOStageDetails.i_LevelBlockId = Convert.ToInt32(CommFun.IsNullCheck(grdLevelBlockView.GetRowCellValue(j, "LevelId"), CommFun.datatypes.vartypenumeric)); BOStageDetails.i_BlockId = Convert.ToInt32(CommFun.IsNullCheck(grdBlockView.GetRowCellValue(grdBlockView.FocusedRowHandle, "BlockId"), CommFun.datatypes.vartypenumeric)); StageDetBL.DeleteLevelBlock(BOStageDetails); } } else { for (int i = 0; i < selection.SelectedCount; i++) { BOStageDetails.i_LevelBlockId = Convert.ToInt32(CommFun.IsNullCheck(grdLevelBlockView.GetRowCellValue(i, "LevelId"), CommFun.datatypes.vartypenumeric)); BOStageDetails.i_BlockId = Convert.ToInt32(CommFun.IsNullCheck(grdBlockView.GetRowCellValue(grdBlockView.FocusedRowHandle, "BlockId"), CommFun.datatypes.vartypenumeric)); if (BOStageDetails.i_LevelBlockId != 0 || BOStageDetails.i_BlockId != 0) { StageDetBL.DeleteLevelBlock(BOStageDetails); StageDetBL.InsertLevelBlock(BOStageDetails); } else { MessageBox.Show("Please Select Block Name", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } } }
private void grdBlockView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { //bool bAns = false; int iBlockId = Convert.ToInt32(CommFun.IsNullCheck(grdBlockView.GetRowCellValue(grdBlockView.FocusedRowHandle, "BlockId").ToString(), CommFun.datatypes.vartypenumeric)); BOStageDetails.s_BlockName = grdBlockView.GetRowCellValue(grdBlockView.FocusedRowHandle, "BlockName").ToString(); BOStageDetails.i_SortOrderBlock = grdBlockView.RowCount; BOStageDetails.i_CostCentreId = m_icostCentreId; if (CommFun.IsNullCheck(grdBlockView.GetFocusedRowCellValue(grdBlockView.Columns[1].FieldName).ToString(), CommFun.datatypes.vartypestring).ToString().Trim() == "") { grdBlockView.CancelUpdateCurrentRow(); return; } //bAns = StageDetDL.CheckBlockFound(BOStageDetails); //if (bAns == true) { MessageBox.Show("Block Name Already Exist"); grdBlockView.CancelUpdateCurrentRow(); return; } if (iBlockId == 0) { iBlockId = StageDetBL.InsertBlock(BOStageDetails); grdBlockView.SetRowCellValue(grdBlockView.FocusedRowHandle, "BlockId", iBlockId); grdBlockView.SetRowCellValue(grdBlockView.FocusedRowHandle, "SortOrder", BOStageDetails.i_SortOrderBlock); } else { StageDetBL.UpdateBlock(BOStageDetails, iBlockId); } }
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); }
public static string FormatNum(object argValue, int argDigit) { decimal dValue = Convert.ToDecimal(CommFun.IsNullCheck(argValue, CommFun.datatypes.vartypenumeric)); string sFormat = "N" + Convert.ToString(argDigit).Trim(); return(dValue.ToString(sFormat, CultureInfo.GetCultureInfo(1094).NumberFormat)); }
private void UpdateValue() { int iReceiptId = 0; int iOthId = 0; decimal dGAmt = 0; decimal dTaxAmt = 0; decimal dNetamt = 0; foreach (DataRow dr in m_tRdT.Rows) { if (Convert.ToInt32(dr["FlatId"]) == m_iFlatId && Convert.ToInt32(dr["PaymentSchId"]) == m_iPayShId) { iReceiptId = Convert.ToInt32(dr["ReceiptTypeId"]); iOthId = Convert.ToInt32(dr["OtherCostId"]); for (int i = 0; i < grdViewReceipt.RowCount; i++) { if (Convert.ToInt32(grdViewReceipt.GetRowCellValue(i, "ReceiptTypeId")) == iReceiptId && Convert.ToInt32(grdViewReceipt.GetRowCellValue(i, "OtherCostId")) == iOthId) { dGAmt = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(i, "PaidGrossAmount"), CommFun.datatypes.vartypenumeric)); dTaxAmt = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(i, "PaidTaxAmount"), CommFun.datatypes.vartypenumeric)); dNetamt = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.GetRowCellValue(i, "PaidNetAmount"), CommFun.datatypes.vartypenumeric)); break; } } dr["PaidGrossAmount"] = dGAmt; dr["PaidTaxAmount"] = dTaxAmt; dr["PaidNetAmount"] = dNetamt; } } }
void btnAmtEdit_DoubleClick(object sender, EventArgs e) { int iLevelId = 0; DataTable dt = new DataTable(); ButtonEdit txtAmount = (ButtonEdit)sender; if (CommFun.IsNullCheck(grdViewRate.GetFocusedRowCellValue("FloorwiseRate"), CommFun.datatypes.vartypestring).ToString() == "Y") { txtAmount.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; txtAmount.Properties.ReadOnly = true; } else { txtAmount.Properties.TextEditStyle = TextEditStyles.Standard; txtAmount.Properties.ReadOnly = false; } int iFlatTypeId = Convert.ToInt16(grdViewRate.GetFocusedRowCellValue("FlatTypeId")); decimal dGLV = Convert.ToDecimal(grdViewRate.GetFocusedRowCellValue("GuideLineValue")); string sFloorwise = grdViewRate.GetFocusedRowCellValue("FloorwiseRate").ToString(); if (sFloorwise == "Y") { frmFloorChangeRate frm = new frmFloorChangeRate(); dt = frm.Execute(m_iCCId, iFlatTypeId, dGLV); if (dt.Rows.Count > 0) { grdViewRate.SetRowCellValue(grdViewRate.FocusedRowHandle, "NewRate", Convert.ToDecimal(CommFun.IsNullCheck(dt.Rows[0]["NewRate"], CommFun.datatypes.vartypenumeric))); } DataTable dtFloor = new DataTable(); dtFloor = dt; if (dtFloor != null) { if (dtR.Rows.Count > 0) { for (int j = 0; j < dtR.Rows.Count; j++) { if (dtFloor.Rows.Count > 0) { for (int i = 0; i < dtFloor.Rows.Count; i++) { iLevelId = Convert.ToInt32(dtFloor.Rows[i]["LevelId"]); if (Convert.ToInt32(dtR.Rows[j]["FlatTypeId"]) == iFlatTypeId && Convert.ToInt32(dtR.Rows[j]["LevelId"]) == iLevelId) { dtR.Rows[j]["CostCentreId"] = dtFloor.Rows[i]["CostCentreId"]; dtR.Rows[j]["FlatTypeId"] = dtFloor.Rows[i]["FlatTypeId"]; dtR.Rows[j]["LevelId"] = dtFloor.Rows[i]["LevelId"]; dtR.Rows[j]["LevelName"] = dtFloor.Rows[i]["LevelName"]; dtR.Rows[j]["OldRate"] = dtFloor.Rows[i]["OldRate"]; dtR.Rows[j]["NewRate"] = dtFloor.Rows[i]["NewRate"]; } } } } } } } }
private void cboProj_EditValueChanged(object sender, EventArgs e) { DataTable dtLand = new DataTable(); if (Convert.ToInt32(cboProj.EditValue) > 0) { dtLand = LeadBL.GetBusinessType(Convert.ToInt32(cboProj.EditValue)); if (dtLand.Rows.Count > 0) { m_sBussinessType = CommFun.IsNullCheck(dtLand.Rows[0]["BusinessType"], CommFun.datatypes.vartypestring).ToString(); m_iLandId = Convert.ToInt32(CommFun.IsNullCheck(dtLand.Rows[0]["LandId"], CommFun.datatypes.vartypenumeric)); if (m_sBussinessType == "B") { lblProject.Caption = "Project - Apartment"; } else { lblProject.Caption = "Project - Plot"; } } FillGridMaster(); FillGrid(); } else { lblProject.Caption = "Project"; grdPBTrans.DataSource = null; grdPBReg.DataSource = null; } }
private string GetLeadId() { m_sLeadId = ""; DataTable dtSel = new DataTable(); dtSel = grdDemand.DataSource as DataTable; DataView dview = new DataView(dtSel) { RowFilter = "Sel=" + true + "" }; DataTable dt = new DataTable(); dt = dview.ToTable(); if (dt != null) { for (int i = 0; i < dt.Rows.Count; i++) { m_sLeadId = String.Format("{0}{1},", m_sLeadId, Convert.ToInt32(CommFun.IsNullCheck(dt.Rows[i]["LeadId"], CommFun.datatypes.vartypenumeric))); } m_sLeadId = m_sLeadId.TrimEnd(','); if (m_sLeadId == "") { m_sLeadId = "0"; } } return(m_sLeadId); }
private void cboCheckList_EditValueChanged(object sender, EventArgs e) { 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"); } }
private void txtTotal_EditValueChanged(object sender, EventArgs e) { Qualifier.frmQualifier qul = new Qualifier.frmQualifier(); decimal dAmt = Convert.ToDecimal(CommFun.IsNullCheck(txtTotal.Text, CommFun.datatypes.vartypenumeric)); decimal dNAmt = 0; decimal dTaxAmt = 0; decimal dVATAmt = 0; if (qul.Execute("S", ref dAmt, ref QualVBC, ref dNAmt, false, "", true, ref dTaxAmt, DateTime.Now, ref dVATAmt) == true) { DataRow dr; QualTrans.Rows.Clear(); foreach (Qualifier.cRateQualR d in QualVBC) { dr = QualTrans.NewRow(); dr["BillRegId"] = m_iRegBillId; dr["QualifierId"] = d.RateID.ToString().Trim('S'); dr["Expression"] = d.Expression; dr["ExpPer"] = d.ExpPer; dr["Add_Less_Flag"] = d.Add_Less_Flag; dr["SurCharge"] = d.SurPer; dr["EDCess"] = d.EDPer; dr["Amount"] = d.Amount; dr["ExpValue"] = d.ExpValue; dr["ExpPerValue"] = d.ExpPerValue; dr["EDValue"] = d.EDValue; dr["SurValue"] = d.SurValue; QualTrans.Rows.Add(dr); } txtQTotal.Text = CommFun.FormatNum1(dNAmt.ToString(), CommFun.g_iCurrencyDigit); txtNAmt.Text = CommFun.FormatNum1(dNAmt.ToString(), CommFun.g_iCurrencyDigit);; } }
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(); } }
private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (grdAmenitiesMasterView.FocusedRowHandle < 0) { return; } if (BsfGlobal.FindPermission("Amenities Master-Delete") == false) { MessageBox.Show("You don't have Rights to Amenities Master-Delete"); return; } int iAId = Convert.ToInt32(CommFun.IsNullCheck(grdAmenitiesMasterView.GetRowCellValue(grdAmenitiesMasterView.FocusedRowHandle, "AmenityId").ToString(), CommFun.datatypes.vartypenumeric)); if (ProjectInfoDL.CheckAmenityUsed(iAId) == true) { MessageBox.Show("Amenity Used, Do not Delete"); return; } if (MessageBox.Show("Do You want to Delete Row?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { ProjectInfoDL.DeleteAmenitiesMaster(iAId); grdAmenitiesMasterView.DeleteRow(grdAmenitiesMasterView.FocusedRowHandle); } }
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); } } } }
private void barbtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (grdAgeView.FocusedRowHandle >= 0) { if (grdAgeView.IsNewItemRow(grdAgeView.FocusedRowHandle) == true) { return; } if (grdAgeView.FocusedRowHandle != grdAgeView.RowCount - 2) { return; } DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { int Id = 0; Id = Convert.ToInt32(CommFun.IsNullCheck(grdAgeView.GetRowCellValue(grdAgeView.FocusedRowHandle, "AgeId"), CommFun.datatypes.vartypenumeric)); CRM.BusinessLayer.AgeBL.Delete_Age(Id); grdAgeView.DeleteRow(grdAgeView.FocusedRowHandle); } } }
private void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (grdDescView.FocusedRowHandle < 0) { return; } int iSchId = Convert.ToInt32(CommFun.IsNullCheck(grdDescView.GetFocusedRowCellValue("SchDescId"), CommFun.datatypes.vartypenumeric)); if (PaymentScheduleBL.CheckPaymentScheduleDesUsed(iSchId) == true) { MessageBox.Show("Schedule Description Used, Do not Delete"); return; } try { if (MessageBox.Show("Do you want to Delete Row?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { string sSql = "DELETE FROM dbo.SchDescription WHERE SchDescId=" + iSchId + " AND Type='" + m_cDescType + "'"; CommFun.CRMExecute(sSql); grdDescView.DeleteRow(grdDescView.FocusedRowHandle); } } catch (Exception ex) { BsfGlobal.CustomException(ex.Message, ex.StackTrace); } }
public void UpdateData() { DataTable dtA = new DataTable(); DataTable dtM = new DataTable(); dtA = m_dt.GetChanges(DataRowState.Added); dtM = m_dt.GetChanges(DataRowState.Modified); if (dtA != null) { for (int i = 0; i < dtA.Rows.Count; i++) { string sSql = String.Format("INSERT INTO dbo.SchDescription(SchDescName, Type) VALUES('{0}', '{1}')", CommFun.IsNullCheck(dtA.Rows[i]["SchDescName"], CommFun.datatypes.vartypestring).ToString(), m_cDescType); CommFun.CRMExecute(sSql); } } if (dtM != null) { for (int i = 0; i < dtM.Rows.Count; i++) { string sSql = String.Format("UPDATE dbo.SchDescription SET SchDescName='{0}', Type='{1}' WHERE SchDescId={2} ", CommFun.IsNullCheck(dtA.Rows[i]["SchDescName"], CommFun.datatypes.vartypestring).ToString(), m_cDescType, Convert.ToInt32(CommFun.IsNullCheck(dtA.Rows[i]["SchDescId"], CommFun.datatypes.vartypenumeric))); CommFun.CRMExecute(sSql); } } }
private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { //if (BsfGlobal.FindPermission("CallType Master-Delete") == false) //{ // MessageBox.Show("You don't have Rights to Area Master-Delete"); // return; //} int iCallTypeId = Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CallTypeId"), CommFun.datatypes.vartypenumeric)); bool bAns = false; bool bAns1 = false; bAns = CallSheetEntryBL.CallTypeMasterFound(iCallTypeId); bAns1 = CallSheetEntryBL.CallTypeSysFound(iCallTypeId); if (bAns == true) { MessageBox.Show("Do not Delete, CallType Already Used"); return; } if (bAns1 == true) { MessageBox.Show("Do not Delete, Default CallType"); return; } DialogResult result1 = MessageBox.Show("Are you sure", "CallType Master Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result1 == DialogResult.Yes) { CallSheetEntryBL.DeleteCallTypeMaster(iCallTypeId); DGvTransView.DeleteSelectedRows(); } }
private void DGvTransView_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { if (m_sType == "C") { if (dt.Rows.Count > 0) { if (Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CallTypeId"), CommFun.datatypes.vartypenumeric)) == 1 || Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CallTypeId"), CommFun.datatypes.vartypenumeric)) == 2 || Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CallTypeId"), CommFun.datatypes.vartypenumeric)) == 3 || Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("CallTypeId"), CommFun.datatypes.vartypenumeric)) == 4) { DGvTransView.Columns["Description"].OptionsColumn.AllowEdit = false; DGvTransView.Columns["Description"].OptionsColumn.ReadOnly = true; } else { DGvTransView.Columns["Description"].OptionsColumn.AllowEdit = true; DGvTransView.Columns["Description"].OptionsColumn.ReadOnly = false; } } } else { DGvTransView.Columns["Description"].OptionsColumn.AllowEdit = true; DGvTransView.Columns["Description"].OptionsColumn.ReadOnly = false; } }
private void DGvTransView_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e) { if (Convert.ToBoolean(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("SysDefault"), CommFun.datatypes.vartypenumeric)) == true) { e.Cancel = true; } }
void txtLA_EditValueChanged(object sender, EventArgs e) { DevExpress.XtraEditors.TextEdit editor = (DevExpress.XtraEditors.TextEdit)sender; editor.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; editor.Properties.DisplayFormat.FormatString = BsfGlobal.g_sDigitFormat; if (editor.EditValue == null) { editor.EditValue = 0; } decimal dLandArea = Convert.ToDecimal(CommFun.IsNullCheck(editor.EditValue.ToString(), CommFun.datatypes.vartypenumeric)); decimal dFSI = Convert.ToDecimal(CommFun.IsNullCheck(grdViewUDS.GetFocusedRowCellValue("FSIIndex"), CommFun.datatypes.vartypenumeric)); decimal dBuildArea = Convert.ToDecimal(CommFun.IsNullCheck(grdViewUDS.GetFocusedRowCellValue("BuildArea"), CommFun.datatypes.vartypenumeric)); decimal dWithHeld = Convert.ToDecimal(CommFun.IsNullCheck(grdViewUDS.GetFocusedRowCellValue("WithHeld"), CommFun.datatypes.vartypenumeric)); decimal dNetLandArea = dLandArea * dWithHeld / 100; //if (dLandArea != 0) //{ if (dFSI == 0) { dFSI = 1; grdViewUDS.SetRowCellValue(grdViewUDS.FocusedRowHandle, "FSIIndex", dFSI); } dBuildArea = dNetLandArea * dFSI; grdViewUDS.SetRowCellValue(grdViewUDS.FocusedRowHandle, "BuildArea", dBuildArea); //} //else //{ grdViewUDS.SetRowCellValue(grdViewUDS.FocusedRowHandle, "LandArea", dLandArea); grdViewUDS.SetRowCellValue(grdViewUDS.FocusedRowHandle, "NetLandArea", dNetLandArea); //} }
private void barEditItem1_EditValueChanged(object sender, EventArgs e) { //if (BsfGlobal.FindPermission("Followup Setup-Add") == false) //{ // MessageBox.Show("You don't have Rights to Followup Setup-Add"); // return; //} if (Convert.ToInt32(CommFun.IsNullCheck(barEditItem1.EditValue, CommFun.datatypes.vartypenumeric)) > 0) { RepositoryItemLookUpEdit cboCallType = barEditItem1.Edit as RepositoryItemLookUpEdit; DataRowView dr = cboCallType.GetDataSourceRowByKeyValue(barEditItem1.EditValue) as DataRowView;//editor.Properties.GetDataSourceRowByKeyValue(cboCallType.EditValue) as DataRowView; if (dr != null) { string sStr = dr["Type"].ToString(); m_sType = sStr.Substring(0, 1); getData(sStr.ToString()); } } else { m_sType = string.Empty; DGVTrans.DataSource = null; DGvTransView.Columns.Clear(); } }
private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (cboLead.EditValue == null || Convert.ToInt32(CommFun.IsNullCheck(cboLead.EditValue.ToString(), CommFun.datatypes.vartypenumeric)) < 0) { MessageBox.Show("Select Lead Name"); cboLead.Focus(); return; } if (txtdate.EditValue == null || Convert.ToInt32(CommFun.IsNullCheck(txtdate.EditValue.ToString(), CommFun.datatypes.vartypenumeric)) < 0) { MessageBox.Show("Select Block Date"); txtdate.Focus(); return; } string d = DateTime.Now.ToString("dd-MMM-yyyy"); string d1 = string.Format(Convert.ToDateTime(txtdate.EditValue).ToString("dd-MMM-yyyy")); //if (Convert.ToDateTime(txtdate.EditValue) >= DateTime.Now) { } if (Convert.ToDateTime(d1) >= Convert.ToDateTime(d)) { } else { MessageBox.Show("Date Earlier Than Current Date"); txtdate.Focus(); return; } UpdateData(); Close(); }
private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { m_lFeatureId = Convert.ToInt32(CommFun.IsNullCheck(TransView.GetRowCellValue(TransView.FocusedRowHandle, "FeatureId"), CommFun.datatypes.vartypenumeric)); DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { if (m_lFBL.CheckUsed(m_lFeatureId) == false) { m_lFBL.DeleteFeature(m_lFeatureId); TransView.DeleteRow(TransView.FocusedRowHandle); } else { MessageBox.Show("Do Not Delete ! Already Used?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Information); return; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void cboProject_EditValueChanged(object sender, EventArgs e) { DataTable dtLand = new DataTable(); if (Convert.ToInt32(cboProject.EditValue) > 0) { m_iCCId = Convert.ToInt32(cboProject.EditValue); dtLand = LeadBL.GetBusinessType(m_iCCId); if (dtLand.Rows.Count > 0) { m_sBussinessType = CommFun.IsNullCheck(dtLand.Rows[0]["BusinessType"], CommFun.datatypes.vartypestring).ToString(); m_iLandId = Convert.ToInt32(CommFun.IsNullCheck(dtLand.Rows[0]["LandId"], CommFun.datatypes.vartypenumeric)); if (m_sBussinessType == "B") { lblProject.Text = "Project - Apartment"; } else if (m_sBussinessType == "L") { lblProject.Text = "Project - Plot"; } } PopulateLead(); PopulateFlat(); } }
private void btnPayment_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { m_sFlatNo = CommFun.IsNullCheck(FlatView.GetFocusedRowCellValue("FlatNo"), CommFun.datatypes.vartypestring).ToString(); frmFiscalPayment frm = new frmFiscalPayment(); frm.Execute(FlatId, m_sFlatNo, "P"); }
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; } } }
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(); }
private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { grdViewReceipt.FocusedRowHandle = grdViewReceipt.FocusedRowHandle + 1; UpdateValue(); m_bOk = true; m_dValue = Convert.ToDecimal(CommFun.IsNullCheck(grdViewReceipt.Columns["PaidNetAmount"].SummaryText, CommFun.datatypes.vartypenumeric)); this.Close(); }
private void DGvTransView_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { if (grdCallSheetView.FocusedRowHandle < 0) { return; } txtRemarks.EditValue = CommFun.IsNullCheck(grdCallSheetView.GetFocusedRowCellValue("Remarks"), CommFun.datatypes.vartypestring).ToString(); }
private void grdNarrationView_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e) { int PRow = grdNarrationView.FocusedRowHandle; int NarrId = Convert.ToInt32(CommFun.IsNullCheck(grdNarrationView.GetFocusedRowCellValue("NarrationId"), CommFun.datatypes.vartypenumeric)); string NarrDescription = Convert.ToString(CommFun.IsNullCheck(grdNarrationView.GetFocusedRowCellValue("Description"), CommFun.datatypes.vartypestring)); ReceiptDetailBL.InsertNarrationMaster(NarrId, NarrDescription); grdNarrationView.FocusedRowHandle = PRow; }