示例#1
0
        public StudentFilterClauseModel GetDefaultStudentClause()
        {
            StudentFilterClauseModel m = new StudentFilterClauseModel(DynamicStudentClause.GetDefaultStudentClause(FilterId));
            m.FormArea = "My";
            m.FormController = "Contacts";
            m.FormAction = "AddStudentClause";
            m.SubmitText = "Add Clause";

            return m;
        }
示例#2
0
        public ActionResult AddStudentClause(StudentFilterClauseModel m)
        {
            try
            {
                DynamicStudentFilter f = new DynamicStudentFilter(m.FilterId);
                f.CreateClause(m.ToFilterClause());
                f.Refresh();

                return RedirectToAction("EditFilter", new { id = m.FilterId });
            }
            catch (Exception ex)
            {
                AnvilExceptionModel em = new AnvilExceptionModel(ex, "Create Student Clause", m.FormArea, m.FormController, "Index");

                return View("Error", em);
            }
        }
 public ActionResult AddStudentClause(StudentFilterClauseModel m)
 {
     DynamicStudentFilter f = new DynamicStudentFilter(m.FilterId);
     f.CreateClause(m.ToFilterClause());
     return RedirectToAction("StudentMembership", new { id = m.FilterId });
 }