Пример #1
1
 private void button1_Click(object sender, EventArgs e)
 {
     int DesignationId = 0;
     int.TryParse(txtDesignationID.Text, out DesignationId);
     var designation_obj = new Designation
     {
         Id = DesignationId,
         Name = txtDesignationName.Text
     };
     var designationDao = new DesignationDao();
     designationDao.SaveDesignation(designation_obj);
     ShowDesignations();
 }
Пример #2
0
        private void Employees_Load(object sender, EventArgs e)
        {
            var designationDao = new DesignationDao();
            var roleDao = new RoleDao();

            cmbRoles.DataSource = roleDao.GetAllRoles();
            cmbDesignations.DataSource = designationDao.GetAllDesignations();

            ShowEmployees();
        }
Пример #3
0
 private void ShowDesignations()
 {
     var designationDao = new DesignationDao();
     dgvDesignation.DataSource = designationDao.GetAllDesignations();
 }