Beispiel #1
0
        public decimal ModelNoCheckReferenceAndDelete(decimal decModelNoId)
        {
            decimal decReturnValue = 0;

            try
            {
                decReturnValue = SpModelNo.ModelNoCheckReferenceAndDelete(decModelNoId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MN5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decReturnValue);
        }
Beispiel #2
0
 /// <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);
     }
 }