コード例 #1
0
        public ActionResult SelectCondition(int id, string conditionName)
        {
            var m = new AdvancedModel {
                SelectedId = id
            };

            m.LoadScratchPad();
            m.ConditionName = conditionName;
            m.SetVisibility();
            m.TextValue    = "";
            m.IntegerValue = "";
            m.DateValue    = "";
            m.CodeValue    = "";
            m.CodeValues   = new string[0];
            m.Days         = "";
            m.Age          = "";
            m.Program      = 0;
            m.Quarters     = "";
            m.StartDate    = "";
            m.EndDate      = "";
            m.Comparison   = "Equal";
            m.UpdateCondition();
            m.SelectedId = id;
            return(View("Conditions", m));
        }
コード例 #2
0
 public ActionResult SaveCondition(AdvancedModel m)
 {
     m.LoadScratchPad();
     if (m.Validate(ModelState))
     {
         m.UpdateCondition();
         DbUtil.Db.SubmitChanges();
     }
     return(View("Conditions", m));
 }