Exemplo n.º 1
0
 public EventsController(IEventRepo EventRepository, IArtistEventRepo ArtistEventRepo, ISponsorEventRepo SponsorEventRepo, ILocationRepo LocationRepo)
 {
     _repo             = EventRepository;
     _ArtistEventRepo  = ArtistEventRepo;
     _SponsorEventRepo = SponsorEventRepo;
     _LocationRepo     = LocationRepo;
 }
Exemplo n.º 2
0
 public AreaController(IUserReferenceRepo repoBase, ILookupCodeRepo repoLookup, IAreaRepo repoArea, ILocationRepo repoLocation, IRuteRepo repoRute)
     : base(repoBase, repoLookup)
 {
     RepoArea     = repoArea;
     RepoLocation = repoLocation;
     RepoRute     = repoRute;
 }
Exemplo n.º 3
0
        public ActionResult EditOrganization(OrgVM o)
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();
            IHeroRepo     herorepo = HeroRepoFactory.Create();
            IOrgRepo      orgrepo  = OrgRepoFactory.Create();

            if (ModelState.IsValid)
            {
                o.OrganizationHeroes = new List <Hero>();

                var orgToEdit = new Organization
                {
                    OrganizationID       = o.OrganizationID,
                    OganizationAddress   = o.OganizationAddress,
                    OrganizationLocation = locorepo.GetLocationById(o.OrganizationLocation.LocationID),
                    OrganizationName     = o.OrganizationName,
                    Phone = o.Phone,
                };
                foreach (var HeroID in o.SelectedHeroesID)
                {
                    orgToEdit.OrganizationHeroes.Add(herorepo.GetHereosByID(HeroID));
                }
                orgrepo.EditOrg(orgToEdit);
            }
            return(RedirectToAction("OrganizationList"));
        }
Exemplo n.º 4
0
        public ActionResult LocationList()
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();
            var           model    = locorepo.GetAllLocations();

            return(View(model.ToList()));
        }
Exemplo n.º 5
0
        public ActionResult DeleteLocation(int LocationID)
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();

            locorepo.DeleteLocation(LocationID);
            return(RedirectToAction("LocationList"));
        }
 public CustomerController(ILocationRepo locationRepo, ICustomerRepository customerRepo, IProductsRepository productsRepo, IOrdersRepository ordersRepo)
 {
     LocRepo  = locationRepo;
     CusRepo  = customerRepo;
     ProdRepo = productsRepo;
     OrdRepo  = ordersRepo;
 }
Exemplo n.º 7
0
 public OrdersController(ILocationRepo locationRepo, ICustomerRepository customerRepo, IProductsRepository productsRepo, IOrdersRepository ordersRepo, ILogger <OrdersController> logger)
 {
     LocRepo  = locationRepo;
     CusRepo  = customerRepo;
     ProdRepo = productsRepo;
     OrdRepo  = ordersRepo;
     _logger  = logger;
 }
Exemplo n.º 8
0
 public MasterPoolController(IUserReferenceRepo repoBase, ILookupCodeRepo repoLookup, IMasterPoolRepo repoPool, ILocationRepo repoLoc, IERPConfigRepo repoERPConfig,
                             Iac_mstrRepo repoac_mstr, Ibk_mstrRepo repobk_mstr)
     : base(repoBase, repoLookup)
 {
     RepoPool    = repoPool;
     RepoLoc     = repoLoc;
     Repoac_mstr = repoac_mstr;
     Repobk_mstr = repobk_mstr;
 }
 public ManagerLogin(Manager manager, lacrosseContext context, ICustomerRepo custRepo, ILocationRepo locRepo)
 {
     this.manager            = manager;
     this.custRepo           = custRepo;
     this.locRepo            = locRepo;
     this.custServices       = new CustomerServices(custRepo);
     this.locServices        = new LocationServices(locRepo);
     this.replenishInventory = new ReplenishInventory(manager, context, new DBRepo(context), new DBRepo(context), new DBRepo(context));
 }
Exemplo n.º 10
0
 public RuteController(IUserReferenceRepo repoBase, ILookupCodeRepo repoLookup,
                       IRuteRepo repoRute, ILocationRepo repoLocation, IAreaRepo repoArea, IMultiDropRepo repoMultidrop)
     : base(repoBase, repoLookup)
 {
     RepoRute      = repoRute;
     RepoLocation  = repoLocation;
     RepoArea      = repoArea;
     RepoMultidrop = repoMultidrop;
 }
Exemplo n.º 11
0
 public ReplenishInventory(Manager manager, lacrosseContext context, ILocationRepo locationRepo, IInventoryRepo inventoryRepo, IProductRepo productRepo)
 {
     this.manager           = manager;
     this.context           = context;
     this.locationRepo      = locationRepo;
     this.inventoryRepo     = inventoryRepo;
     this.productRepo       = productRepo;
     this.locationServices  = new LocationServices(locationRepo);
     this.inventoryServices = new InventoryServices(inventoryRepo);
     this.productServices   = new ProductServices(productRepo);
 }
Exemplo n.º 12
0
        public LocationMenu(models.Customer customer, ILocationRepo locationRepo, IMessagingService service)
        {
            this.customer = customer;
            this.service  = service;


            this.locationService  = new LocationService(locationRepo);
            this.inventoryService = new InventoryService((IInventoryRepo)locationRepo);
            this.orderService     = new OrderService((IOrderRepo)locationRepo);
            this.productService   = new ProductService((IProductRepo)locationRepo);
            //this.customerService = new CustomerService((ICustomerRepo) locationRepo);
        }
Exemplo n.º 13
0
        public CustomerController(ICustomerRepo customerRepo, ILocationRepo locationRepo,
                                  IOrderItemRepo orderItemRepo, IOrderRepo orderRepo, ICupcakeRepo cupcakeRepo,
                                  ILogger <CustomerController> logger)
        {
            LocRepo       = locationRepo;
            CustomerRepo  = customerRepo;
            OrderItemRepo = orderItemRepo;
            OrderRepo     = orderRepo;
            CupcakeRepo   = cupcakeRepo;

            _logger = logger;
        }
Exemplo n.º 14
0
 public LaunchMenu(lacrosseContext context, ICustomerRepo custRepo, IManagerRepo managerRepo, ILocationRepo locRepo, ICartRepo cartRepo)
 {
     this.context          = context;
     this.custRepo         = custRepo;
     this.locRepo          = locRepo;
     this.cartRepo         = cartRepo;
     this.managerRepo      = managerRepo;
     this.customerServices = new CustomerServices(custRepo);
     this.locationServices = new LocationServices(locRepo);
     this.cartServices     = new CartServices(cartRepo);
     this.managerServices  = new ManagerServices(managerRepo);
 }
 public OrderHistoryMenu(Customer customer, lacrosseContext context, ICustomerRepo customerRepo, IInventoryRepo inventoryRepo, IProductRepo productRepo, IOrderRepo orderRepo, ILocationRepo locationRepo)
 {
     this.customer         = customer;
     this.customerRepo     = customerRepo;
     this.productRepo      = productRepo;
     this.orderRepo        = orderRepo;
     this.inventoryRepo    = inventoryRepo;
     this.locationRepo     = locationRepo;
     this.customerServices = new CustomerServices(customerRepo);
     this.locationService  = new LocationServices(locationRepo);
     this.productServices  = new ProductServices(productRepo);
     this.orderService     = new OrderServices(orderRepo);
     this.inventoryService = new InventoryServices(inventoryRepo);
 }
Exemplo n.º 16
0
        public OrderController(ICustomerRepo customerRepo, ILocationRepo locationRepo,
                               IOrderRepo orderRepo, ICupcakeRepo cupcakeRepo, IOrderItemRepo orderItemRepo,
                               ILocationInventoryRepo locationInventoryRepo, IRecipeItemRepo recipeItemRepo,
                               ILogger <OrderController> logger)
        {
            LocRepo               = locationRepo;
            CustomerRepo          = customerRepo;
            OrderRepo             = orderRepo;
            CupcakeRepo           = cupcakeRepo;
            OrderItemRepo         = orderItemRepo;
            LocationInventoryRepo = locationInventoryRepo;
            RecipeItemRepo        = recipeItemRepo;

            _logger = logger;
        }
Exemplo n.º 17
0
        public ActionResult EditLocation(int id)
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();
            var           location = locorepo.GetLocationById(id);
            var           model    = new LocationVM
            {
                LocationID          = location.LocationID,
                LocationName        = location.LocationName,
                LocationAddress     = location.LocationAddress,
                LocationDescription = location.LocationDescription,
                LatitudeCoordinate  = location.LatitudeCoordinate,
                LongitudeCoordinate = location.LongitudeCoordinate,
            };

            locorepo.EditLocation(location);
            return(View(model));
        }
Exemplo n.º 18
0
        public ActionResult EditLocation(LocationVM l)
        {
            ILocationRepo locorepo = LocationRepoFactory.Create();

            if (ModelState.IsValid)
            {
                var location = new Location
                {
                    LocationID          = l.LocationID,
                    LocationName        = l.LocationName,
                    LocationAddress     = l.LocationAddress,
                    LocationDescription = l.LocationDescription,
                    LatitudeCoordinate  = l.LatitudeCoordinate,
                    LongitudeCoordinate = l.LongitudeCoordinate,
                };
                locorepo.EditLocation(location);
            }
            return(RedirectToAction("LocationList"));
        }
Exemplo n.º 19
0
 public CheckoutMenu(Customer customer, lacrosseContext context, ICustomerRepo customerRepo, ILocationRepo locationRepo, IInventoryRepo inventoryRepo, IProductRepo productRepo, ICartRepo cartRepo, ICartItemsRepo cartItemsRepo, IOrderRepo orderRepo, ILineItemRepo lineItemRepo)
 {
     this.customer          = customer;
     this.customerRepo      = customerRepo;
     this.inventoryRepo     = inventoryRepo;
     this.locationRepo      = locationRepo;
     this.productRepo       = productRepo;
     this.orderRepo         = orderRepo;
     this.cartRepo          = cartRepo;
     this.cartItemsRepo     = cartItemsRepo;
     this.lineItemRepo      = lineItemRepo;
     this.customerServices  = new CustomerServices(customerRepo);
     this.locationServices  = new LocationServices(locationRepo);
     this.inventoryServices = new InventoryServices(inventoryRepo);
     this.productServices   = new ProductServices(productRepo);
     this.cartServices      = new CartServices(cartRepo);
     this.cartItemServices  = new CartItemServices(cartItemsRepo);
     this.orderServices     = new OrderServices(orderRepo);
     this.lineItemServices  = new lineItemServices(lineItemRepo);
 }
Exemplo n.º 20
0
        public ActionResult EditSighting(SightingVM s)
        {
            IHeroRepo     herorepo     = HeroRepoFactory.Create();
            ISightingRepo repo         = SightingRepoFactory.Create();
            ILocationRepo locationrepo = LocationRepoFactory.Create();

            if (ModelState.IsValid)
            {
                foreach (var hero in s.SightingHeroes)
                {
                    s.SightingObject.SightingHeroes.Remove(hero);
                }

                foreach (var HeroID in s.SightingObject.SelectedHeroesID)
                {
                    s.SightingObject.SightingHeroes.Add(herorepo.GetHereosByID(HeroID));
                }

                s.SightingObject.SightingLocation = locationrepo.GetLocationById(s.SightingObject.SightingLocation.LocationID);

                Sighting sighting = new Sighting
                {
                    Ispublished         = true,
                    SightingHeroes      = s.SightingObject.SightingHeroes,
                    SightingID          = s.SightingObject.SightingID,
                    SightingLocation    = s.SightingObject.SightingLocation,
                    SightingDescription = s.SightingObject.SightingDescription,
                    Date = s.SightingObject.Date
                };
                repo.EditSighting(sighting);
            }
            else
            {
                return(View(s));
            }
            return(RedirectToAction("Index", "Home"));
        }
Exemplo n.º 21
0
 public LocationController(ILocationRepo repo) => _repo = repo ?? throw new ArgumentNullException(nameof(repo));
 public LocationsController(ILocationRepo repo)
 {
     _repository = repo;
 }
Exemplo n.º 23
0
        public IndexModel(ILocationRepo repositoryLocation)
        {
            LocationRepo = repositoryLocation;

            SortableLocationList = LocationRepo.GetAllLocations();
        }
Exemplo n.º 24
0
 public LocationService(ILocationRepo locationRepo)
 {
     _locationRepo = locationRepo;
 }
Exemplo n.º 25
0
 public CarDetalisController(ICarDetalistRepo _repo, ILocationRepo _locationRepo, ICarRepo _carRepo)
 {
     repo         = _repo;
     repoLocation = _locationRepo;
     repoCar      = _carRepo;
 }
 public EditLocationModel(ILocationRepo repository)
 {
     repo = repository;
 }
Exemplo n.º 27
0
 public LocationController(IUserReferenceRepo repoBase, ILookupCodeRepo repoLookup, ILocationRepo repoLocation)
     : base(repoBase, repoLookup)
 {
     RepoLocation = repoLocation;
 }
 public CreateSpeedMeasurementModel(ISpeedMeasurementRepo repo, ILocationRepo locationRepo)
 {
     _measurements = repo;
     _locations    = locationRepo;
 }
 public EditLocationModel(ILocationRepo locationRepo)
 {
     _locationRepo = locationRepo;
 }
Exemplo n.º 30
0
 public EventsController(IEventRepo eventRepository, ILocationRepo locationRepository, IEventTypeRepo eventTypeRepository)
 {
     _eventRepository = eventRepository;
     _locationRepository = locationRepository;
     _eventTypeRepository = eventTypeRepository;
 }
Exemplo n.º 31
0
 public EditLocationModel(ILocationRepo locations)
 {
     _locations = locations;
 }
Exemplo n.º 32
0
 public LocationsController(ILocationRepo repository)
 {
     _repository = repository;
 }