示例#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();
 }
示例#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);
        }
示例#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);
        }
示例#4
0
 public ActionResult ProfileHeader(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/Header", m);
 }
示例#5
0
 public ActionResult PictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/PictureDialog", m);
 }
示例#6
0
 public ActionResult FamilyPictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Family/PictureDialog", m);
 }
示例#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();
 }