using System; using System.Collections.Generic; using System.Text; using System.Data; using SysBaseLibs; using System.Web.Script.Serialization; namespace SysDataLibs.TableClass { #region Sys_Functions public partial class Sys_Functions_info : ITableInfo { #region Sys_Functions表 字段信息 /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: 深度; /// public const string cDepth = "Depth"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 10; /// 是否允许为空: N; /// 默认值: ; /// 描述: 父节菜单; /// public const string cFatherID = "FatherID"; /// /// 为关键字段: Y --- PrimaryKey; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 10; /// 是否允许为空: N; /// 默认值: ; /// 描述: 菜单编号; /// public const string cFunctionID = "FunctionID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nvarchar; /// 数据长度: 100; /// 是否允许为空: N; /// 默认值: ; /// 描述: 菜单名称; /// public const string cFunctionName = "FunctionName"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 增加; /// public const string cIsAdd = "IsAdd"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 审核; /// public const string cIsAudit = "IsAudit"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 是否后台显示; /// public const string cIsBack = "IsBack"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 是否可以浏览; /// public const string cIsBrowse = "IsBrowse"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 删除; /// public const string cIsDelete = "IsDelete"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 是否前台显示; /// public const string cIsFront = "IsFront"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 是否为叶; /// public const string cIsLeaf = "IsLeaf"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 打印; /// public const string cIsPrint = "IsPrint"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nchar; /// 数据长度: 2; /// 是否允许为空: N; /// 默认值: ; /// 描述: 修改; /// public const string cIsUpdate = "IsUpdate"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nvarchar; /// 数据长度: 600; /// 是否允许为空: Y; /// 默认值: ; /// 描述: PageName; /// public const string cPageName = "PageName"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 400; /// 是否允许为空: N; /// 默认值: ; /// 描述: 菜单路径; /// public const string cPath = "Path"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: 排序; /// public const string cSort = "Sort"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: smalldatetime; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: TimeCreated; /// public const string cTimeCreated = "TimeCreated"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: smalldatetime; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: TimeLastMod; /// public const string cTimeLastMod = "TimeLastMod"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 80; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 路径; /// public const string cURL = "URL"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 30; /// 是否允许为空: Y; /// 默认值: ; /// 描述: UserIDLastMod; /// public const string cUserIDLastMod = "UserIDLastMod"; #endregion public Sys_Functions_info() { } public Sys_Functions_info(DataRow poRow) { CreateTableInfo(poRow); } public void CreateTableInfo(DataRow poRow) { _Depth = UtilStr.StrFromObj(poRow[cDepth]); _FatherID = UtilStr.StrFromObj(poRow[cFatherID]); _FunctionID = UtilStr.StrFromObj(poRow[cFunctionID]); _FunctionName = UtilStr.StrFromObj(poRow[cFunctionName]); _IsAdd = UtilStr.StrFromObj(poRow[cIsAdd]); _IsAudit = UtilStr.StrFromObj(poRow[cIsAudit]); _IsBack = UtilStr.StrFromObj(poRow[cIsBack]); _IsBrowse = UtilStr.StrFromObj(poRow[cIsBrowse]); _IsDelete = UtilStr.StrFromObj(poRow[cIsDelete]); _IsFront = UtilStr.StrFromObj(poRow[cIsFront]); _IsLeaf = UtilStr.StrFromObj(poRow[cIsLeaf]); _IsPrint = UtilStr.StrFromObj(poRow[cIsPrint]); _IsUpdate = UtilStr.StrFromObj(poRow[cIsUpdate]); _PageName = UtilStr.StrFromObj(poRow[cPageName]); _Path = UtilStr.StrFromObj(poRow[cPath]); _Sort = UtilStr.StrFromObj(poRow[cSort]); _TimeCreated = UtilStr.StrFromObj(poRow[cTimeCreated]); _TimeLastMod = UtilStr.StrFromObj(poRow[cTimeLastMod]); _URL = UtilStr.StrFromObj(poRow[cURL]); _UserIDLastMod = UtilStr.StrFromObj(poRow[cUserIDLastMod]); } public Sys_Functions_info(string pcFunctionID, DBConnSql poDBConn) { if (pcFunctionID.Trim().Length > 0 && poDBConn != null) { string lcSql = "select * from " + Tn.Sys_Functions + " where FunctionID='" + pcFunctionID + "'"; rsQuery loQuery = poDBConn.OpenQuery(lcSql); if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1) { loQuery.MoveFirst(); CreateTableInfo(loQuery.CurrentRow); } } } private string _Depth = ""; public string Depth { get { return _Depth; } set { _Depth = value; } } private string _FatherID = ""; public string FatherID { get { return _FatherID; } set { _FatherID = value; } } private string _FunctionID = ""; public string FunctionID { get { return _FunctionID; } set { _FunctionID = value; } } private string _FunctionName = ""; public string FunctionName { get { return _FunctionName; } set { _FunctionName = value; } } private string _IsAdd = ""; public string IsAdd { get { return _IsAdd; } set { _IsAdd = value; } } private string _IsAudit = ""; public string IsAudit { get { return _IsAudit; } set { _IsAudit = value; } } private string _IsBack = ""; public string IsBack { get { return _IsBack; } set { _IsBack = value; } } private string _IsBrowse = ""; public string IsBrowse { get { return _IsBrowse; } set { _IsBrowse = value; } } private string _IsDelete = ""; public string IsDelete { get { return _IsDelete; } set { _IsDelete = value; } } private string _IsFront = ""; public string IsFront { get { return _IsFront; } set { _IsFront = value; } } private string _IsLeaf = ""; public string IsLeaf { get { return _IsLeaf; } set { _IsLeaf = value; } } private string _IsPrint = ""; public string IsPrint { get { return _IsPrint; } set { _IsPrint = value; } } private string _IsUpdate = ""; public string IsUpdate { get { return _IsUpdate; } set { _IsUpdate = value; } } private string _PageName = ""; public string PageName { get { return _PageName; } set { _PageName = value; } } private string _Path = ""; public string Path { get { return _Path; } set { _Path = value; } } private string _Sort = ""; public string Sort { get { return _Sort; } set { _Sort = value; } } private string _TimeCreated = ""; public string TimeCreated { get { return _TimeCreated; } set { _TimeCreated = value; } } private string _TimeLastMod = ""; public string TimeLastMod { get { return _TimeLastMod; } set { _TimeLastMod = value; } } private string _URL = ""; public string URL { get { return _URL; } set { _URL = value; } } private string _UserIDLastMod = ""; public string UserIDLastMod { get { return _UserIDLastMod; } set { _UserIDLastMod = value; } } [ScriptIgnore] public rsXmlNode DataXMLNode { get { rsXmlNode loMainNode = new rsXmlNode("Sys_FunctionsRecord", ""); rsXmlNode loNode = null; loNode = new rsXmlNode(cDepth, Depth); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cFatherID, FatherID); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cFunctionID, FunctionID); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cFunctionName, FunctionName); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsAdd, IsAdd); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsAudit, IsAudit); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsBack, IsBack); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsBrowse, IsBrowse); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsDelete, IsDelete); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsFront, IsFront); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsLeaf, IsLeaf); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsPrint, IsPrint); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsUpdate, IsUpdate); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cPageName, PageName); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cPath, Path); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cSort, Sort); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cTimeCreated, TimeCreated); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cTimeLastMod, TimeLastMod); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cURL, URL); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cUserIDLastMod, UserIDLastMod); loMainNode.AddChild(loNode); return loMainNode; } } public string InsertSql() { return " insert into " + Tn.Sys_Functions + " " + " (" + cDepth + "," + cFatherID + "," + cFunctionID + "," + cFunctionName + "," + cIsAdd + "," + cIsAudit + "," + cIsBack + "," + cIsBrowse + "," + cIsDelete + "," + cIsFront + "," + cIsLeaf + "," + cIsPrint + "," + cIsUpdate + "," + cPageName + "," + cPath + "," + cSort + "," + cTimeCreated + "," + cTimeLastMod + "," + cURL + "," + cUserIDLastMod + ") " + " values (" + _Depth + ",'" + _FatherID + "','" + _FunctionID + "','" + _FunctionName + "','" + _IsAdd + "','" + _IsAudit + "','" + _IsBack + "','" + _IsBrowse + "','" + _IsDelete + "','" + _IsFront + "','" + _IsLeaf + "','" + _IsPrint + "','" + _IsUpdate + "','" + _PageName + "','" + _Path + "'," + _Sort + ",'" + _TimeCreated + "','" + _TimeLastMod + "','" + _URL + "','" + _UserIDLastMod + "') "; } public string UpdateSql() { return " update " + Tn.Sys_Functions + " " + " set " + cDepth + "=" + _Depth + "," + cFatherID + "='" + _FatherID + "'," + cFunctionName + "='" + _FunctionName + "'," + cIsAdd + "='" + _IsAdd + "'," + cIsAudit + "='" + _IsAudit + "'," + cIsBack + "='" + _IsBack + "'," + cIsBrowse + "='" + _IsBrowse + "'," + cIsDelete + "='" + _IsDelete + "'," + cIsFront + "='" + _IsFront + "'," + cIsLeaf + "='" + _IsLeaf + "'," + cIsPrint + "='" + _IsPrint + "'," + cIsUpdate + "='" + _IsUpdate + "'," + cPageName + "='" + _PageName + "'," + cPath + "='" + _Path + "'," + cSort + "=" + _Sort + "," + cTimeCreated + "='" + _TimeCreated + "'," + cTimeLastMod + "='" + _TimeLastMod + "'," + cURL + "='" + _URL + "'," + cUserIDLastMod + "='" + _UserIDLastMod + "' " + " where " + cFunctionID + "='" + _FunctionID + "'"; } public string DeleteSql() { return "Delete " + Tn.Sys_Functions + " where " + cFunctionID + "='" + _FunctionID + "'"; } } #endregion #region public class Sys_Functions_Qry : rsQuery { public Int64 Depth { get { return GetInt(Sys_Functions_info.cDepth); } // set { SetField(Sys_Functions_info.cDepth, value); } } public String FatherID { get { return GetString(Sys_Functions_info.cFatherID); } // set { SetField(Sys_Functions_info.cFatherID, value); } } public String FunctionID { get { return GetString(Sys_Functions_info.cFunctionID); } // set { SetField(Sys_Functions_info.cFunctionID, value); } } public String FunctionName { get { return GetString(Sys_Functions_info.cFunctionName); } // set { SetField(Sys_Functions_info.cFunctionName, value); } } public Boolean IsAdd { get { return GetBool(Sys_Functions_info.cIsAdd); } // set { SetField(Sys_Functions_info.cIsAdd, value); } } public Boolean IsAudit { get { return GetBool(Sys_Functions_info.cIsAudit); } // set { SetField(Sys_Functions_info.cIsAudit, value); } } public Boolean IsBack { get { return GetBool(Sys_Functions_info.cIsBack); } // set { SetField(Sys_Functions_info.cIsBack, value); } } public Boolean IsBrowse { get { return GetBool(Sys_Functions_info.cIsBrowse); } // set { SetField(Sys_Functions_info.cIsBrowse, value); } } public Boolean IsDelete { get { return GetBool(Sys_Functions_info.cIsDelete); } // set { SetField(Sys_Functions_info.cIsDelete, value); } } public Boolean IsFront { get { return GetBool(Sys_Functions_info.cIsFront); } // set { SetField(Sys_Functions_info.cIsFront, value); } } public Boolean IsLeaf { get { return GetBool(Sys_Functions_info.cIsLeaf); } // set { SetField(Sys_Functions_info.cIsLeaf, value); } } public Boolean IsPrint { get { return GetBool(Sys_Functions_info.cIsPrint); } // set { SetField(Sys_Functions_info.cIsPrint, value); } } public Boolean IsUpdate { get { return GetBool(Sys_Functions_info.cIsUpdate); } // set { SetField(Sys_Functions_info.cIsUpdate, value); } } public String PageName { get { return GetString(Sys_Functions_info.cPageName); } // set { SetField(Sys_Functions_info.cPageName, value); } } public String Path { get { return GetString(Sys_Functions_info.cPath); } // set { SetField(Sys_Functions_info.cPath, value); } } public Int64 Sort { get { return GetInt(Sys_Functions_info.cSort); } // set { SetField(Sys_Functions_info.cSort, value); } } public DateTime TimeCreated { get { return GetDateTime(Sys_Functions_info.cTimeCreated); } // set { SetField(Sys_Functions_info.cTimeCreated, value); } } public DateTime TimeLastMod { get { return GetDateTime(Sys_Functions_info.cTimeLastMod); } // set { SetField(Sys_Functions_info.cTimeLastMod, value); } } public String URL { get { return GetString(Sys_Functions_info.cURL); } // set { SetField(Sys_Functions_info.cURL, value); } } public String UserIDLastMod { get { return GetString(Sys_Functions_info.cUserIDLastMod); } // set { SetField(Sys_Functions_info.cUserIDLastMod, value); } } } #endregion }