コード例 #1
0
ファイル: PersonController.cs プロジェクト: hkouns/bvcms
 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
ファイル: PersonController.cs プロジェクト: peclecl/bvcms
        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
ファイル: PersonController.cs プロジェクト: hkouns/bvcms
        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
ファイル: PersonalController.cs プロジェクト: hkouns/bvcms
 public ActionResult ProfileHeader(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/Header", m);
 }
コード例 #5
0
ファイル: PersonalController.cs プロジェクト: hkouns/bvcms
 public ActionResult PictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Personal/PictureDialog", m);
 }
コード例 #6
0
ファイル: FamilyController.cs プロジェクト: hkouns/bvcms
 public ActionResult FamilyPictureDialog(int id)
 {
     var m = new PersonModel(id);
     return View("Family/PictureDialog", m);
 }
コード例 #7
0
ファイル: PersonController.cs プロジェクト: stevesloka/bvcms
 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();
 }