123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using SysBaseLibs;
- using System.Web.Script.Serialization;
- namespace SysDataLibs.TableClass
- {
- #region Sys_Status
- public class Sys_Status_info : ITableInfo
- {
- #region Sys_Status表 字段信息
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 50;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 列的数值;
- /// </summary>
- public const string cCodeValue = "CodeValue";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 50;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 列名;
- /// </summary>
- public const string cColName = "ColName";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 30;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 列的显示值;
- /// </summary>
- public const string cDisplayValue = "DisplayValue";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nchar;
- /// 数据长度: 2;
- /// 是否允许为空: N;
- /// 默认值: (N'N');
- /// 描述: 是否锁定;
- /// </summary>
- public const string cIsLock = "IsLock";
- /// <summary>
- /// 为关键字段: Y --- PrimaryKey;
- /// 自动增长: Y;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 编号;
- /// </summary>
- public const string cSysStatusID = "SysStatusID";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 50;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 表名;
- /// </summary>
- public const string cTableName = "TableName";
- #endregion
- public Sys_Status_info(){}
-
- public Sys_Status_info(DataRow poRow)
- {
- CreateTableInfo(poRow);
- }
-
- public void CreateTableInfo(DataRow poRow)
- {
- _CodeValue=UtilStr.StrFromObj(poRow[cCodeValue]);
- _ColName=UtilStr.StrFromObj(poRow[cColName]);
- _DisplayValue=UtilStr.StrFromObj(poRow[cDisplayValue]);
- _IsLock=UtilStr.StrFromObj(poRow[cIsLock]);
- _SysStatusID=UtilStr.StrFromObj(poRow[cSysStatusID]);
- _TableName=UtilStr.StrFromObj(poRow[cTableName]);
- }
-
- public Sys_Status_info( string pcSysStatusID, DBConnSql poDBConn)
- {
- if ( pcSysStatusID.Trim().Length > 0 && poDBConn != null)
- {
- string lcSql = "select * from " + Tn.Sys_Status + " where SysStatusID='"+pcSysStatusID+"'";
- rsQuery loQuery = poDBConn.OpenQuery(lcSql);
- if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
- {
- loQuery.MoveFirst();
- CreateTableInfo(loQuery.CurrentRow);
- }
- }
- }
- private string _CodeValue="";
- public string CodeValue
- {
- get { return _CodeValue; }
- set { _CodeValue = value; }
- }
-
- private string _ColName="";
- public string ColName
- {
- get { return _ColName; }
- set { _ColName = value; }
- }
-
- private string _DisplayValue="";
- public string DisplayValue
- {
- get { return _DisplayValue; }
- set { _DisplayValue = value; }
- }
-
- private string _IsLock="";
- public string IsLock
- {
- get { return _IsLock; }
- set { _IsLock = value; }
- }
-
- private string _SysStatusID="";
- public string SysStatusID
- {
- get { return _SysStatusID; }
- set { _SysStatusID = value; }
- }
-
- private string _TableName="";
- public string TableName
- {
- get { return _TableName; }
- set { _TableName = value; }
- }
-
- [ScriptIgnore]
- public rsXmlNode DataXMLNode
- {
- get
- {
- rsXmlNode loMainNode = new rsXmlNode("Sys_StatusRecord", "");
- rsXmlNode loNode =null;
- loNode = new rsXmlNode(cCodeValue, CodeValue);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cColName, ColName);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cDisplayValue, DisplayValue);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cIsLock, IsLock);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSysStatusID, SysStatusID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cTableName, TableName);
- loMainNode.AddChild(loNode);
- return loMainNode ;
- }
- }
- public string InsertSql()
- {
- return " insert into "+Tn.Sys_Status+" "+
- " ("+cCodeValue+","+cColName+","+cDisplayValue+","+cIsLock+","+cTableName+") "+
- " values ('"+_CodeValue+"','"+_ColName+"','"+_DisplayValue+"','"+_IsLock+"','"+_TableName+"') " ;
- }
-
- public string UpdateSql()
- {
- return " update "+Tn.Sys_Status+" "+
- " set "+cCodeValue+"='"+_CodeValue+"',"+cColName+"='"+_ColName+"',"+cDisplayValue+"='"+_DisplayValue+"',"+cIsLock+"='"+_IsLock+"',"+cTableName+"='"+_TableName+"' "+
- " where "+cSysStatusID+"="+_SysStatusID+"" ;
- }
-
- public string DeleteSql()
- {
- return "Delete "+Tn.Sys_Status+" where "+cSysStatusID+"="+_SysStatusID+"" ;
- }
- }
- #endregion
- #region
- public class Sys_Status_Qry : rsQuery
- {
- public String CodeValue
- {
- get { return GetString(Sys_Status_info.cCodeValue); }
- // set { SetField(Sys_Status_info.cCodeValue, value); }
- }
-
- public String ColName
- {
- get { return GetString(Sys_Status_info.cColName); }
- // set { SetField(Sys_Status_info.cColName, value); }
- }
-
- public String DisplayValue
- {
- get { return GetString(Sys_Status_info.cDisplayValue); }
- // set { SetField(Sys_Status_info.cDisplayValue, value); }
- }
-
- public Boolean IsLock
- {
- get { return GetBool(Sys_Status_info.cIsLock); }
- // set { SetField(Sys_Status_info.cIsLock, value); }
- }
-
- public Int64 SysStatusID
- {
- get { return GetInt(Sys_Status_info.cSysStatusID); }
- // set { SetField(Sys_Status_info.cSysStatusID, value); }
- }
-
- public String TableName
- {
- get { return GetString(Sys_Status_info.cTableName); }
- // set { SetField(Sys_Status_info.cTableName, value); }
- }
-
- }
- #endregion
- }
|