Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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"));
        }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 7
0
 public LoggingRepository(FestivalContext context)
 {
     _context = context;
 }
 public TicketTypeRepository(FestivalContext context)
 {
     this.context = context;
 }
Ejemplo n.º 9
0
 public SponsorRepository(FestivalContext context)
 {
     this.context = context;
 }
Ejemplo n.º 10
0
 public AccommodationRepository(FestivalContext context)
 {
     _context = context;
 }
 public AttendeeRepository(FestivalContext context)
 {
     _context = context;
 }
 public TransferVehicleRepository(FestivalContext context)
 {
     _context = context;
 }
Ejemplo n.º 13
0
 public ShopItemRepository(FestivalContext context)
 {
     _context = context;
 }
 public TicketVoucherRepository(FestivalContext context)
 {
     this.context = context;
 }
Ejemplo n.º 15
0
 public PurchaseVoucherRepository(FestivalContext context)
 {
     this.context = context;
 }
Ejemplo n.º 16
0
 public TransferReservationRepository(FestivalContext context)
 {
     this.context = context;
 }