ok #42
|
@ -2454,23 +2454,26 @@ namespace HRM.DA
|
||||||
DataSet EmpOTHours = new ShiftTermService().GetEmpOT(oPayrollType.NextPayProcessDate, trm.ID);
|
DataSet EmpOTHours = new ShiftTermService().GetEmpOT(oPayrollType.NextPayProcessDate, trm.ID);
|
||||||
foreach (DataRow Dr in EmpOTHours.Tables[0].Rows)
|
foreach (DataRow Dr in EmpOTHours.Tables[0].Rows)
|
||||||
{
|
{
|
||||||
Employee tempEmployee = employees.Where(emp => emp.ID.ToString() == Dr["EmployeeID"].ToString()).FirstOrDefault();
|
//if (Convert.ToDouble(Dr["TotalOT"])>0)
|
||||||
if (tempEmployee == null || tempEmployee.IsEligibleOT == false) continue;
|
//{
|
||||||
|
Employee tempEmployee = employees.Where(emp => emp.ID.ToString() == Dr["EmployeeID"].ToString()).FirstOrDefault();
|
||||||
if (tempEmployee.GradeID == null)
|
if (tempEmployee == null || tempEmployee.IsEligibleOT == false) continue;
|
||||||
{
|
|
||||||
ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "Grade not assinged"));
|
|
||||||
continue;
|
|
||||||
|
|
||||||
}
|
if (tempEmployee.GradeID == null)
|
||||||
if (Dr["TotalOT"] == DBNull.Value)
|
{
|
||||||
{
|
ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "Grade not assinged"));
|
||||||
// ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "value can't be null "));
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
EmpOverTimes = MakeEmployeeOvertimeObj(ref EmpOverTimes, ref ErrorList, tempEmployee, termParameters,
|
}
|
||||||
oPayrollType, trm.ID, Convert.ToDouble(Dr["TotalOT"]), userid);
|
if (Dr["TotalOT"] == DBNull.Value)
|
||||||
|
{
|
||||||
|
// ErrorList.Add(new SalaryProcessStatus(tempEmployee.EmployeeNo, tempEmployee.Name, "value can't be null "));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
EmpOverTimes = MakeEmployeeOvertimeObj(ref EmpOverTimes, ref ErrorList, tempEmployee, termParameters,
|
||||||
|
oPayrollType, trm.ID, Convert.ToDouble(Dr["TotalOT"]), userid);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user