Пример #1
0
        public int ContentManage_Html(int id, string action)
        {
            B_Create     createBll = new B_Create();
            M_CommonData conMod    = contentBll.SelReturnModel(id);

            switch (action)
            {
            case "create":
            {
                conMod.IsCreate = 1;
                contentBll.UpdateByID(conMod);
                createBll.CreateInfo(conMod.GeneralID, conMod.NodeID, conMod.ModelID);
                createBll.CreatePageIndex();
            }
            break;

            case "del":
            {
                if (!string.IsNullOrEmpty(conMod.HtmlLink))
                {
                    conMod.HtmlLink = "";
                    SafeSC.DelFile(conMod.HtmlLink);
                }
                conMod.IsCreate = 0;
                createBll.CreatePageIndex();
                contentBll.UpdateByID(conMod);
            }
            break;
            }
            return(M_APIResult.Success);
        }
Пример #2
0
 //全站生成,或生成指定节点下全站内容页
 private void CreateSiteAll(string NodeIDS)
 {
     if (string.IsNullOrEmpty(NodeIDS))
     {
         bc.CreateInfo();
     }
     else
     {
         foreach (string nodeid in NodeIDS.Split(','))
         {
             int nid = DataConverter.CLng(nodeid);
             if (nid < 1)
             {
                 continue;
             }
             bc.CreateInfo(nid);
         }
     }
 }