Ejemplo n.º 1
0
 private void DAdd_Click(object sender, EventArgs e)
 {
     validation2();
     if (DName.Text != "" && DRent.Text != "" && errorProvider1.GetError(groupBox4) == "")
     {
         if (DReserv.Checked)
         {
             m = true;
         }
         else
         {
             m = false;
         }
         Dept d = new Dept(DName.Text, int.Parse(DRent.Text), m, depid);
         d.Add();
         notifyIcon1.ShowBalloonTip(2000, "Welcome", "Dept Added", ToolTipIcon.Info);
         ShowItem(3, "Dept_db", this.deptlst);
     }
 }