Esempio n. 1
0
 public ActionResult ContactEdit(int cid)
 {
     var m = new ContactModel(cid);
     if (!m.CanViewComments)
         return View("ContactDisplay", m);
     return View(m);
 }
Esempio n. 2
0
 public ActionResult ContactUpdate(int cid, ContactModel c)
 {
     if (!User.IsInRole("Admin") && !ModelState.IsValid)
         return View("ContactEdit", c);
     c.UpdateContact();
     return View("ContactDisplay", c);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
            }
        }
Esempio n. 5
0
 public ActionResult Contactors(int cid)
 {
     var m = new ContactModel(cid);
     return View(m.Ministers);
 }
Esempio n. 6
0
 public ActionResult ContactDisplay(int cid)
 {
     var m = new ContactModel(cid);
     return View(m);
 }
Esempio n. 7
0
 public ActionResult NewTeamContact(int cid)
 {
     var m = new ContactModel(cid);
     var nid = m.AddNewTeamContact();
     return Redirect("/Contact2/" + nid);
 }
Esempio n. 8
0
        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);
            }
        }
Esempio n. 9
0
        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);
        }