private void GetEmployeeType()
 {
     EmployeeManager emp = new EmployeeManager();
     DataTable dt = emp.DisplayUserType();
     DataRow dtRow = dt.NewRow();
     dtRow["Type"] = "--Select One--";
     dt.Rows.InsertAt(dtRow, 0);
     cboUserType.DisplayMember = "Type";
     cboUserType.ValueMember = "Id";
     cboUserType.DataSource = dt;
 }
 private void GetEmployee()
 {
     EmployeeManager emp = new EmployeeManager();
     DataTable dt = emp.DisplayEmployeesRecord();
     DataRow dtRow = dt.NewRow();
     dtRow["Name"] = "--Select One--";
     dt.Rows.InsertAt(dtRow, 0);
     cboName.DisplayMember = "Name";
     cboName.ValueMember = "Name";
     cboName.DataSource = dt;
 }
 public void DisplayEmployees()
 {
     EmployeeManager employeeMangaer = new EmployeeManager();
     DataTable dtTable = employeeMangaer.DisplayEmployeesRecord();
     dgvDisplayEmployeeRec.RowCount = dtTable.Rows.Count;
     int index=0;
     foreach(DataRow dRow in dtTable.Rows)
     {
         dgvDisplayEmployeeRec["colId", index].Value = dRow["Id"];
         dgvDisplayEmployeeRec["colName", index].Value = dRow["Name"];
         dgvDisplayEmployeeRec["colTemporaryAddress", index].Value = dRow["TemporayAddress"];
         dgvDisplayEmployeeRec["colPermanentAddress", index].Value = dRow["PermanentAddress"];
         dgvDisplayEmployeeRec["colGender", index].Value = dRow["Gender"];
         dgvDisplayEmployeeRec["colDob", index].Value = dRow["DOB"];
         dgvDisplayEmployeeRec["colNationality", index].Value = dRow["Nationality"];
         dgvDisplayEmployeeRec["colEmployeeContactNum", index].Value = dRow["EmployeeContactNum"];
         dgvDisplayEmployeeRec["colFathersName", index].Value = dRow["FathersName"];
         dgvDisplayEmployeeRec["colFathersContact", index].Value = dRow["FathersContact"];
         dgvDisplayEmployeeRec["colJoinDate", index].Value = dRow["JoinDate"];
         index++;
     }
 }