Exemplo n.º 1
0
 /// <summary>
 /// Save Function
 /// </summary>
 public void SaveFunction()
 {
     try
     {
         SizeSP   spSize   = new SizeSP();
         SizeInfo infoSize = new SizeInfo();
         infoSize.Size      = txtSize.Text.Trim();
         infoSize.Narration = txtNarration.Text.Trim();
         infoSize.Extra1    = String.Empty;
         infoSize.Extra2    = String.Empty;
         if (spSize.SizeNameCheckExistence(txtSize.Text.Trim().ToString(), 0) == false)
         {
             decIdentity = spSize.SizeAdding(infoSize);
             if (decIdentity > 0)
             {
                 Messages.SavedMessage();
                 GridFill();
                 Clear();
             }
         }
         else
         {
             Messages.InformationMessage(" Size already exist");
             txtSize.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SZ2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Function to insert values to Size Table and return the Curresponding row's Id
        /// </summary>
        /// <param name="infoSize"></param>
        /// <returns></returns>
        public decimal SizeAdding(SizeInfo infoSize)
        {
            decimal decSizeId = 0;

            try
            {
                decSizeId = spSize.SizeAdding(infoSize);
            }
            catch (Exception ex)
            {
                MessageBox.Show("SZ3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(decSizeId);
        }