Esempio n. 1
0
 public ActionResult InlineEdit(int id, int pk, string name, string value)
 {
     var m = new PersonModel(id);
     switch (name)
     {
         case "ContributionOptions":
         case "EnvelopeOptions":
             m.UpdateEnvelopeOption(name, value.ToInt());
             break;
     }
     return new EmptyResult();
 }
Esempio n. 2
0
        public ActionResult Index(int? id)
        {
            if (!id.HasValue)
                return Content("no id");

            var m = new PersonModel(id.Value);
            var noview = m.CheckView();
            if (noview.HasValue())
                return Content(noview);

            ViewBag.Comments = Util.SafeFormat(m.Person.Comments);
            ViewBag.PeopleId = id.Value;
            Util2.CurrentPeopleId = id.Value;
            Session["ActivePerson"] = m.Person.Name;
            DbUtil.LogPersonActivity($"Viewing Person: {m.Person.Name}", id.Value, m.Person.Name);
            InitExportToolbar(id);
            return View(m);
        }
Esempio n. 3
0
        public ActionResult Index(int? id)
        {
            if (!ViewExtensions2.UseNewLook() && User.IsInRole("Access"))
                return Redirect("/Person/Index/" + id);
            if (!id.HasValue)
                return Content("no id");

            var m = new PersonModel(id.Value);
            var noview = m.CheckView();
            if (noview.HasValue())
                return Content(noview);

            ViewBag.Comments = Util.SafeFormat(m.Person.Comments);
            ViewBag.PeopleId = id.Value;
            Util2.CurrentPeopleId = id.Value;
            Session["ActivePerson"] = m.Person.Name;
            DbUtil.LogActivity("Viewing Person: {0}".Fmt(m.Person.Name), m.Person.Name, pid: id);
            InitExportToolbar(id);
            return View(m);
        }
Esempio n. 4
0
 public ActionResult ProfileHeader(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/Header", m);
 }
Esempio n. 5
0
 public ActionResult PictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/PictureDialog", m);
 }
Esempio n. 6
0
 public ActionResult FamilyPictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Family/PictureDialog", m);
 }
Esempio n. 7
0
 public ActionResult InlineEdit(int id, int pk, string name, string value)
 {
     var m = new PersonModel(id);
     switch (name)
     {
         case "ContributionOptions":
             m.Person.UpdateContributionOption(DbUtil.Db, value.ToInt());
             break;
         case "EnvelopeOptions":
             m.Person.UpdateEnvelopeOption(DbUtil.Db, value.ToInt());
             break;
         case "ElectronicStatement":
             m.Person.UpdateElectronicStatement(DbUtil.Db, value.ToBool());
             break;
     }
     return new EmptyResult();
 }