public ActionResult Index(BookingInfo bookinginfo)
 {
     if (ModelState.IsValid)
     {
         db.BookingInfo.Add(bookinginfo);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(RedirectToAction("Index"));
 }
        public ActionResult Create([Bind(Include = "UserId,UserName,Email,Phone,NID,DateOfBirth,Address,Gender,UserType,Image,Password,confirmPassword")] Users users)
        {
            if (ModelState.IsValid)
            {
                db.Registrations.Add(users);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(users));
        }
Beispiel #3
0
        public ActionResult Registration(Users usersObject, HttpPostedFileBase Image)
        {
            string path = uploadImage(Image);

            if (ModelState.IsValid)
            {
                usersObject.Image = path;
                db.Registrations.Add(usersObject);
                db.SaveChanges();
                FlashMessage.Confirmation("Registration successfully");
                return(RedirectToAction("Registration"));
            }

            return(RedirectToAction("Registration"));
        }
Beispiel #4
0
 public ActionResult Approved(Events events)
 {
     if (ModelState.IsValid)
     {
         events.Status          = "Approved";
         db.Entry(events).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("EventStatus"));
     }
     return(View(events));
 }
Beispiel #5
0
 public ActionResult EventCreate(Events events, HttpPostedFileBase Image)
 {
     if (ModelState.IsValid)
     {
         var path = uploadImage(Image);
         events.Image  = path;
         events.Status = "Not Approved";
         db.Events.Add(events);
         db.SaveChanges();
         FlashMessage.Confirmation("Event Submission Successfull");
         return(RedirectToAction("EventCreate"));
     }
     return(RedirectToAction("EventCreate"));
 }
Beispiel #6
0
 public void Insert(Owner entity)
 {
     _dbContext.Owners.Add(entity);
     _dbContext.SaveChanges();
 }
Beispiel #7
0
 public void Insert(Info entity)
 {
     _dbContext.Infos.Add(entity);
     _dbContext.SaveChanges();
 }
Beispiel #8
0
 public void Insert(Location entity)
 {
     _dbContext.Locations.Add(entity);
     _dbContext.SaveChanges();
 }
 public void Insert(Event entity)
 {
     Context.Events.Add(entity);
     Context.SaveChanges();
 }
Beispiel #10
0
 public void Insert(Reservation entity)
 {
     Context.Reservations.Add(entity);
     Context.SaveChanges();
 }
Beispiel #11
0
 public void Insert(BotCache entity)
 {
     _dbContext.BotCaches.Add(entity);
     _dbContext.SaveChanges();
 }
Beispiel #12
0
 public void Insert(Price entity)
 {
     Context.Prices.Add(entity);
     Context.SaveChanges();
 }
Beispiel #13
0
 public void Insert(Apartment entity)
 {
     _dbContext.Apartments.Add(entity);
     _dbContext.SaveChanges();
 }
Beispiel #14
0
 public void Insert(Guest entity)
 {
     _dbContext.Guests.Add(entity);
     _dbContext.SaveChanges();
 }