示例#1
0
 private void RulesetSaveHandler()
 {
     string[] aruleids;
     string[] aenabledruleids;
     RuleSet rsNew = new RuleSet(m_refContentApi.RequestInformationRef, m_iID);
     if (!string.IsNullOrEmpty(Request.Form["txtactiverules"]))
     {
         aruleids = Strings.Split(Request.Form["txtactiverules"], ",", -1, 0);
     }
     else
     {
         aruleids = (string[])Array.CreateInstance(typeof(string), 0);
     }
     if (!string.IsNullOrEmpty(Request.Form["txtenabledrules"]))
     {
         aenabledruleids = Strings.Split(Request.Form["txtenabledrules"], ",", -1, 0);
     }
     else
     {
         aenabledruleids = (string[])Array.CreateInstance(typeof(string), 0);
     }
     rsNew.SetName(Request.Form[txtRulesetName.UniqueID]);
     rsNew.Save();
     rsNew.UpdateRules(aruleids, aenabledruleids);
 }