/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { CounterSP spCounter = new CounterSP(); if (spCounter.CounterCheckReferenceAndDelete(decCounterId) <= 0) { Messages.ReferenceExistsMessage(); } else { spCounter.CounterDelete(Convert.ToDecimal(dgvCounter.CurrentRow.Cells[1].Value.ToString())); Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { MessageBox.Show("CT6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { CounterSP spCounter = new CounterSP(); if (spCounter.CounterCheckReferenceAndDelete(decCounterId) <= 0) { Messages.ReferenceExistsMessage(); } else { spCounter.CounterDelete(Convert.ToDecimal(dgvCounter.CurrentRow.Cells[1].Value.ToString())); Messages.DeletedMessage(); Clear(); } } catch (Exception ex) { formMDI.infoError.ErrorString = "CT6" + ex.Message; } }