コード例 #1
0
        public static DayViewModel CreateDayViewModel(int id, DateTime date, string userId,
                                                      ILaundryRepository laundryRepo, IReservationRepository reservationRepo,
                                                      IUserRepository userRepo)
        {
            var laundries = laundryRepo.GetDormitoryLaundriesWithEntitiesAtDay(id, date) ?? new List <Laundry>();
            var roomId    = userRepo.GetUserById(userId).RoomId;

            var model = new DayViewModel()
            {
                Laundries           = laundries,
                DormitoryId         = id,
                washingMachineState = reservationRepo.GetDormitoryWashingMachineStates(id),
                date = date
            };

            if (roomId != null)
            {
                model.currentRoomReservation = reservationRepo.GetRoomDailyReservation(roomId.Value, date);
                model.hasReservationToRenew  = reservationRepo.HasReservationToRenew(roomId.Value);
            }
            else
            {
                model.currentRoomReservation = null;
                model.hasReservationToRenew  = false;
            }

            return(model);
        }
コード例 #2
0
 public LaundryBusiness(ILaundryRepository laundryRepository, IIroningRepository ironingRepository,
                        IOrderAgentMappingRepository orderAgentMappingRepository, IIroningLaundryRepository ironingLaundryRepository)
 {
     _laundryRepository           = laundryRepository;
     _ironingRepository           = ironingRepository;
     _orderAgentMappingRepository = orderAgentMappingRepository;
     _ironingLaundryRepository    = ironingLaundryRepository;
 }
コード例 #3
0
 public IroningLaundryBusiness(IIroningLaundryRepository ironingLaundryRepository, ILaundryRepository laundryRepository,
                               IIroningRepository ironingRepository, IOrderAgentMappingRepository orderAgentMappingRepository,
                               IPromoCodesRepository promoCodesRepository)
 {
     _ironingLaundryRepository    = ironingLaundryRepository;
     _laundryRepository           = laundryRepository;
     _ironingRepository           = ironingRepository;
     _orderAgentMappingRepository = orderAgentMappingRepository;
     _promoCodesRepository        = promoCodesRepository;
 }
コード例 #4
0
        public LaundryController(
            ILaundryRepository laundryRepository, IReservationRepository reservationRepository,
            IUserRepository userRepository, IWashingMachineRepository washingMachineRepo,
            UserManager <ApplicationUser> userManager, IAuthorizationService authorizationService,
            IDormitoryRepository dormitoryRepository, IStringLocalizer <LangResources> localizer)
        {
            _laundryRepo        = laundryRepository;
            _reservationRepo    = reservationRepository;
            _userRepo           = userRepository;
            _userManager        = userManager;
            _washingMachineRepo = washingMachineRepo;
            _dormitoryRepo      = dormitoryRepository;
            _localizer          = localizer;

            _authHelpers = new AuthHelpers(authorizationService, dormitoryRepository);
        }
コード例 #5
0
 public UnitOfWork(ICustomerRepository CustomerRepository, IManagerRepository ManagerRepository,
                   IMapper Mapper, IMailService MailService, IRepositoryHelper RepositoryHelper,
                   IServiceRepository ServiceRepository, IEmployeeRepository EmployeeRepository,
                   ILaundryRepository LaundryRepository, IInvoiceRepository InvoiceRepository,
                   IJwtAuthenticationManager JwtAuthenticationManager,
                   IDashboardRepo DashboardRepo)
 {
     this.CustomerRepository       = CustomerRepository;
     this.EmployeeRepository       = EmployeeRepository;
     this.ManagerRepository        = ManagerRepository;
     this.MailService              = MailService;
     this.Mapper                   = Mapper;
     this.InvoiceRepository        = InvoiceRepository;
     this.ServiceRepository        = ServiceRepository;
     this.InvoiceRepository        = InvoiceRepository;
     this.JwtAuthenticationManager = JwtAuthenticationManager;
     this.LaundryRepository        = LaundryRepository;
     this.DashboardRepo            = DashboardRepo;
 }
コード例 #6
0
 public HomeController(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     ILaundryRepository laundryRepository,
     IUserRepository userRepository,
     IReservationRepository reservationRepository,
     IAnnouncementRepository announcementRepo,
     IStringLocalizer <LangResources> localizer
     )
 {
     _userManager      = userManager;
     _signInManager    = signInManager;
     _emailSender      = emailSender;
     _laundryRepo      = laundryRepository;
     _userRepo         = userRepository;
     _reservationRepo  = reservationRepository;
     _announcementRepo = announcementRepo;
     _localizer        = localizer;
 }
コード例 #7
0
 public LaundryRepositoryEventArgs([NotNull] ILaundryRepository repo, in LaundryItems li, bool added)
コード例 #8
0
 public LaundryController(ILaundryRepository laundryRepository)
 {
     _laundryRepository = laundryRepository;
 }