public int ProvideGarageService(int custID, int serviceID)
        {
            Debug.WriteLine("Looking for customer with id " + custID + " in repo from facade");
            ICustomer customer = customerRepository.GetCustomer(custID);

            if (customer == null)
            {
                Console.WriteLine("Customer with entered ID not found");
                return(-1);
            }
            Debug.WriteLine("Looking for garage service with id " + serviceID + " in repo from facade");
            IGarageService service = garageServiceRepository.GetGarageService(serviceID);

            if (service == null)
            {
                Console.WriteLine("Service with entered ID not found");
                return(-1);
            }
            provider.WaitingTimeInDays = 3;
            provider.ProvideGarageService(customer, service);
            string content = "Thank you for using our services. Your waiting time is " +
                             provider.WaitingTimeInDays + " days.";

            mailSender.SendMail(customer.Email, content);
            return(0);
        }
Ejemplo n.º 2
0
 public ParkingService(DataContext context, IGarageService garageService, ISpaceService spaceService, IUserService userService)
 {
     _context       = context;
     _userService   = userService;
     _spaceService  = spaceService;
     _garageService = garageService;
 }
        public LocationViewModel(ISignUpService signUpService, IGarageService garageService)
        {
            SignUpService = signUpService;
            GarageService = garageService;

            RegisterCommand = new MvxAsyncCommand(Register);
        }
Ejemplo n.º 4
0
 public GarageController(IGarageService garageService,
                         ICurrentEmployeeService currentEmployeeService,
                         ICurrentUserService currentUserService)
 {
     this.garageService          = garageService;
     this.currentEmployeeService = currentEmployeeService;
     this.currentUserService     = currentUserService;
 }
Ejemplo n.º 5
0
 public OptionController(IHttpContextAccessor httpContextAccessor,
                         IUserService userService,
                         IGarageService garageService,
                         IOptionService optionService) : base(httpContextAccessor, userService)
 {
     _optionService = optionService;
     _garageService = garageService;
 }
        public int AddGarageService(string name, decimal price)
        {
            IGarageService newService = factory.CreateService(name, price);
            int            serviceID  = garageServiceRepository.AddGarageService(newService);

            Debug.WriteLine("Garage service with ID " + serviceID + " added to repo from facade");
            return(serviceID);
        }
        public int AddGarageService(IGarageService service)
        {
            services.Add(id, service);
            int serviceId = id;

            id++;
            Debug.WriteLine("Saved " + service.GetType().ToString() + " to memory repo");
            return(serviceId);
        }
        public GarageController(IGarageService garageService, IConfiguration config)
        {
            if (garageService != null)
            {
                _garageService = garageService;
            }

            _config = config;
        }
Ejemplo n.º 9
0
 public OrdersController(IOrdersService ordersService, ICustomersService customersService, IGarageService garageService, IItemsService itemsService, IOrderItemsService orderItemsService, ICloudinaryService cloudinaryService)
 {
     this.ordersService     = ordersService;
     this.customersService  = customersService;
     this.garageService     = garageService;
     this.itemsService      = itemsService;
     this.orderItemsService = orderItemsService;
     this.cloudinaryService = cloudinaryService;
 }
Ejemplo n.º 10
0
 public GaragesController(
     IGarageService garageService,
     IMapper mapper,
     IOptions <AppSettings> appSettings)
 {
     _garageService = garageService;
     _mapper        = mapper;
     _appSettings   = appSettings.Value;
 }
Ejemplo n.º 11
0
 public StickerController(IReferenceService referenceService,
                          IHttpContextAccessor httpContextAccessor,
                          IGarageService garageService,
                          IOptionService optionService,
                          IUserService userService) : base(httpContextAccessor, userService)
 {
     _referenceService = referenceService;
     _garageService    = garageService;
     _optionService    = optionService;
 }
Ejemplo n.º 12
0
 public GarageController(IHttpContextAccessor httpContextAccessor,
                         IUserService userService,
                         IReferenceService referenceService,
                         IBlobStorageService blobStorageService,
                         IGarageService garageService) : base(httpContextAccessor, userService)
 {
     _garageService      = garageService;
     _referenceService   = referenceService;
     _blobStorageService = blobStorageService;
 }
 public JobController(
     IGarageService garageService,
     IJobScheduler jobSchedulerService,
     ICurrentEmployeeService currentEmployeeService,
     ICurrentUserService currentUserService)
 {
     this.garageService          = garageService;
     this.jobSchedulerService    = jobSchedulerService;
     this.currentEmployeeService = currentEmployeeService;
     this.currentUserService     = currentUserService;
 }
 public void ProvideGarageService(ICustomer customer, IGarageService service)
 {
     if (!customer.IsEmployee())
     {
         List <IGarageService> servicesList = customer.GarageServicesProvided;
         servicesList.Add(service);
         customer.GarageServicesProvided = servicesList;
         Debug.WriteLine(service.GetType().ToString() + " was provided to " +
                         customer.GetType().ToString() + " after " + WaitingTimeInDays + " days.");
     }
 }
 public ApplicationGarageService(
     ITransactionService transactionService,
     IGarageService domainGarageService,
     IApplicationCityService cityService,
     IApplicationAddressService addressService)
     : base(transactionService)
 {
     DomainGarageService = domainGarageService;
     CityService         = cityService;
     AddressService      = addressService;
 }
Ejemplo n.º 16
0
 public LoginModel(SignInManager <IdentityUser> signInManager,
                   ILogger <LoginModel> logger,
                   IGarageService garageService,
                   UserManager <IdentityUser> userManager,
                   IStringLocalizer <LoginModel> localizer)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _garageService = garageService;
     _logger        = logger;
     _localizer     = localizer;
 }
Ejemplo n.º 17
0
 public MessageController(IReferenceService referenceService,
                          IHttpContextAccessor httpContextAccessor,
                          IGarageService garageService,
                          IOptionService optionService,
                          IVehicleService vehicleService,
                          IUserService userService) : base(httpContextAccessor, userService)
 {
     _referenceService = referenceService;
     _garageService    = garageService;
     _optionService    = optionService;
     _vehicleService   = vehicleService;
 }
Ejemplo n.º 18
0
 public UserController(SignInManager <IdentityUser> signInManager,
                       IUserService userService,
                       IGarageService garageService,
                       IReferenceService referenceService,
                       UserManager <IdentityUser> userManager,
                       IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor, userService)
 {
     _userIdentity     = signInManager;
     _userService      = userService;
     _garageService    = garageService;
     _referenceService = referenceService;
     _roles            = ((UserClaimsPrincipalFactory <IdentityUser, IdentityRole>)_userIdentity.ClaimsFactory).RoleManager.Roles.ToDictionary(r => r.Id, r => r.Name);
     _userManager      = userManager;
 }
Ejemplo n.º 19
0
 public SignUpService(
     ITransactionService transactionService,
     IDriverService domainDriverService,
     IDispatcherService domainDispatcherService,
     ICompanyService domainCompanyService,
     IGarageService domainGarageService,
     IApplicationVehicleService vehicleService)
     : base(transactionService)
 {
     DomainDriverService     = domainDriverService;
     DomainDispatcherService = domainDispatcherService;
     DomainCompanyService    = domainCompanyService;
     DomainGarageService     = domainGarageService;
     VehicleService          = vehicleService;
 }
Ejemplo n.º 20
0
        public int ProvideGarageService(int custID, int serviceID)
        {
            Debug.WriteLine("Looking for customer with id " + custID + " in repo from facade");
            ICustomer customer = customerRepository.GetCustomer(custID);

            if (customer == null)
            {
                Console.WriteLine("Customer with entered ID not found");
                return(-1);
            }
            Debug.WriteLine("Looking for garage service with id " + serviceID + " in repo from facade");
            IGarageService service = garageServiceRepository.GetGarageService(serviceID);

            if (service == null)
            {
                Console.WriteLine("Service with entered ID not found");
                return(-1);
            }
            provider.WaitingTimeInDays = 3;
            provider.ProvideGarageService(customer, service);
            return(0);
        }
Ejemplo n.º 21
0
 public DispatcherLocationViewModel(ISignUpService signUpService, IGarageService garageService)
     : base(signUpService, garageService)
 {
 }
Ejemplo n.º 22
0
 public GarageController(IGarageService garageService)
 {
     this.garageService = garageService;
 }
Ejemplo n.º 23
0
 public GaragesController(IGarageService garageService, IMapper mapper)
 {
     _garageService = garageService;
     _mapper        = mapper;
 }
Ejemplo n.º 24
0
 public CarsController(ICarService carService, IMapper mapper, IGarageService garageService)
 {
     _carService    = carService;
     _mapper        = mapper;
     _garageService = garageService;
 }
Ejemplo n.º 25
0
 public LocationsController(IGarageService garageService)
 {
     _garageService = garageService;
 }
Ejemplo n.º 26
0
 public GaragesController(ILogger <GaragesController> logger, IGarageService garageService)
 {
     _logger        = logger;
     _garageService = garageService;
 }
Ejemplo n.º 27
0
 public CompanyService(ICompanyRepository repository, IGarageService garageService)
     : base(repository)
 {
     GarageService = garageService;
 }
 public CurrentEmployeeMiddleware(IGarageService employeeService)
 {
     this.garageService = employeeService;
 }
Ejemplo n.º 29
0
 public ManagerGarageController(IGarageService garageservice, IMapper mapper)
 {
     this._Garageservice = garageservice;
     this._mapper        = mapper;
 }