Exemplo n.º 1
0
        public ActionResult Edit(member teamModel)
        {
            using (ModelsCMS db = new ModelsCMS())
            {
                db.Entry(teamModel).State = System.Data.EntityState.Modified;
                db.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
        public ActionResult Create(conference_event conferenceModel)
        {
            using (ModelsCMS db = new ModelsCMS())
            {
                db.conference_events.Add(conferenceModel);
                db.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
        public ActionResult Edit(conference_event ConferenceModel)
        {
            using (ModelsCMS db = new ModelsCMS())
            {
                db.Entry(ConferenceModel).State = System.Data.EntityState.Modified;
                db.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
        public ActionResult Delete(int id, FormCollection collection)
        {
            using (ModelsCMS db = new ModelsCMS())
            {
                conference_event confModel = db.conference_events.Where(x => x.conferenceID == id).FirstOrDefault();
                db.conference_events.Remove(confModel);
                db.SaveChanges();
            }

            return(RedirectToAction("Index"));
        }
Exemplo n.º 5
0
        public ActionResult Create(teams_paper org)
        {
            try
            {
                using (ModelsCMS db = new ModelsCMS())
                {
                    db.teams_papers.Add(org);
                    db.SaveChanges();
                }

                return(RedirectToAction("Create", "Attendee"));
            }
            catch
            {
                return(View("Required"));
            }
        }
Exemplo n.º 6
0
        public ActionResult Create(apta_admin adminmodel)
        {
            try
            {
                using (ModelsCMS db = new ModelsCMS())
                {
                    db.apta_admins.Add(adminmodel);
                    db.SaveChanges();
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Exemplo n.º 7
0
        public ActionResult Create(organizer organizerModel)
        {
            try
            {
                using (ModelsCMS db = new ModelsCMS())
                {
                    db.organizers.Add(organizerModel);
                    db.SaveChanges();
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Exemplo n.º 8
0
        public ActionResult AddOrEdit(organizer org)
        {
            try
            {
                using (ModelsCMS db = new ModelsCMS())
                {
                    db.organizers.Add(org);
                    db.SaveChanges();
                }

                return(RedirectToAction("wait", "Home"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Exemplo n.º 9
0
        public ActionResult Create(member org)
        {
            try
            {
                using (ModelsCMS db = new ModelsCMS())
                {
                    db.members.Add(org);
                    db.SaveChanges();
                }

                return(RedirectToAction("Create", "Attendee"));
            }
            catch
            {
                return(View("Error"));
            }
        }