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); }
public LaundryBusiness(ILaundryRepository laundryRepository, IIroningRepository ironingRepository, IOrderAgentMappingRepository orderAgentMappingRepository, IIroningLaundryRepository ironingLaundryRepository) { _laundryRepository = laundryRepository; _ironingRepository = ironingRepository; _orderAgentMappingRepository = orderAgentMappingRepository; _ironingLaundryRepository = ironingLaundryRepository; }
public IroningLaundryBusiness(IIroningLaundryRepository ironingLaundryRepository, ILaundryRepository laundryRepository, IIroningRepository ironingRepository, IOrderAgentMappingRepository orderAgentMappingRepository, IPromoCodesRepository promoCodesRepository) { _ironingLaundryRepository = ironingLaundryRepository; _laundryRepository = laundryRepository; _ironingRepository = ironingRepository; _orderAgentMappingRepository = orderAgentMappingRepository; _promoCodesRepository = promoCodesRepository; }
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); }
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; }
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; }
public LaundryRepositoryEventArgs([NotNull] ILaundryRepository repo, in LaundryItems li, bool added)
public LaundryController(ILaundryRepository laundryRepository) { _laundryRepository = laundryRepository; }