コード例 #1
0
 public VMOvertimeApprovalChild GetConveretedOTList(VMOvertimeApprovalChild vmOvertimeApprovalChild, VHR_EmployeeProfile employee, MonthData monthData, PayrollPeriod payrollPeriod)
 {
     vmOvertimeApprovalChild.EmpID              = employee.PEmployeeID;
     vmOvertimeApprovalChild.EmpNo              = employee.OEmpID;
     vmOvertimeApprovalChild.EmployeeName       = employee.EmployeeName;
     vmOvertimeApprovalChild.OvertimePolicyID   = employee.OTPolicyID;
     vmOvertimeApprovalChild.OvertimePolicyName = employee.OTPolicyName;
     vmOvertimeApprovalChild.EncashableSingleOT = ATAssistant.GetTimeHours(monthData.EncashbaleSingleOT);
     vmOvertimeApprovalChild.EncashableDoubleOT = ATAssistant.GetTimeHours(monthData.EncashbaleDoubleOT);
     vmOvertimeApprovalChild.CPLConvertedOT     = ATAssistant.GetTimeHours(monthData.CPLConversionOT);
     vmOvertimeApprovalChild.NormalOT           = ATAssistant.GetTimeHours(monthData.TNOT);
     vmOvertimeApprovalChild.RestOT             = ATAssistant.GetTimeHours(monthData.TROT);
     vmOvertimeApprovalChild.GZOT = ATAssistant.GetTimeHours(monthData.TGZOT);
     vmOvertimeApprovalChild.CPLConvertedOTDays = monthData.CPLConvertedDays;
     vmOvertimeApprovalChild.PayrollPeriodID    = payrollPeriod.PPayrollPeriodID;
     vmOvertimeApprovalChild.PayrollPeriodName  = payrollPeriod.PRName;
     vmOvertimeApprovalChild.StatusID           = monthData.MonthDataStageID;
     return(vmOvertimeApprovalChild);
 }
コード例 #2
0
        public VMEditMonthlyAttendance GetMonthlyAttendanceAttributes(List <VAT_MonthlySummary> MonthlyAttendance, int PayrollID)
        {
            VMEditMonthlyAttendance          entries = new VMEditMonthlyAttendance();
            List <EditMonthlyAttendanceList> list    = new List <EditMonthlyAttendanceList>();
            int count = 1;

            foreach (var item in MonthlyAttendance)
            {
                EditMonthlyAttendanceList eal = new EditMonthlyAttendanceList();
                eal.EmployeeID = (int)item.EmployeeID;
                eal.No         = count;
                count++;
                eal.EmpNo        = item.OEmpID;
                eal.EmpName      = item.EmployeeName;
                eal.JobTitleName = item.JobTitleName;
                eal.TotalDays    = 0;
                eal.PaidDays     = 0;
                eal.AbsentDays   = 0;

                eal.RestDays  = (float)item.RestDays;
                eal.LeaveDays = (float)item.LeaveDays;
                if (item.AbsentDays != null)
                {
                    eal.AbsentDays = (float)item.AbsentDays;
                }
                if (item.WorkDays != null)
                {
                    eal.PaidDays = (float)item.WorkDays;
                }
                if (item.TotalDays != null)
                {
                    eal.TotalDays = (float)item.TotalDays;
                }
                if (item.WOPLeavesDays != null)
                {
                    eal.LWOPDays = (float)item.WOPLeavesDays;
                }
                //if (item.TNOT != null)
                //{
                //    eal.NOT = ATAssistant.GetTimeHours(item.TNOT);
                //}
                if (item.EncashbaleSingleOT != null)
                {
                    eal.SingleEncashableOT = ATAssistant.GetTimeHours(item.EncashbaleSingleOT);
                }
                //if (item.TROT != null)
                //{
                //    eal.ROT = ATAssistant.GetTimeHours(item.TROT);
                //}
                if (item.EncashbaleDoubleOT != null)
                {
                    eal.DoubleEncashableOT = ATAssistant.GetTimeHours(item.EncashbaleDoubleOT);
                }
                //if (item.TGZOT != null)
                //{
                //    eal.GOT = ATAssistant.GetTimeHours(item.TGZOT);
                //}
                if (item.CPLConversionOT != null)
                {
                    eal.CPLOT = ATAssistant.GetTimeHours(item.CPLConversionOT);
                }
                //if (item.TotalOT != null)
                //{
                //    eal.TotalOT = ATAssistant.GetTimeHours(item.TotalOT);
                //}
                if (item.Remarks == null)
                {
                    eal.Remarks = "";
                }
                else
                {
                    eal.Remarks = item.Remarks;
                }
                list.Add(eal);
            }
            //list.Add(GetTotalCount(list));
            // entries.Locations = locs;
            entries.MonthlyList    = list.OrderBy(aa => aa.EmployeeID).ToList();
            entries.Count          = list.Count;
            entries.PayrolPeriodID = PayrollID;
            //entries.PayrollName = PRName;
            return(entries);
        }