Exemplo n.º 1
0
 private void btn_addEmp_Click(object sender, EventArgs e)
 {
     if (CurrNode.Tag != null)
     {
         this.Enabled = false;
         AddEmployeeFrm frmEmpAdd = new AddEmployeeFrm((int)CurrNode.Tag);
         frmEmpAdd.AddEmpEvent += this.HandleAddEmpEvent;
         frmEmpAdd.Show();
     }
 }
Exemplo n.º 2
0
 private void btn_empEDIT_Click(object sender, EventArgs e)
 {
     if (CurrNode.Tag != null)
     {
         this.Enabled = false;
         AddEmployeeFrm frmEmpAdd = new AddEmployeeFrm(new Employee(
                                                           (string)dg_Employee.SelectedRows[0].Cells[0].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[1].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[2].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[3].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[4].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[8].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[5].Value,
                                                           (string)dg_Employee.SelectedRows[0].Cells[6].Value,
                                                           CurrNode.Tag.ToString(),
                                                           (string)dg_Employee.SelectedRows[0].Cells[7].Value));
         frmEmpAdd.AddEmpEvent += this.HandleAddEmpEvent;
         frmEmpAdd.Show();
     }
 }