private void GetFocusedRowData(int index) { if (index >= 0 && EmployeeView.RowCount > 0) { EmployeeView.FocusedRowHandle = index; btnSave.Enabled = false; btnAddNew.Enabled = btnModify.Enabled = true; txtEmpCode.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.EmployeeCode.ToString()).ToString(); txtEmpName.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.EmployeeName.ToString()).ToString(); txtAddress.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.Address.ToString()).ToString(); cmbCity.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.CityName.ToString()).ToString(); cmbCountry.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.CountryName.ToString()).ToString(); cmbMaritalStatus.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.MaritalStatus.ToString()).ToString(); cmbJob.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.JobName.ToString()).ToString(); if (EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.ManagerName.ToString()).ToString() == "") { chkManager.Checked = true; } else { chkManager.Checked = false; cmbManager.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.ManagerName.ToString()).ToString(); } BirthDate.EditValue = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.BirthDate.ToString()); HireDate.EditValue = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.HireDate.ToString()); EmpImage.Image = (Image)EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.Image.ToString()); txtEmail.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.Email.ToString()).ToString(); txtLinkedIn.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.LinkedIn.ToString()).ToString(); txtFaceBook.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.FaceBook.ToString()).ToString(); txtMobile1.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.Mobile1.ToString()).ToString(); txtMobile2.Text = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.Mobile2.ToString()).ToString(); spFixedSalary.EditValue = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.FixedSalary.ToString()); spMotivateSalary.EditValue = EmployeeView.GetRowCellValue(index, EmployeeManager.EmployeeDetails.MotivateSalary.ToString()); } }