123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using SysBaseLibs;
- using System.Web.Script.Serialization;
- namespace SysDataLibs.TableClass
- {
- #region SpecialsMapping
- public class SpecialsMapping_info : ITableInfo
- {
- #region SpecialsMapping表 字段信息
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: Name;
- /// </summary>
- public const string cName = "Name";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 40;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: SpecialsID;
- /// </summary>
- public const string cSpecialsID = "SpecialsID";
- /// <summary>
- /// 为关键字段: Y --- PrimaryKey;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 100;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: SpecialsMappingID;
- /// </summary>
- public const string cSpecialsMappingID = "SpecialsMappingID";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: szLittleKindCode;
- /// </summary>
- public const string cszLittleKindCode = "szLittleKindCode";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: nvarchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: szMappingContent;
- /// </summary>
- public const string cszMappingContent = "szMappingContent";
- #endregion
- public SpecialsMapping_info(){}
-
- public SpecialsMapping_info(DataRow poRow)
- {
- CreateTableInfo(poRow);
- }
-
- public void CreateTableInfo(DataRow poRow)
- {
- _Name=UtilStr.StrFromObj(poRow[cName]);
- _SpecialsID=UtilStr.StrFromObj(poRow[cSpecialsID]);
- _SpecialsMappingID=UtilStr.StrFromObj(poRow[cSpecialsMappingID]);
- _szLittleKindCode=UtilStr.StrFromObj(poRow[cszLittleKindCode]);
- _szMappingContent=UtilStr.StrFromObj(poRow[cszMappingContent]);
- }
-
- public SpecialsMapping_info( string pcSpecialsMappingID, DBConnSql poDBConn)
- {
- if ( pcSpecialsMappingID.Trim().Length > 0 && poDBConn != null)
- {
- string lcSql = "select * from " + Tn.SpecialsMapping + " where SpecialsMappingID='"+pcSpecialsMappingID+"'";
- rsQuery loQuery = poDBConn.OpenQuery(lcSql);
- if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
- {
- loQuery.MoveFirst();
- CreateTableInfo(loQuery.CurrentRow);
- }
- }
- }
- private string _Name="";
- public string Name
- {
- get { return _Name; }
- set { _Name = value; }
- }
-
- private string _SpecialsID="";
- public string SpecialsID
- {
- get { return _SpecialsID; }
- set { _SpecialsID = value; }
- }
-
- private string _SpecialsMappingID="";
- public string SpecialsMappingID
- {
- get { return _SpecialsMappingID; }
- set { _SpecialsMappingID = value; }
- }
-
- private string _szLittleKindCode="";
- public string szLittleKindCode
- {
- get { return _szLittleKindCode; }
- set { _szLittleKindCode = value; }
- }
-
- private string _szMappingContent="";
- public string szMappingContent
- {
- get { return _szMappingContent; }
- set { _szMappingContent = value; }
- }
-
- [ScriptIgnore]
- public rsXmlNode DataXMLNode
- {
- get
- {
- rsXmlNode loMainNode = new rsXmlNode("SpecialsMappingRecord", "");
- rsXmlNode loNode =null;
- loNode = new rsXmlNode(cName, Name);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSpecialsID, SpecialsID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSpecialsMappingID, SpecialsMappingID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cszLittleKindCode, szLittleKindCode);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cszMappingContent, szMappingContent);
- loMainNode.AddChild(loNode);
- return loMainNode ;
- }
- }
- public string InsertSql()
- {
- return " insert into "+Tn.SpecialsMapping+" "+
- " ("+cName+","+cSpecialsID+","+cSpecialsMappingID+","+cszLittleKindCode+","+cszMappingContent+") "+
- " values ('"+_Name+"','"+_SpecialsID+"','"+_SpecialsMappingID+"','"+_szLittleKindCode+"','"+_szMappingContent+"') " ;
- }
-
- public string UpdateSql()
- {
- return " update "+Tn.SpecialsMapping+" "+
- " set "+cName+"='"+_Name+"',"+cSpecialsID+"='"+_SpecialsID+"',"+cszLittleKindCode+"='"+_szLittleKindCode+"',"+cszMappingContent+"='"+_szMappingContent+"' "+
- " where "+cSpecialsMappingID+"='"+_SpecialsMappingID+"'" ;
- }
-
- public string DeleteSql()
- {
- return "Delete "+Tn.SpecialsMapping+" where "+cSpecialsMappingID+"='"+_SpecialsMappingID+"'" ;
- }
- }
- #endregion
- #region
- public class SpecialsMapping_Qry : rsQuery
- {
- public String Name
- {
- get { return GetString(SpecialsMapping_info.cName); }
- // set { SetField(SpecialsMapping_info.cName, value); }
- }
-
- public String SpecialsID
- {
- get { return GetString(SpecialsMapping_info.cSpecialsID); }
- // set { SetField(SpecialsMapping_info.cSpecialsID, value); }
- }
-
- public String SpecialsMappingID
- {
- get { return GetString(SpecialsMapping_info.cSpecialsMappingID); }
- // set { SetField(SpecialsMapping_info.cSpecialsMappingID, value); }
- }
-
- public String szLittleKindCode
- {
- get { return GetString(SpecialsMapping_info.cszLittleKindCode); }
- // set { SetField(SpecialsMapping_info.cszLittleKindCode, value); }
- }
-
- public String szMappingContent
- {
- get { return GetString(SpecialsMapping_info.cszMappingContent); }
- // set { SetField(SpecialsMapping_info.cszMappingContent, value); }
- }
-
- }
- #endregion
- }
|