private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Vendor-Grade-Master-Delete") == false) { MessageBox.Show("No Rights to Vendor-Grade-Master-Delete"); return; } if (TransView.FocusedRowHandle >= 0) { if (TransView.IsNewItemRow(TransView.FocusedRowHandle) == true) { return; } if (TransView.FocusedRowHandle != TransView.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(TransView.GetRowCellValue(TransView.FocusedRowHandle, "GradeId")); m_oGrade.DeleteGrade(Id); //grdTrans.Rows.RemoveAt(grdTrans.CurrentRow.Index); TransView.DeleteRow(TransView.FocusedRowHandle); } } }
private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (TransView.RowCount > 0) { if (TransView.FocusedRowHandle >= 0) { if (TransView.GetRowCellValue(TransView.FocusedRowHandle, "Status").ToString() == "Register") { MessageBox.Show("Registration Not Delete"); return; } int Id = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "RegTransID")); int lVendorId = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "VendorId")); if (Id != m_oRegister.GetMaxRegTransId(lVendorId)) { MessageBox.Show("Do Not Delete!"); return; } DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { m_oRegister.DeleteRegTrans(Id); TransView.DeleteRow(TransView.FocusedRowHandle); //grdTrans.Rows.RemoveAt(grdTrans.CurrentRow.Index); m_oRegUpdate.UpdateRegistration(lVendorId); } } } }
private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Location-Delete") == false) { MessageBox.Show("No Rights to Location-Edit"); return; } bool status = false; int CityId = Convert.ToInt32(TransView.GetFocusedRowCellValue("CityId")); status = m_oCity.CheckCity(CityId); if (status == false) { MessageBox.Show("Already Used, Do Not Delete", "Vendor", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { m_oCity.DeleteCity(CityId); TransView.DeleteRow(TransView.FocusedRowHandle); } } }
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 toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { int StateId = Convert.ToInt32(TransView.GetFocusedRowCellValue("StateId")); bool status = m_oState.CheckState(StateId); if (status == false) { MessageBox.Show("Already Used, Do Not Delete", "Vendor", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { m_oState.DeleteState(StateId); TransView.DeleteRow(TransView.FocusedRowHandle); } } }
private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (BsfGlobal.FindPermission("Vendor-Assessment-Master-Delete") == false) { MessageBox.Show("No Rights to Vendor-Assessment-Master-Delete"); return; } if (TransView.FocusedRowHandle < 0) { return; } int Id = 0; if (TransView.GetRowCellValue(TransView.FocusedRowHandle, "CheckListId").ToString() == "") { TransView.DeleteRow(TransView.FocusedRowHandle); return; } Id = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "CheckListId")); if (m_oCheckList.CheckListFound(Id) == true) { MessageBox.Show("Already Used, Do Not Delete"); return; } DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (reply == DialogResult.Yes) { m_oCheckList.DeleteCheckList(Id); TransView.DeleteRow(TransView.FocusedRowHandle); } }