Beispiel #1
0
        public addandedit(int id)
        {
            Id = id;
            InitializeComponent();
            btnaaeadd.Visible = false;
            BolBol bb = new BolBol(id);

            txtfiopac.Text = bb.FIObol;
            txtbolezn.Text = bb.Bolezn;
            dtppost.Text   = Convert.ToString(bb.Prishel);
            dtpvip.Text    = Convert.ToString(bb.Ushel);
            txtdolzhn.Text = bb.DolzVracha;
            txtfiovr.Text  = bb.FIOvr;
        }
Beispiel #2
0
 private void btnaaeadd_Click(object sender, EventArgs e)
 {
     try
     {
         BolBol bb = new BolBol();
         bb.FIObol     = txtfiopac.Text;
         bb.Bolezn     = txtbolezn.Text;
         bb.Prishel    = Convert.ToDateTime(dtppost.Text);
         bb.Ushel      = Convert.ToDateTime(dtpvip.Text);
         bb.DolzVracha = txtdolzhn.Text;
         bb.FIOvr      = txtfiovr.Text;
         bb.Save();
         Close();
     }
     catch
     {
         MessageBox.Show("Заполните все поля", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }