public ActionResult ContactEdit(int cid) { var m = new ContactModel(cid); if (!m.CanViewComments) return View("ContactDisplay", m); return View(m); }
public ActionResult ContactUpdate(int cid, ContactModel c) { if (!User.IsInRole("Admin") && !ModelState.IsValid) return View("ContactEdit", c); c.UpdateContact(); return View("ContactDisplay", c); }
public ActionResult Index(int cid) { if (!ViewExtensions2.UseNewLook()) return Redirect("/Contact/" + cid); var m = new ContactModel(cid); if (m.contact == null) return Content("contact is private or does not exist"); var edit = (bool?)TempData["ContactEdit"] == true; ViewBag.edit = edit; return View(m); }
public ActionResult Index(int cid, bool edit = false) { var m = new ContactModel(cid); if (m.contact == null) return Content("contact is private or does not exist"); if( edit ) { TempData["ContactEdit"] = true; return Redirect($"/Contact2/{cid}"); } else { var showEdit = (bool?)TempData["ContactEdit"] == true; ViewBag.edit = showEdit; return View(m); } }
public ActionResult Contactors(int cid) { var m = new ContactModel(cid); return View(m.Ministers); }
public ActionResult ContactDisplay(int cid) { var m = new ContactModel(cid); return View(m); }
public ActionResult NewTeamContact(int cid) { var m = new ContactModel(cid); var nid = m.AddNewTeamContact(); return Redirect("/Contact2/" + nid); }
public ActionResult Index(int cid, bool edit = false) { var m = new ContactModel(cid); if (m.contact == null) return Content("contact is private or does not exist"); if( edit ) { TempData["ContactEdit"] = true; return Redirect($"/Contact2/{cid}"); } else { if (TempData.ContainsKey("SetRole")) m.LimitToRole = TempData["SetRole"].ToString(); var showEdit = (bool?)TempData["ContactEdit"] == true; ViewBag.edit = showEdit; return View(m); } }
public ActionResult Index(int cid) { var m = new ContactModel(cid); if (m.contact == null) return Content("contact is private or does not exist"); var edit = (bool?)TempData["ContactEdit"] == true; ViewBag.edit = edit; return View(m); }