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 bool NewEmployee(NewEmployeeViewModel model, string rowmodifiedby) { DALProfile _profile = new DALProfile(); GenericProvider.HashStore.CustomHash _hash = new GenericProvider.HashStore.CustomHash(); model.RegularizationDate = model.DateHired.Value.AddDays(180); return _profile.SaveEmployee(model, _hash.ComputeHash(model.Password), _hash.saltValue, rowmodifiedby); }
public GenericProvider.Paging.PagedData<ProfileModel> GetProfileList(int page, int pagesize) { DALProfile _profile = new DALProfile(); var _profileList = new GenericProvider.Paging.PagedData<ProfileModel>(); var _tempProfileList = _profile.GetProfileList(); _profileList.Data = _tempProfileList.Skip(pagesize * (page - 1)).Take(pagesize).ToList(); _profileList.NumberOfPages = Convert.ToInt32(Math.Ceiling((double)_tempProfileList.Count() / pagesize)); _profileList.CurrentPage = page; return _profileList; }
public LeaveSummaryModel GetLeaveInfoSummary(int leaveID) { DALProfile _profile = new DALProfile(); DALLeave _leave = new DALLeave(); LeaveViewModel temp = _leave.GetLeaveInfo(leaveID); var profile = _profile.GetEmployeeProfile(temp.EmployeeIDNO); string name = profile.LastName + ", " + profile.FirstName + " " + profile.MiddleName; string manager = _leave.GetManagerName(leaveID); LeaveSummaryModel model = new LeaveSummaryModel(); model.EmployeeName = name; model.Manager = manager; model.Address = temp.Address; model.DateFiled = temp.DateFiled; model.DateOfLeaveFrom = temp.DateOfLeaveFrom; model.DateOfLeaveTo = temp.DateOfLeaveTo; model.DateResponded = temp.DateResponded; model.DurationInDays = temp.DurationInDays; model.DurationInHours = temp.DurationInHours; model.EmployeeIDNO = temp.EmployeeIDNO; model.EmploymentStatus = profile.EmploymentStatus; model.LeaveID = temp.LeaveID; model.LeaveStatus = temp.LeaveStatus; model.LeaveType = temp.LeaveType; model.Reason = temp.Reason; model.RemarksForEmployee = temp.RemarksForEmployee; model.RemarksForHR = temp.RemarksForHR; model.RespondedBy = temp.RespondedBy; return model; }
public LeaveViewModel GetLeaveInfo(int leaveID) { DALProfile _profile = new DALProfile(); DALLeave _leave = new DALLeave(); LeaveViewModel temp = _leave.GetLeaveInfo(leaveID); var profile = _profile.GetEmployeeProfile(temp.EmployeeIDNO); string name = profile.LastName + ", " + profile.FirstName + " " + profile.MiddleName; string manager = _leave.GetManagerName(leaveID); temp.EmployeeName = name; temp.Manager = manager; return temp; }
public bool IsUserExists(string IDNO) { DALProfile _profile = new DALProfile(); return _profile.IsUserExists(IDNO); }
public bool UpdateEmployeeProfile(EditEmployeeViewModel model, string rowmodifiedby) { DALProfile _profile = new DALProfile(); return _profile.UpdateEmployeeProfile(model, rowmodifiedby); }
public IEnumerable<DepartmentModel> GetDepartmentNames() { DALProfile _profile = new DALProfile(); return _profile.GetDepartmentNames(); }
public IEnumerable<CivilStatusModel> GetCivilStatus() { DALProfile _profile = new DALProfile(); return _profile.GetCivilStatus(); }
public IEnumerable<EmploymentStatusModel> GetEmploymentStatus() { DALProfile _profile = new DALProfile(); return _profile.GetEmploymentStatus(); }
public IEnumerable<PositionModel> GetPositionTitles() { DALProfile _profile = new DALProfile(); return _profile.GetPositionTitles(); }