public ActionResult Register(Account Account) { if (ModelState.IsValid) { using (FestivalContext Db = new FestivalContext()) { Db.Accounts.Add(Account); Db.SaveChanges(); } ModelState.Clear(); ViewBag.Message = Account.Name + ", your account has been successfully registered!"; } return(View()); }
public ActionResult Login(Account Account) { using (FestivalContext Db = new FestivalContext()) { Account user = Db.Accounts.FirstOrDefault(u => u.Username == Account.Username && u.Password == Account.Password); if (user != null) { Session["Id"] = user.Id; Session["Username"] = user.Username; return(RedirectToAction("../Dashboard/Index")); } else { ModelState.AddModelError("", "Username or password is not correct"); } } ViewBag.Message = "The username or password is incorrect."; return(View("Login")); }
public TransferServiceRepository(FestivalContext context) { _context = context; }
public StageRepository(FestivalContext context) { _context = context; }
public PerformanceRepository(FestivalContext context) { _context = context; }
public PerformanceController(FestivalContext db, IPerformanceRepository repo) { _db = db; _repo = repo; }
public LoggingRepository(FestivalContext context) { _context = context; }
public TicketTypeRepository(FestivalContext context) { this.context = context; }
public SponsorRepository(FestivalContext context) { this.context = context; }
public AccommodationRepository(FestivalContext context) { _context = context; }
public AttendeeRepository(FestivalContext context) { _context = context; }
public TransferVehicleRepository(FestivalContext context) { _context = context; }
public ShopItemRepository(FestivalContext context) { _context = context; }
public TicketVoucherRepository(FestivalContext context) { this.context = context; }
public PurchaseVoucherRepository(FestivalContext context) { this.context = context; }
public TransferReservationRepository(FestivalContext context) { this.context = context; }