示例#1
0
 public HomeController()
 {
     _departmentDao = new DepartmentDao(SiteSettings.RepositoryPath);
     _departmentServices = new DepartmentServices();
     _cakeScheduleDao = new CakeScheduleDao(SiteSettings.RepositoryPath);
     _cakeScheduleService = new CakeScheduleServices();
 }
示例#2
0
 public HomeController(IDepartmentDao departmentDao, IDepartmentServices departmentServices,
     ICakeScheduleDao cakeScheduleDao, ICakeScheduleServices cakeScheduleServices)
 {
     _departmentDao = departmentDao;
     _departmentServices = departmentServices;
     _cakeScheduleDao = cakeScheduleDao;
     _cakeScheduleService = cakeScheduleServices;
 }
示例#3
0
        public StartPageForm(IDepartmentDao departmentDao, IDepartmentServices departmentServices,
            ICakeScheduleDao cakeScheduleDao, ICakeScheduleServices cakeScheduleServices)
        {
            _departmentDao = departmentDao;
            _departmentServices = departmentServices;
            _cakeScheduleDao = cakeScheduleDao;
            _cakeScheduleServices = cakeScheduleServices;

            BuildStartPage();
        }
 public CakeScheduleService()
 {
     InitializeComponent();
     _mailService = new MailService(_departmentServices, _appConfigReader, DateTime.Now.Date);
     _cakeSheduleDao = new CakeScheduleDao(_appConfigReader.RepositoryPath);
     _departmentDao = new DepartmentDao(_appConfigReader.RepositoryPath);
     _scheduleWorker = new ScheduleWorker(_cakeScheduleServices, _departmentServices, _mailService,
                                          _cakeSheduleDao, _departmentDao, _appConfigReader);
     _serviceLogger = new ServiceLogger(_appConfigReader.LogPath);
     _scheduleWorker.CakeScheduleFinished += ScheduleFinished;
 }
示例#5
0
        public ScheduleWorker(ICakeScheduleServices cakeScheduleServices, IDepartmentServices departmentServices,
            IMailService mailService,
            ICakeScheduleDao cakeScheduleDao, IDepartmentDao departmentDao,
            IAppConfigReader appConfigReader)
        {
            _cakeScheduleServices = cakeScheduleServices;
            _departmentServices = departmentServices;
            _mailService = mailService;
            _cakeScheduleDao = cakeScheduleDao;
            _departmentDao = departmentDao;
            _appConfigReader = appConfigReader;

            _timer = new Timer(_appConfigReader.TimerRunInterval);
            _timer.Elapsed += Timer_Elapsed;
        }
 public CakeScheduleController(ICakeScheduleDao cakeScheduleDao)
 {
     _cakeScheduleDao = cakeScheduleDao;
     _cakeSchedule = _cakeScheduleDao.Get();
 }
 public CakeScheduleController()
 {
     _cakeScheduleDao = new CakeScheduleDao(SiteSettings.RepositoryPath);
     _cakeSchedule = _cakeScheduleDao.Get();
 }