public ActionResult IndexOrg() { List <member> memberlist = new List <member>(); using (ModelsCMS db = new ModelsCMS()) { memberlist = db.members.ToList <member>(); } return(View(memberlist)); }
// // GET: /Conference/Edit/5 public ActionResult Edit(int id) { conference_event ConferenceModel = new conference_event(); using (ModelsCMS db = new ModelsCMS()) { ConferenceModel = db.conference_events.Where(x => x.conferenceID == id).FirstOrDefault(); } return(View(ConferenceModel)); }
public ActionResult Create(conference_event conferenceModel) { using (ModelsCMS db = new ModelsCMS()) { db.conference_events.Add(conferenceModel); db.SaveChanges(); } return(RedirectToAction("Index")); }
public ActionResult IndexOrg() { List <conference_event> conference_eventlist = new List <conference_event>(); using (ModelsCMS db = new ModelsCMS()) { conference_eventlist = db.conference_events.ToList <conference_event>(); } return(View(conference_eventlist)); }
// // GET: /Attende/Details/5 public ActionResult Details(int id) { member memberModel = new member(); using (ModelsCMS db = new ModelsCMS()) { memberModel = db.members.Where(x => x.AttendeeID == id).FirstOrDefault(); } return(View(memberModel)); }
public ActionResult IndexOrg() { List <teams_paper> teams_paperlist = new List <teams_paper>(); using (ModelsCMS db = new ModelsCMS()) { teams_paperlist = db.teams_papers.ToList <teams_paper>(); } return(View(teams_paperlist)); }
public ActionResult Edit(conference_event ConferenceModel) { using (ModelsCMS db = new ModelsCMS()) { db.Entry(ConferenceModel).State = System.Data.EntityState.Modified; db.SaveChanges(); } return(RedirectToAction("Index")); }
// // // 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)); }
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 IndexPublic() { List <organizer> organizerlist = new List <organizer>(); using (ModelsCMS db = new ModelsCMS()) { organizerlist = db.organizers.ToList <organizer>(); } return(View(organizerlist)); }
// // GET: /Organizer/Edit/5 public ActionResult Edit(int id) { organizer orgModel = new organizer(); using (ModelsCMS db = new ModelsCMS()) { orgModel = db.organizers.Where(x => x.OrganizerId == id).FirstOrDefault(); } return(View(orgModel)); }
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")); }
public ActionResult IndexOrg() { List <apta_admin> adminlist = new List <apta_admin>(); using (ModelsCMS db = new ModelsCMS()) { adminlist = db.apta_admins.ToList <apta_admin>(); } return(View(adminlist)); }
public ActionResult orgLogin(organizer org) { ModelsCMS db = new ModelsCMS(); var userLoggedIn = db.organizers.SingleOrDefault(x => x.Email == org.Email && x.Password == org.Password && x.approve == 1); if (userLoggedIn != null) { ViewBag.message = "loggedin"; ViewBag.triedOne = "yes"; return(RedirectToAction("orgHome", "Home", new{ Email = org.Email, name = org.Name })); } else { ViewBag.triedOnce = "yes"; return(View("Error")); } }
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")); } }
public ActionResult Create(organizer organizerModel) { try { using (ModelsCMS db = new ModelsCMS()) { db.organizers.Add(organizerModel); db.SaveChanges(); } return(RedirectToAction("Index")); } catch { return(View("Error")); } }
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")); } }
// // 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)); }
public ActionResult adminLogin(apta_admin admin) { ModelsCMS db = new ModelsCMS(); var userLoggedIn = db.apta_admins.SingleOrDefault(x => x.Email == admin.Email && x.Password == admin.Password); if (userLoggedIn != null) { ViewBag.message1 = "loggedin"; ViewBag.triedOne1 = "yes"; return(RedirectToAction("adminHome", "Home", new { Email = admin.Email })); } else { ViewBag.triedOnce = "yes"; return(View("Error")); } }
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")); } }
// // GET: /Attende/Create public ActionResult Create(int id = 0) { member memberModel = new member(); using (ModelsCMS db = new ModelsCMS()) { if (id != 0) { memberModel = db.members.Where(x => x.AttendeeID == id).FirstOrDefault(); } memberModel.TeamCollection = db.teams_papers.ToList <teams_paper>(); } return(View(memberModel)); }
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")); } }
public ActionResult AddOrEdit(int id = 0) { organizer organizerModel = new organizer(); using (ModelsCMS db = new ModelsCMS()) { if (id != 0) { organizerModel = db.organizers.Where(x => x.OrganizerId == id).FirstOrDefault(); } organizerModel.ConferenceCollection = db.conference_events.ToList <conference_event>(); } /* // hardcore * organizerModel.ConferenceCollection = new List<conference_event>() * { * new conference_event() {conferenceID = 1, Name = "Computer"}, * * new conference_event() {conferenceID = 1, Name = "Computer"}, * }; */ return(View(organizerModel)); }