Example #1
0
 public AddSalaryForm(otchet_zp zp)
 {
     otchet = zp;
     InitializeComponent();
     textBox1.Text = otchet.id_doctor.ToString();
     textBox3.Text = otchet.data_ozp.ToString();
     textBox4.Text = otchet.hours.ToString();
     textBox5.Text = otchet.zp.ToString();
 }
Example #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms.Count == 2)
     {
         List <otchet_zp> query = (from z in db.otchet_zp
                                   select z).ToList();
         otchet_zp     item = query.First(w => w.id_doctor.ToString() == dataGridView1.SelectedCells[0].OwningRow.Cells[0].Value.ToString());
         AddSalaryForm s    = new AddSalaryForm(item);
         s.Owner = this;
         s.Show();
     }
     else
     {
         Application.OpenForms[2].Focus();
     }
 }