Ejemplo n.º 1
0
 private void Clear()
 {
     DishName.Clear();
     ProductPlus.Clear();
     ProductCounter.Clear();
     ListOfProducts.Clear();
     TextOfrepice.Clear();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }