Пример #1
0
 private void Clear()
 {
     DishName.Clear();
     ProductPlus.Clear();
     ProductCounter.Clear();
     ListOfProducts.Clear();
     TextOfrepice.Clear();
 }
Пример #2
0
 /// <summary>
 /// Function clear some user elements.
 /// </summary>
 private void Clear()
 {
     Cursor.Current = Cursors.Arrow;
     DishName.Clear();
     ProductPlus.Clear();
     ProductCounter.Clear();
     ListOfProducts.Clear();
     TextOfrepice.Clear();
     Cursor.Current = Cursors.Arrow;
 }
Пример #3
0
 /// <summary>
 /// Function Add Products to the Recipe
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ProductToRecept_Click(object sender, EventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
     try
     {
         if (!product.MyProducts(ProductPlus.Text, int.Parse(ProductCounter.Text), true))
         {
             ListOfProducts.Text = string.Concat(ListOfProducts.Text, $"{ProductPlus.Text} - {ProductCounter.Text} {product.dim};\r\n");
             ProductCounter.Clear();
             ProductPlus.Clear();
         }
         else
         {
             PlusProductFunctionLabel.Text = "Добавьте продукт в закупку с количеством = 0.";
         }
     }
     catch (FormatException)
     {
         PlusProductFunctionLabel.Text = "Ошибка в формате количества.";
     }
     Cursor.Current = Cursors.Arrow;
 }