Esempio n. 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);
 }
Esempio n. 2
0
    private long RulesetAddHandler()
    {
        string sName = "";
        RuleSet rsNew = new RuleSet(m_refContentApi.RequestInformationRef);

        if (!string.IsNullOrEmpty(Request.Form["txtRulesetName"]))
            sName = Request.Form["txtRulesetName"];
        rsNew.SetName(sName);
        if (!string.IsNullOrEmpty(Request.Form["txtIdentifier"]))
        {
            rsNew.SetIdentifier(Request.Form["txtIdentifier"]);
        }
        rsNew.Save();
        return rsNew.ID;
    }