コード例 #1
0
        public override void Save()
        {
            if (_employeeweeks != null && _employeeweeks.Count > 0)
            {
                //_weekservice.SaveEmployeeWeeks(_employeeweeks);
                //_dayservice.SaveEmployeeWeeks(_employeeweeks);



                long[] ids = EmployeeWeekProcessor.GetEmployeeIds(_employeeweeks);
                SrvEmployeeWeekRecordingList srv_updater_weeks = new SrvEmployeeWeekRecordingList();
                DateTime nextWeekMonday = DateTimeHelper.GetNextMonday(BeginDate);
                srv_updater_weeks.InitList(ids, BeginDate);
                SrvEmployeesRecordingDayList day_list = new SrvEmployeesRecordingDayList(ids, BeginDate);

                foreach (EmployeeWeek e_w in _employeeweeks)
                {
                    //srv_updater_weeks.UpdateSaldoAfterRecording(e_w.EmployeeId, nextWeekMonday, e_w.Saldo);
                    srv_updater_weeks.UpdateEntityAfterRecording(e_w);
                    foreach (EmployeeDay ed in e_w.DaysList)
                    {
                        day_list.CompareAndSave(ed);
                    }
                }


                EmployeeRecordingWorkingModelHelper wmhelper = new EmployeeRecordingWorkingModelHelper(_timeservice.EmployeeRecordingWorkingModelService);

                wmhelper.SaveEmployeeWorkingModel(_employeeweeks);
            }
        }
コード例 #2
0
        public override void Save()
        {
            if (_employeeweeks != null && _employeeweeks.Count > 0)
            {
                //_weekservice.SaveEmployeeWeeks(_employeeweeks);
                //_dayservice.SaveEmployeeWeeks(_employeeweeks);

                long[] ids = EmployeeWeekProcessor.GetEmployeeIds(_employeeweeks);
                SrvEmployeeWeekRecordingList srv_updater_weeks = new SrvEmployeeWeekRecordingList();
                DateTime nextWeekMonday = DateTimeHelper.GetNextMonday (BeginDate );
                srv_updater_weeks.InitList(ids, BeginDate);
                SrvEmployeesRecordingDayList day_list = new SrvEmployeesRecordingDayList(ids, BeginDate);

                foreach (EmployeeWeek e_w in _employeeweeks)
                {
                    //srv_updater_weeks.UpdateSaldoAfterRecording(e_w.EmployeeId, nextWeekMonday, e_w.Saldo);
                    srv_updater_weeks.UpdateEntityAfterRecording(e_w);
                    foreach (EmployeeDay ed in e_w.DaysList)
                        day_list.CompareAndSave(ed);
                }

                EmployeeRecordingWorkingModelHelper wmhelper = new EmployeeRecordingWorkingModelHelper(_timeservice.EmployeeRecordingWorkingModelService);

                wmhelper.SaveEmployeeWorkingModel(_employeeweeks);
            }
        }