Beispiel #1
0
        public List <LoopTask> ProcessLoopTask(List <LOOP_TASK> tasks)
        {
            List <LoopTask> LoopTasks = new List <LoopTask>();

            foreach (LOOP_TASK task in tasks)
            {
                LoopTask loopTask = new LoopTask((int)task.ID);
                LoopTasks.Add(loopTask);
            }
            return(LoopTasks);
        }
 public bool ReadById()
 {
     try
     {
         Data.LOOP_TASK_SCHEDULE loopTaskSchedule = Connection.ProcessSA_DB.LOOP_TASK_SCHEDULE.First(lts => lts.ID == Id);
         Id           = (int)loopTaskSchedule.ID;
         LoopTask     = new LoopTask((int)loopTaskSchedule.ID);
         DayOfWeek    = (int?)loopTaskSchedule.ID_DAYOFWEEK;
         DayOfMonth   = (int?)loopTaskSchedule.DAYOFMONTH;
         IdMonth      = (int?)loopTaskSchedule.ID_MONTH;
         NumberOfWeek = (int?)loopTaskSchedule.NUMBEROFWEEK;
         return(true);
     }
     catch (Exception e)
     {
         log.Error("Ha ocurrido un error durante la lectura de LoopTaskSchedule, Id: " + Id, e);
         return(false);
     }
 }