public AppointmentController() { this.appointmentRepository = new AppointmentRepository(); this.groomerRepository = new GroomerRepository(); this.serviceRepository = new GenericRepository <Service>(); this.petRepository = new GenericRepository <Pet>(); this.ownerRepository = new GenericRepository <Owner>(); }
public OwnerController() { this.ownerRepository = new OwnerRepository(); this.groomerRepository = new GroomerRepository(); this.serviceRepository = new ServiceRepository(); this.petRepository = new PetRepository(); this.appointmentRepository = new AppointmentRepository(); }
public GroomerController(GroomerRepository repository) { this.repository = repository; }
public ActionResult Index() { string userId = User.Identity.GetUserId(); if (User.IsInRole("admin")) { return(RedirectToAction("Index", "Admin")); } else if (User.IsInRole("staff")) { string calendarDate = DateTime.Today.ToString("yyyy-MM-dd"); return(RedirectToAction("Calendar", "Groomer", new { date = calendarDate })); } //else if (User.IsInRole("user")) //{ // return RedirectToAction("CreateAppointment", "Owner"); //} Dictionary <string, string> dogServices = new Dictionary <string, string> { { "Full Grooming Service", "A bath with towel and hair drying, teeth brushing, nail trimming, eye and ear cleaning, a brush out, and a haircut based upon your dog’s breed standard or your individual style choice." }, { "Bath Grooming", "A bath, trimmed nails, and cleaned ears." }, { "De-matting", "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ip sum has been the industry's standard dummy text ever." } }; ViewBag.dogServices = dogServices; ViewBag.catServices = new Dictionary <string, string> { { "Full Grooming Service", "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ip sum has been the industry's standard dummy text ever." }, { "Bath Grooming", "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ip sum has been the industry's standard dummy text ever." }, { "De-matting", "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ip sum has been the industry's standard dummy text ever." } }; GroomerRepository groomerRepo = new GroomerRepository(); IEnumerable <Groomer> groomers = groomerRepo.GetAll(); var groomerList = new List <Dictionary <string, string> >(); string groomerPath = "/Content/images/groomers"; foreach (Groomer groomer in groomers) { groomerList.Add(new Dictionary <string, string> { { "name", groomer.Name }, { "specializing", groomer.Specializing.ToString() }, { "file", groomerPath + "/" + groomer.Name + ".jpg" } }); } ViewBag.groomers = groomerList; string galleryPath = "~/Content/images/gallery"; Dictionary <string, IEnumerable <string> > galleryFiles = new Dictionary <string, IEnumerable <string> >(); foreach (Species species in Enum.GetValues(typeof(Species))) { string[] files; try { files = Directory.GetFiles(Server.MapPath(galleryPath + "/" + species.ToString())) .Select(x => Path.GetFileName(x)) .ToArray(); galleryFiles.Add(species.ToString(), files); } catch { } } ViewBag.gallery = galleryFiles; ViewBag.mapKey = ConfigurationManager.AppSettings["GoogleMapKey"]; return(View()); }
public GroomerController() { this.repository = new GroomerRepository(); }