示例#1
0
 public Recept(string prepname, int rec_num)
 {
     InitializeComponent();
     tbPrep.Text   = prepname;
     out_data      = new ReceptData();
     tbRecNum.Text = rec_num.ToString();
 }
 private void bAddToQueue_Click(object sender, EventArgs e)
 {
     if (!Globals.form_check_inited)
     {
         Globals.form_check_inited = true;
         form_check = new Check(sells_master.GetFreeCheckNumber(), sells_master.GetFreeFD());
         form_check.StyleManager = this.StyleManager;
         form_check.Show();
     }
     if (dataGV.CurrentRow.Cells[5].Value.ToString() == "y")
     {
         Recept rec_confirm = new Recept(dataGV.CurrentRow.Cells[1].Value.ToString(), sells_master.GetFreeReceptID());
         rec_confirm.StyleManager = this.StyleManager;
         if (rec_confirm.ShowDialog() == DialogResult.OK)
         {
             ReceptData data = rec_confirm.GetReceptData();
             Globals.Log(data.name + " " + data.family + " " + data.patronymic);
             form_check.AddItem(int.Parse(dataGV.CurrentRow.Cells[0].Value.ToString()), dataGV.CurrentRow.Cells[1].Value.ToString(), double.Parse(dataGV.CurrentRow.Cells[4].Value.ToString()), data.recnumber, new receptData(data.name + " " + data.family + " " + data.patronymic, data.date, data.prep), int.Parse(dataGV.CurrentRow.Cells[3].Value.ToString()));
         }
     }
     else
     {
         form_check.AddItem(int.Parse(dataGV.CurrentRow.Cells[0].Value.ToString()), dataGV.CurrentRow.Cells[1].Value.ToString(), double.Parse(dataGV.CurrentRow.Cells[4].Value.ToString()), 0, new receptData(), int.Parse(dataGV.CurrentRow.Cells[3].Value.ToString()));
     }
 }