public void ModelNoDelete(decimal ModelNoId) { try { SpModelNo.ModelNoDelete(ModelNoId); } catch (Exception ex) { MessageBox.Show("MN6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to delete /// </summary> public void DeleteFunction() { try { ModelNoSP spModelNo = new ModelNoSP(); if (spModelNo.ModelNoCheckReferenceAndDelete(decModelNo) <= 0) { Messages.ReferenceExistsMessage(); } else { spModelNo.ModelNoDelete(Convert.ToDecimal(dgvModalNo.CurrentRow.Cells[1].Value.ToString())); Clear(); Messages.DeletedMessage(); } } catch (Exception ex) { MessageBox.Show("MN6" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }