Exemple #1
0
        public ActionResult UpdateData(string termCode)
        {
            var schedule = new ScheduleController(_scheduleService, _termService, _mappingService, _collegeService, _educationalGroupService
                                                  , _professorService, _educationalClassService, _studentEducationalClassService, _professorScoreService
                                                  , _indicatorService, _mappingTypeService, _universityLevelMappingService, _educationalGroupScoreService
                                                  , _logService, _logTypeService, _userService);
            var sch = schedule.GetSchedule();

            //System.IO.File.AppendAllLines(System.AppDomain.CurrentDomain.BaseDirectory + "log.txt", new string[] { "Test Action 0 at: " + DateTime.Now });
            if (!string.IsNullOrEmpty(sch.ActionMethod) && sch.ActionMethod.LastIndexOf('.') > 0)
            {
                schedule.RunSchedule(sch, true, ((Web.Models.User)Session["UserInfo"]).Username, termCode);
            }
            return(null);
        }
Exemple #2
0
        public ActionResult SetScheduleTime(string timeSpan, string measurement)
        {
            decimal ts = 0;

            if (decimal.TryParse(timeSpan, out ts) && ts > 0)
            {
                var schedule = new ScheduleController(_scheduleService, _termService, _mappingService, _collegeService, _educationalGroupService
                                                      , _professorService, _educationalClassService, _studentEducationalClassService, _professorScoreService
                                                      , _indicatorService, _mappingTypeService, _universityLevelMappingService, _educationalGroupScoreService
                                                      , _logService, _logTypeService, _userService);
                var sch = schedule.GetSchedule();
                sch.TimeLapse            = ts;
                sch.TimeLapseMeasurement = measurement;
                schedule.AddOrUpdateSchedule(sch);
            }
            return(null);
        }