public DASHBOARD_ATTENDANCE_LOG GET_DASHBOARD_ATTENDANCE_LOG(string FactoryCd, String Line) { DASHBOARD_ATTENDANCE_LOG DASHBOARD_ATTENDANCE_log = new DASHBOARD_ATTENDANCE_LOG(); DASHBOARD_ATTENDANCE_log = dashboarddal.GET_DASHBOARD_ATTENDANCE_LOG(FactoryCd, Line); return(DASHBOARD_ATTENDANCE_log); }
public DASHBOARD_ATTENDANCE_LOG GET_DASHBOARD_ATTENDANCE_LOG_DATE(string FACTORY_CD, String LINE_CODE) { DASHBOARD_ATTENDANCE_LOG GET_DASHBOARD_ATTENDANCE_log = new DASHBOARD_ATTENDANCE_LOG(); GET_DASHBOARD_ATTENDANCE_log = dashboarddal.GET_DASHBOARD_ATTENDANCE_LOG(FACTORY_CD, LINE_CODE); return(GET_DASHBOARD_ATTENDANCE_log); }
public string GETEMPLOYEEATTENDTIMEINSERT(string FACTORY_CD, String LINE_CODE, string HR_MAX_TIME_DIFFERENCE, string HR_REFRESH_INTERVAL) { DateTime dateFrom; DateTime dateTo; try //string HR_MAX_TIME_DIFFERENCE; HR_REFRESH_INTERVAL { //var HRSend_queue = System.Configuration.ConfigurationManager.AppSettings["ESB_HRSend_queue"]; int HR_MAX_TIME_DIFFERENCE_INT = int.Parse(HR_MAX_TIME_DIFFERENCE); DASHBOARD_ATTENDANCE_LOG GET_DASHBOARD_ATTENDANCE_log = GET_DASHBOARD_ATTENDANCE_LOG_DATE(FACTORY_CD, LINE_CODE); if (GET_DASHBOARD_ATTENDANCE_log.FROM_TIME == null) { dateTo = DateTime.Now; dateFrom = dateTo.AddHours(-12); } else { dateFrom = (DateTime)GET_DASHBOARD_ATTENDANCE_log.FROM_TIME; //dateFrom = dateFrom.AddHours(-2); dateTo = (DateTime)GET_DASHBOARD_ATTENDANCE_log.TO_TIME; if (dateFrom < dateTo.AddHours(-1 * HR_MAX_TIME_DIFFERENCE_INT)) { if (dateFrom < dateTo.AddHours(-12)) { dateFrom = dateTo.AddHours(-12); } else { dateTo = dateFrom.AddHours(HR_MAX_TIME_DIFFERENCE_INT); } } //dateFrom = dateTo.AddHours(-1); } //List<DASHBOARD_EMPLOYEE_ATTENDTIME> EmployeeCheckTime = new List<DASHBOARD_EMPLOYEE_ATTENDTIME>(); //EmployeeCheckTime = ProcessHRData(dateFrom, dateTo); //dateTo = DateTime.Now; // dateTo = dateTo.AddHours(-24); //dateFrom = dateFrom.AddHours(-5); if (ProcessHRData(FACTORY_CD, LINE_CODE, dateFrom, dateTo) == false) { return("{\"SUCCESS\":false}"); } else { return("{\"SUCCESS\":true}"); } } catch (Exception ex) { return("{\"SUCCESS\":false}"); } finally { } }