// add cupies
        private void Add_cupiesBtr(object sender, RoutedEventArgs e)
        {
            if (Checks.isTextInt(AmountTxt.Text))//add by yahav
            {
                item.AddCopies(int.Parse(AmountTxt.Text));

                System.Windows.Forms.MessageBox.Show("Stock Added!", "Sucess");
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("Number Is not Valid!!", "Eroor");
                AmountTxt.Text = "";
            }
        }
Exemple #2
0
 // add copies
 private void addCopBtn_Click(object sender, RoutedEventArgs e)
 {
     _newCopiesId = _foundedItem.AddCopies(_numOfcopies);
     if (_newCopiesId == null)
     {
         errorTbl.Text = "Error: nothing added";
     }
     else
     {
         DisableAddCopiesControllers();
         StringBuilder representCopyId = new StringBuilder();
         foreach (var item in _newCopiesId)
         {
             representCopyId.AppendLine(item.ToString());
         }
         newCopiesId.Visibility = Visibility.Visible;
         newCopiesId.Text       = representCopyId.ToString();
         finishBtn.Visibility   = Visibility.Visible;
     }
 }