private void btnNew_Click(object sender, EventArgs e)
        {
            FrmEmployee frm = new FrmEmployee();

            this.Hide();
            frm.ShowDialog();
            this.Visible = true;
        }
        private void btnNew_Click(object sender, EventArgs e)
        {
            FrmEmployee frm = new FrmEmployee();

            this.Hide();
            frm.ShowDialog();
            this.Visible = true;
            FillAllData();
            ClearFilters();
        }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (detail.EmployeeID == 0)
     {
         MessageBox.Show("Please select Employee from the table!");
     }
     else
     {
         FrmEmployee frm = new FrmEmployee();
         frm.isUpdated = true;
         frm.detail    = detail;
         this.Hide();
         frm.ShowDialog();
         this.Visible = true;
         FillAllData();
         ClearFilters();
     }
 }
Example #4
0
 private void btnEmployee_Click(object sender, EventArgs e)
 {
     if (!UserStatic.isAdmin)
     {
         EmployeeDTO       dto    = EmployeeBLL.GetAll();
         EmployeeDetailDTO detail = dto.Employees.First(x => x.EmployeeID == UserStatic.EmployeeID);
         FrmEmployee       frm    = new FrmEmployee();
         frm.detail   = detail;
         frm.isUpdate = true;
         this.Hide();
         frm.ShowDialog();
         this.Visible = true;
     }
     else
     {
         FrmEmployeeList frm = new FrmEmployeeList();
         this.Hide();
         frm.ShowDialog();
         this.Visible = true;
     }
 }