Ejemplo n.º 1
0
 public void AddItem(long id, string name, double price, int recept_number, receptData rdata, int count)
 {
     if (count <= GetCountOfItem(name) || count <= 0)
     {
         MessageBox.Show("Ошибка, товаров не осталось на складе", "Error");
         return;
     }
     if (IncItemCount(name, price) < 0)
     {
         listItem item;
         item.name        = name;
         item.count       = 1;
         item.price       = price;
         item.id_in_table = id;
         item.recept_id   = recept_number;
         item.recept      = rdata;
         items.Add(item);
     }
     RedrawList();
 }
Ejemplo n.º 2
0
 public DataTable AddRecept(int rec_num, receptData rec)
 {
     return(SendQuery("INSERT INTO RECEPT VALUES(gen_id(GEN_RECEPT_ID, 1)," + rec_num.ToString() + ",'" + rec.fio + "','" + rec.end_date + "','" + rec.prep_name + "');"));
 }