Пример #1
0
        public void SaveEmployeeWorkingModel2(List<EmployeePlanningWeek> lstWeeks)
        {
            if (lstWeeks == null || lstWeeks.Count == 0) return;
            List<EmployeePlanningWorkingModel> lstEntities = new List<EmployeePlanningWorkingModel>(lstWeeks.Count*10);
            
            long[] ids = new long[lstWeeks.Count];
            int index = 0;
            DateTime begin, end;

            begin = lstWeeks[0].BeginDate;
            end = lstWeeks[0].EndDate;

            foreach (EmployeePlanningWeek week in lstWeeks)
            {
                ids[index++] = week.EmployeeId;

                List<EmployeePlanningWorkingModel> lst = PlanningWeekProcessor.GetWorkingModels(week);
                if (lst != null && lst.Count > 0)
                    lstEntities.AddRange(lst);


                
            }
            //SaveEmployeesWorkingModel(ids, lstEntities, begin,end);

        }
Пример #2
0
        public void SaveEmployeeWorkingModel(EmployeePlanningWeek week)
        {
            List<EmployeePlanningWorkingModel> lst = PlanningWeekProcessor.GetWorkingModels(week);

            SaveEmployeeWorkingModel(week.EmployeeId, lst, week.BeginDate, week.EndDate);
        }