예제 #1
0
        //



        //
        // GET: /TeamsPaper/Edit/5

        public ActionResult Edit(int id)
        {
            teams_paper teamModel = new teams_paper();

            using (ModelsCMS db = new ModelsCMS())
            {
                teamModel = db.teams_papers.Where(x => x.DelegatesID == id).FirstOrDefault();
            }
            return(View(teamModel));
        }
예제 #2
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"));
            }
        }
예제 #3
0
        //
        // GET: /TeamsPaper/Create

        public ActionResult Create(int id = 0)
        {
            teams_paper teamModel = new teams_paper();

            using (ModelsCMS db = new ModelsCMS())
            {
                if (id != 0)
                {
                    teamModel = db.teams_papers.Where(x => x.DelegatesID == id).FirstOrDefault();
                }
                teamModel.ConferenceCollection = db.conference_events.ToList <conference_event>();
            }



            return(View(teamModel));
        }