public static DataSet GetPagerData(int intPageSize, int intCurrentPageIndex) { int num = 0; int num2 = 0; return(Ver.GetPagerData(intPageSize, intCurrentPageIndex, ref num, ref num2)); }
public static VerInfo GetVer() { VerInfo verInfo = (VerInfo)CacheUtils.Get("JsonLeeCMS_CacheForVER"); if (verInfo == null) { verInfo = Ver.GetData(); CacheUtils.Insert("JsonLeeCMS_CacheForVER", verInfo, 60, 1); } return(verInfo); }
public static IList <VerInfo> GetAllList() { return(Ver.GetList(0, string.Empty)); }
public static VerInfo GetTopData() { return(Ver.GetTopData(" Sort ASC,SoftName desc ")); }
public static IList <VerInfo> GetPagerList(int intCurrentPageIndex, int intPageSize, ref int intTotalCount, ref int intTotalPage) { return(Ver.GetPagerList("", "Sort ASC,AutoID DESC", intCurrentPageIndex, intPageSize, ref intTotalCount, ref intTotalPage)); }
public static DataSet GetPagerData(string strFilter, string strCondition, int intPageSize, int intCurrentPageIndex, ref int intTotalCount, ref int intTotalPage) { return(Ver.GetPagerData(strFilter, strCondition, " Sort asc,SoftName desc ", intPageSize, intCurrentPageIndex, ref intTotalCount, ref intTotalPage)); }
public static DataSet GetPagerData(string strCondition, int intPageSize, int intCurrentPageIndex, ref int intTotalCount, ref int intTotalPage) { return(Ver.GetPagerData("*", strCondition, intPageSize, intCurrentPageIndex, ref intTotalCount, ref intTotalPage)); }
public static DataSet GetPagerData(int intPageSize, int intCurrentPageIndex, ref int intTotalCount, ref int intTotalPage) { return(Ver.GetPagerData("*", string.Empty, intPageSize, intCurrentPageIndex, ref intTotalCount, ref intTotalPage)); }
public static IList <VerInfo> GetList(int intTopCount, string strCondition) { string strSort = " Sort asc,SoftName desc "; return(Ver.GetList(intTopCount, strCondition, strSort)); }
public static IList <VerInfo> GetTopNList(int intTopCount, string strSort) { return(Ver.GetList(intTopCount, string.Empty, strSort)); }
public static NodeAddStatus Add(NodeInfo node, out int newNodeID) { newNodeID = 0; NodeAddStatus result; if (Node.GetMainNodeCount() >= Ver.GetVer().NodeLimit&& node.IsShowOnMenu) { result = NodeAddStatus.ToMoreNode; } else { node.Creator = Account.GetLoginAccount().AccountName; node.ChildCount = 0; int num = Node.ExistsNode(node.ParentID, node.NodeName, node.UrlRewriteName, "Add", 0); if (num > 0) { result = (NodeAddStatus)num; } else { if (node.ParentID > 0) { NodeInfo cacheNodeById = Node.GetCacheNodeById(node.ParentID); if (cacheNodeById == null) { result = NodeAddStatus.ParentNodeNotExists; return(result); } node.ParentPath = cacheNodeById.ParentPath + "," + cacheNodeById.AutoID.ToString(); node.RootID = cacheNodeById.RootID; node.Depth = cacheNodeById.Depth + 1; node.Sort = BizBase.dbo.GetValue <int>(" SELECT max(Sort) FROM cms_Node WHERE ParentID=" + node.RootID) + 1; } else { node.ParentPath = "0"; node.Depth = 1; node.Sort = BizBase.dbo.GetValue <int>(" SELECT max(Sort) FROM cms_Node WHERE ParentID=0") + 1; } node.Setting = XmlSerializerUtils.Serialize <NodeSetting>(node.NodeSetting); newNodeID = BizBase.dbo.InsertModel <NodeInfo>(node); if (newNodeID > 0) { node.AutoID = newNodeID; BizBase.dbo.ExecSQL(string.Concat(new object[] { " UPDATE cms_Node SET ChildList = '", newNodeID, "' WHERE AutoID=", newNodeID })); if (node.ParentID > 0) { BizBase.dbo.ExecSQL(" UPDATE CMS_Node SET ChildCount = ChildCount + 1 WHERE AutoID =" + node.ParentID); Node.UpdateNowParents(node, "Add"); } else { BizBase.dbo.ExecSQL(string.Concat(new object[] { " UPDATE cms_Node SET RootID = ", newNodeID, " WHERE AutoID=", newNodeID })); } CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); result = NodeAddStatus.Success; } else { CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); result = NodeAddStatus.Error; } } } return(result); }
public static NodeUpdateStatus Update(NodeInfo node) { NodeInfo dataById = Node.GetDataById(node.AutoID); node.Setting = XmlSerializerUtils.Serialize <NodeSetting>(node.NodeSetting); int num = Node.ExistsNode(node.ParentID, node.NodeName, node.UrlRewriteName, "Modify", dataById.AutoID); NodeUpdateStatus result; if (num > 0) { result = (NodeUpdateStatus)num; } else if (!dataById.IsShowOnMenu && node.IsShowOnMenu && Node.GetMainNodeCount() >= Ver.GetVer().NodeLimit) { result = NodeUpdateStatus.ToMoreNode; } else if (BizBase.dbo.UpdateModel <NodeInfo>(node)) { CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); result = NodeUpdateStatus.Success; } else { CacheUtils.Del("JsonLeeCMS_CacheForGetCMSNode"); result = NodeUpdateStatus.Error; } return(result); }