public EditEmployeeViewModel GetEmployeeProfile(string IDNO) { DALProfile _profile = new DALProfile(); GetEmployeeProfileModel _model = _profile.GetEmployeeProfile(IDNO); EditEmployeeViewModel _employee = new EditEmployeeViewModel(); _employee.FirstName = _model.FirstName; _employee.MiddleName = _model.MiddleName; _employee.LastName = _model.LastName; byte[] IDs = GetPositionStatusIDs(_model.Position, _model.EmploymentStatus); _employee.PositionTitleID = IDs[0]; _employee.Position = _profile.GetPositionTitles(); _employee.EmploymentStatusId = IDs[1]; _employee.EmploymentStatus = _profile.GetEmploymentStatus(); int space = _model.HireDate.ToString().IndexOf(" "); _employee.DateHired = _model.HireDate.ToString().Remove(space); _employee.CardNo = _model.CardNo; _employee.isActive = _model.isActive; _employee.IsLocked = _model.IsLocked; _employee.DepartmentId = _model.DepartmentId; _employee.CivilStatusId = _model.CivilStatusId; _employee.Gender = _model.Gender; _employee.Email = _model.Email; return _employee; }
public IEnumerable<EmploymentStatusModel> GetEmploymentStatus() { DALProfile _profile = new DALProfile(); return _profile.GetEmploymentStatus(); }