Esempio n. 1
0
 /// <summary>
 /// Function to save
 /// </summary>
 public void SaveFunction()
 {
     try
     {
         ModelNoSP   spModelNo   = new ModelNoSP();
         ModelNoInfo infoModelNo = new ModelNoInfo();
         infoModelNo.ModelNo   = txtModalNo.Text.Trim();
         infoModelNo.Narration = txtNarration.Text.Trim();
         infoModelNo.Extra1    = string.Empty;
         infoModelNo.Extra2    = string.Empty;
         if (spModelNo.ModelCheckIfExist(txtModalNo.Text.Trim().ToString(), 0) == false)
         {
             decIdForOtherForms = spModelNo.ModelNoAddWithDifferentModelNo(infoModelNo);
             if (decIdForOtherForms > 0)
             {
                 Messages.SavedMessage();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage("Model number already exist");
             txtModalNo.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("MN3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Esempio n. 2
0
        public decimal ModelNoAddWithDifferentModelNo(ModelNoInfo modelnoinfo)
        {
            decimal decWork = 0;

            try
            {
                decWork = SpModelNo.ModelNoAddWithDifferentModelNo(modelnoinfo);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MN3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decWork);
        }