123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using SysBaseLibs;
- using System.Web.Script.Serialization;
- namespace SysDataLibs.TableClass
- {
- #region CheckMethod
- public class CheckMethod_info : ITableInfo
- {
- #region CheckMethod表 字段信息
- /// <summary>
- /// 为关键字段: Y --- PrimaryKey;
- /// 自动增长: Y;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: CheckMethodId;
- /// </summary>
- public const string cCheckMethodId = "CheckMethodId";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 100;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: CheckMethodName;
- /// </summary>
- public const string cCheckMethodName = "CheckMethodName";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nchar;
- /// 数据长度: 2;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: IsLock;
- /// </summary>
- public const string cIsLock = "IsLock";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: -1;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: Remark;
- /// </summary>
- public const string cRemark = "Remark";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: Sort;
- /// </summary>
- public const string cSort = "Sort";
- #endregion
- public CheckMethod_info(){}
-
- public CheckMethod_info(DataRow poRow)
- {
- CreateTableInfo(poRow);
- }
-
- public void CreateTableInfo(DataRow poRow)
- {
- _CheckMethodId=UtilStr.StrFromObj(poRow[cCheckMethodId]);
- _CheckMethodName=UtilStr.StrFromObj(poRow[cCheckMethodName]);
- _IsLock=UtilStr.StrFromObj(poRow[cIsLock]);
- _Remark=UtilStr.StrFromObj(poRow[cRemark]);
- _Sort=UtilStr.StrFromObj(poRow[cSort]);
- }
-
- public CheckMethod_info( string pcCheckMethodId, DBConnSql poDBConn)
- {
- if ( pcCheckMethodId.Trim().Length > 0 && poDBConn != null)
- {
- string lcSql = "select * from " + Tn.CheckMethod + " where CheckMethodId='"+pcCheckMethodId+"'";
- rsQuery loQuery = poDBConn.OpenQuery(lcSql);
- if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
- {
- loQuery.MoveFirst();
- CreateTableInfo(loQuery.CurrentRow);
- }
- }
- }
- private string _CheckMethodId="";
- public string CheckMethodId
- {
- get { return _CheckMethodId; }
- set { _CheckMethodId = value; }
- }
-
- private string _CheckMethodName="";
- public string CheckMethodName
- {
- get { return _CheckMethodName; }
- set { _CheckMethodName = value; }
- }
-
- private string _IsLock="";
- public string IsLock
- {
- get { return _IsLock; }
- set { _IsLock = value; }
- }
-
- private string _Remark="";
- public string Remark
- {
- get { return _Remark; }
- set { _Remark = value; }
- }
-
- private string _Sort="";
- public string Sort
- {
- get { return _Sort; }
- set { _Sort = value; }
- }
-
- [ScriptIgnore]
- public rsXmlNode DataXMLNode
- {
- get
- {
- rsXmlNode loMainNode = new rsXmlNode("CheckMethodRecord", "");
- rsXmlNode loNode =null;
- loNode = new rsXmlNode(cCheckMethodId, CheckMethodId);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cCheckMethodName, CheckMethodName);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cIsLock, IsLock);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cRemark, Remark);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSort, Sort);
- loMainNode.AddChild(loNode);
- return loMainNode ;
- }
- }
- public string InsertSql()
- {
- return " insert into "+Tn.CheckMethod+" "+
- " ("+cCheckMethodName+","+cIsLock+","+cRemark+","+cSort+") "+
- " values ('"+_CheckMethodName+"','"+_IsLock+"','"+_Remark+"',"+_Sort+") " ;
- }
-
- public string UpdateSql()
- {
- return " update "+Tn.CheckMethod+" "+
- " set "+cCheckMethodName+"='"+_CheckMethodName+"',"+cIsLock+"='"+_IsLock+"',"+cRemark+"='"+_Remark+"',"+cSort+"="+_Sort+" "+
- " where "+cCheckMethodId+"="+_CheckMethodId+"" ;
- }
-
- public string DeleteSql()
- {
- return "Delete "+Tn.CheckMethod+" where "+cCheckMethodId+"="+_CheckMethodId+"" ;
- }
- }
- #endregion
- #region
- public class CheckMethod_Qry : rsQuery
- {
- public Int64 CheckMethodId
- {
- get { return GetInt(CheckMethod_info.cCheckMethodId); }
- // set { SetField(CheckMethod_info.cCheckMethodId, value); }
- }
-
- public String CheckMethodName
- {
- get { return GetString(CheckMethod_info.cCheckMethodName); }
- // set { SetField(CheckMethod_info.cCheckMethodName, value); }
- }
-
- public Boolean IsLock
- {
- get { return GetBool(CheckMethod_info.cIsLock); }
- // set { SetField(CheckMethod_info.cIsLock, value); }
- }
-
- public String Remark
- {
- get { return GetString(CheckMethod_info.cRemark); }
- // set { SetField(CheckMethod_info.cRemark, value); }
- }
-
- public Int64 Sort
- {
- get { return GetInt(CheckMethod_info.cSort); }
- // set { SetField(CheckMethod_info.cSort, value); }
- }
-
- }
- #endregion
- }
|