Exemplo n.º 1
0
 public ActionResult Drop(OrgMemberModel m)
 {
     DbUtil.LogActivity(m.RemoveFromEnrollmentHistory
         ? $"removed enrollment history on {m.PeopleId} for {m.OrgId}"
         : $"dropped {m.PeopleId} for {m.OrgId}");
     m.Drop();
     return(Content("Done"));
 }
Exemplo n.º 2
0
        public ActionResult DeleteQuestion(string id)
        {
            var a   = id.Split(',');
            var oid = a[0].ToInt();
            var pid = a[1].ToInt();
            var n   = a[2].ToInt();
            var typ = a[3];
            var m   = new OrgMemberModel(oid, pid);

            m.DeleteQuestion(n, typ);
            return(Content("ok"));
        }
Exemplo n.º 3
0
 public ActionResult Update(OrgMemberModel m)
 {
     try
     {
         m.UpdateModel();
     }
     catch (Exception)
     {
         ViewData["MemberTypes"] = CodeValueModel.ConvertToSelect(CodeValueModel.MemberTypeCodes(), "Id");
         return(View("Edit", m));
     }
     return(View("Display", m));
 }
Exemplo n.º 4
0
        public ActionResult EditQuestion(string id, string value)
        {
            var a   = id.Split(',');
            var oid = a[0].ToInt();
            var pid = a[1].ToInt();
            var n   = a[2].ToInt();
            var m   = new OrgMemberModel(oid, pid);

            m.UpdateQuestion(n, value);

            DbUtil.LogActivity("OrgMem EditQuestion " + n, oid, pid);
            var c = Content(value);

            return(c);
        }
Exemplo n.º 5
0
 public ActionResult AddQuestions(OrgMemberModel m)
 {
     m.AddQuestions();
     return(Content("ok"));
 }
Exemplo n.º 6
0
 public ActionResult Edit(OrgMemberModel m)
 {
     return(View(m));
 }
Exemplo n.º 7
0
 public ActionResult SmallGroupChecked(int sgtagid, bool ck, OrgMemberModel m)
 {
     return(Content(m.SmallGroupChanged(sgtagid, ck)));
 }
Exemplo n.º 8
0
 public ActionResult Display(OrgMemberModel m)
 {
     return(View("Display", m));
 }
Exemplo n.º 9
0
        public ActionResult Display(string group, int oid, int pid)
        {
            var m = new OrgMemberModel(group, oid, pid);

            return(View("Display", m));
        }
Exemplo n.º 10
0
 public ActionResult ShowDrop(OrgMemberModel m)
 {
     return(View(m));
 }
Exemplo n.º 11
0
 public ActionResult AddNewSmallGroup(int id, OrgMemberModel m)
 {
     m.AddNewSmallGroup(id);
     ModelState.Clear();
     return(View("Tabs/Groups", m));
 }
        public ActionResult Edit(int oid, int pid)
        {
            var m = new OrgMemberModel(oid, pid);

            return(View(m));
        }