Exemple #1
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;
        }
Exemple #2
0
        public IEnumerable<LeaveViewModel> GetAllLeaves()
        {
            DALLeave _leave = new DALLeave();

            var leaves = _leave.GetAllLeaves();
            
            foreach(LeaveViewModel leave in leaves)
            {
                leave.Manager = _leave.GetManagerName(leave.LeaveID);
            }

            return leaves;
        }
Exemple #3
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;
        }