public ActionResult Create(SpecialEvent specialevent)
 {
     if (ModelState.IsValid)
     {
         specialevent.CenterId = account.GetCurrentUserCenterId();
         repoService.specialEventRepo.Insert(specialevent);
         return RedirectToAction("Index");
     }
     ViewBag.CenterId = account.GetCurrentUserCenterId();
     return View(specialevent);
 }
 public void Insert(SpecialEvent e)
 {
     db.SpecialEvents.Add(e);
     db.SaveChanges();
 }
 public void Update(SpecialEvent e)
 {
     db.Entry(e).State = EntityState.Modified;
     db.SaveChanges();
 }
 public void Delete(SpecialEvent e)
 {
     db.SpecialEvents.Remove(e);
     db.SaveChanges();
 }