Beispiel #1
0
 public ActionResult ContactEdit(int cid)
 {
     var m = new ContactModel(cid);
     if (!m.CanViewComments)
         return View("ContactDisplay", m);
     return View(m);
 }
Beispiel #2
0
 public ActionResult ContactUpdate(int cid, ContactModel c)
 {
     if (!ModelState.IsValid)
         return View("ContactEdit", c);
     c.UpdateContact();
     return View("ContactDisplay", c);
 }
Beispiel #3
0
        public ActionResult Index(int id)
        {
            if (ViewExtensions2.UseNewLook())
                return Redirect("/Contact2/" + id);
            var m = new ContactModel(id);
            if (m.contact == null)
                return Content("contact does not exist");

            var edit = (bool?)TempData["ContactEdit"] == true;
            ViewBag.edit = edit;
            return View(m);
        }
Beispiel #4
0
 public ActionResult NewTeamContact(int cid)
 {
     var m = new ContactModel(cid);
     var nid = m.AddNewTeamContact();
     return Redirect("/Contact/" + nid);
 }
Beispiel #5
0
 public ActionResult ContactDisplay(int cid)
 {
     var m = new ContactModel(cid);
     return View(m);
 }