示例#1
0
        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;
        }
示例#2
0
        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);
        }
示例#3
0
 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;
 }
示例#4
0
        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;
        }
示例#5
0
        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;
        }
示例#6
0
        public bool IsUserExists(string IDNO)
        {
            DALProfile _profile = new DALProfile();

            return _profile.IsUserExists(IDNO);
        }
示例#7
0
        public bool UpdateEmployeeProfile(EditEmployeeViewModel model, string rowmodifiedby)
        {
            DALProfile _profile = new DALProfile();

            return _profile.UpdateEmployeeProfile(model, rowmodifiedby);
        }
示例#8
0
 public IEnumerable<DepartmentModel> GetDepartmentNames()
 {
     DALProfile _profile = new DALProfile();
     return _profile.GetDepartmentNames();
 }
示例#9
0
 public IEnumerable<CivilStatusModel> GetCivilStatus()
 {
     DALProfile _profile = new DALProfile();
     return _profile.GetCivilStatus();
 }
示例#10
0
 public IEnumerable<EmploymentStatusModel> GetEmploymentStatus()
 {
     DALProfile _profile = new DALProfile();
     return _profile.GetEmploymentStatus();
 }
示例#11
0
 public IEnumerable<PositionModel> GetPositionTitles()
 {
     DALProfile _profile = new DALProfile();
     return _profile.GetPositionTitles();
 }