123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Data;
- using SysBaseLibs;
- using System.Web.Script.Serialization;
- namespace SysDataLibs.TableClass
- {
- #region SaleDestLog
- public class SaleDestLog_info : ITableInfo
- {
- #region SaleDestLog表 字段信息
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 200;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 销售去向;
- /// </summary>
- public const string cDestination = "Destination";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 记录人;
- /// </summary>
- public const string cExecutor = "Executor";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 100;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 商品名称;
- /// </summary>
- public const string cGoodsName = "GoodsName";
- /// <summary>
- /// 为关键字段: Y --- PrimaryKey;
- /// 自动增长: Y;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 编号;
- /// </summary>
- public const string cID = "ID";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: char;
- /// 数据长度: 10;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 市场编号;
- /// </summary>
- public const string cMarketID = "MarketID";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 规格类型;
- /// </summary>
- public const string cModelType = "ModelType";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 200;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 备注;
- /// </summary>
- public const string cNotes = "Notes";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 生产批号;
- /// </summary>
- public const string cProduceBatch = "ProduceBatch";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: Y;
- /// 默认值: ((0));
- /// 描述: 数量;
- /// </summary>
- public const string cSaleCount = "SaleCount";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: datetime;
- /// 数据长度: 8;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 销售时间;
- /// </summary>
- public const string cSaleTime = "SaleTime";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: int;
- /// 数据长度: 4;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 经营户;
- /// </summary>
- public const string cSellerID = "SellerID";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: datetime;
- /// 数据长度: 8;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 进货时间;
- /// </summary>
- public const string cStockTime = "StockTime";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 100;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 商品商标;
- /// </summary>
- public const string cTradeMark = "TradeMark";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: datetime;
- /// 数据长度: 8;
- /// 是否允许为空: Y;
- /// 默认值: ;
- /// 描述: 更新时间;
- /// </summary>
- public const string cUpdateTime = "UpdateTime";
- /// <summary>
- /// 为关键字段: N ;
- /// 自动增长: N;
- /// 数据类型: varchar;
- /// 数据长度: 30;
- /// 是否允许为空: N;
- /// 默认值: ;
- /// 描述: 用户编号;
- /// </summary>
- public const string cUserID = "UserID";
- #endregion
- public SaleDestLog_info(){}
-
- public SaleDestLog_info(DataRow poRow)
- {
- CreateTableInfo(poRow);
- }
-
- public void CreateTableInfo(DataRow poRow)
- {
- _Destination=UtilStr.StrFromObj(poRow[cDestination]);
- _Executor=UtilStr.StrFromObj(poRow[cExecutor]);
- _GoodsName=UtilStr.StrFromObj(poRow[cGoodsName]);
- _ID=UtilStr.StrFromObj(poRow[cID]);
- _MarketID=UtilStr.StrFromObj(poRow[cMarketID]);
- _ModelType=UtilStr.StrFromObj(poRow[cModelType]);
- _Notes=UtilStr.StrFromObj(poRow[cNotes]);
- _ProduceBatch=UtilStr.StrFromObj(poRow[cProduceBatch]);
- _SaleCount=UtilStr.StrFromObj(poRow[cSaleCount]);
- _SaleTime=UtilStr.StrFromObj(poRow[cSaleTime]);
- _SellerID=UtilStr.StrFromObj(poRow[cSellerID]);
- _StockTime=UtilStr.StrFromObj(poRow[cStockTime]);
- _TradeMark=UtilStr.StrFromObj(poRow[cTradeMark]);
- _UpdateTime=UtilStr.StrFromObj(poRow[cUpdateTime]);
- _UserID=UtilStr.StrFromObj(poRow[cUserID]);
- }
-
- public SaleDestLog_info( string pcID, DBConnSql poDBConn)
- {
- if ( pcID.Trim().Length > 0 && poDBConn != null)
- {
- string lcSql = "select * from " + Tn.SaleDestLog + " where ID='"+pcID+"'";
- rsQuery loQuery = poDBConn.OpenQuery(lcSql);
- if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1)
- {
- loQuery.MoveFirst();
- CreateTableInfo(loQuery.CurrentRow);
- }
- }
- }
- private string _Destination="";
- public string Destination
- {
- get { return _Destination; }
- set { _Destination = value; }
- }
-
- private string _Executor="";
- public string Executor
- {
- get { return _Executor; }
- set { _Executor = value; }
- }
-
- private string _GoodsName="";
- public string GoodsName
- {
- get { return _GoodsName; }
- set { _GoodsName = value; }
- }
-
- private string _ID="";
- public string ID
- {
- get { return _ID; }
- set { _ID = value; }
- }
-
- private string _MarketID="";
- public string MarketID
- {
- get { return _MarketID; }
- set { _MarketID = value; }
- }
-
- private string _ModelType="";
- public string ModelType
- {
- get { return _ModelType; }
- set { _ModelType = value; }
- }
-
- private string _Notes="";
- public string Notes
- {
- get { return _Notes; }
- set { _Notes = value; }
- }
-
- private string _ProduceBatch="";
- public string ProduceBatch
- {
- get { return _ProduceBatch; }
- set { _ProduceBatch = value; }
- }
-
- private string _SaleCount="";
- public string SaleCount
- {
- get { return _SaleCount; }
- set { _SaleCount = value; }
- }
-
- private string _SaleTime="";
- public string SaleTime
- {
- get { return _SaleTime; }
- set { _SaleTime = value; }
- }
-
- private string _SellerID="";
- public string SellerID
- {
- get { return _SellerID; }
- set { _SellerID = value; }
- }
-
- private string _StockTime="";
- public string StockTime
- {
- get { return _StockTime; }
- set { _StockTime = value; }
- }
-
- private string _TradeMark="";
- public string TradeMark
- {
- get { return _TradeMark; }
- set { _TradeMark = value; }
- }
-
- private string _UpdateTime="";
- public string UpdateTime
- {
- get { return _UpdateTime; }
- set { _UpdateTime = value; }
- }
-
- private string _UserID="";
- public string UserID
- {
- get { return _UserID; }
- set { _UserID = value; }
- }
-
- [ScriptIgnore]
- public rsXmlNode DataXMLNode
- {
- get
- {
- rsXmlNode loMainNode = new rsXmlNode("SaleDestLogRecord", "");
- rsXmlNode loNode =null;
- loNode = new rsXmlNode(cDestination, Destination);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cExecutor, Executor);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cGoodsName, GoodsName);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cID, ID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cMarketID, MarketID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cModelType, ModelType);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cNotes, Notes);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cProduceBatch, ProduceBatch);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSaleCount, SaleCount);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSaleTime, SaleTime);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cSellerID, SellerID);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cStockTime, StockTime);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cTradeMark, TradeMark);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cUpdateTime, UpdateTime);
- loMainNode.AddChild(loNode);
- loNode = new rsXmlNode(cUserID, UserID);
- loMainNode.AddChild(loNode);
- return loMainNode ;
- }
- }
- public string InsertSql()
- {
- return " insert into "+Tn.SaleDestLog+" "+
- " ("+cDestination+","+cExecutor+","+cGoodsName+","+cMarketID+","+cModelType+","+cNotes+","+cProduceBatch+","+cSaleCount+","+cSaleTime+","+cSellerID+","+cStockTime+","+cTradeMark+","+cUpdateTime+","+cUserID+") "+
- " values ('"+_Destination+"','"+_Executor+"','"+_GoodsName+"','"+_MarketID+"','"+_ModelType+"','"+_Notes+"','"+_ProduceBatch+"',"+_SaleCount+",'"+_SaleTime+"',"+_SellerID+",'"+_StockTime+"','"+_TradeMark+"','"+_UpdateTime+"','"+_UserID+"') " ;
- }
-
- public string UpdateSql()
- {
- return " update "+Tn.SaleDestLog+" "+
- " set "+cDestination+"='"+_Destination+"',"+cExecutor+"='"+_Executor+"',"+cGoodsName+"='"+_GoodsName+"',"+cMarketID+"='"+_MarketID+"',"+cModelType+"='"+_ModelType+"',"+cNotes+"='"+_Notes+"',"+cProduceBatch+"='"+_ProduceBatch+"',"+cSaleCount+"="+_SaleCount+","+cSaleTime+"='"+_SaleTime+"',"+cSellerID+"="+_SellerID+","+cStockTime+"='"+_StockTime+"',"+cTradeMark+"='"+_TradeMark+"',"+cUpdateTime+"='"+_UpdateTime+"',"+cUserID+"='"+_UserID+"' "+
- " where "+cID+"="+_ID+"" ;
- }
-
- public string DeleteSql()
- {
- return "Delete "+Tn.SaleDestLog+" where "+cID+"="+_ID+"" ;
- }
- }
- #endregion
- #region
- public class SaleDestLog_Qry : rsQuery
- {
- public String Destination
- {
- get { return GetString(SaleDestLog_info.cDestination); }
- // set { SetField(SaleDestLog_info.cDestination, value); }
- }
-
- public String Executor
- {
- get { return GetString(SaleDestLog_info.cExecutor); }
- // set { SetField(SaleDestLog_info.cExecutor, value); }
- }
-
- public String GoodsName
- {
- get { return GetString(SaleDestLog_info.cGoodsName); }
- // set { SetField(SaleDestLog_info.cGoodsName, value); }
- }
-
- public Int64 ID
- {
- get { return GetInt(SaleDestLog_info.cID); }
- // set { SetField(SaleDestLog_info.cID, value); }
- }
-
- public String MarketID
- {
- get { return GetString(SaleDestLog_info.cMarketID); }
- // set { SetField(SaleDestLog_info.cMarketID, value); }
- }
-
- public String ModelType
- {
- get { return GetString(SaleDestLog_info.cModelType); }
- // set { SetField(SaleDestLog_info.cModelType, value); }
- }
-
- public String Notes
- {
- get { return GetString(SaleDestLog_info.cNotes); }
- // set { SetField(SaleDestLog_info.cNotes, value); }
- }
-
- public String ProduceBatch
- {
- get { return GetString(SaleDestLog_info.cProduceBatch); }
- // set { SetField(SaleDestLog_info.cProduceBatch, value); }
- }
-
- public Int64 SaleCount
- {
- get { return GetInt(SaleDestLog_info.cSaleCount); }
- // set { SetField(SaleDestLog_info.cSaleCount, value); }
- }
-
- public DateTime SaleTime
- {
- get { return GetDateTime(SaleDestLog_info.cSaleTime); }
- // set { SetField(SaleDestLog_info.cSaleTime, value); }
- }
-
- public Int64 SellerID
- {
- get { return GetInt(SaleDestLog_info.cSellerID); }
- // set { SetField(SaleDestLog_info.cSellerID, value); }
- }
-
- public DateTime StockTime
- {
- get { return GetDateTime(SaleDestLog_info.cStockTime); }
- // set { SetField(SaleDestLog_info.cStockTime, value); }
- }
-
- public String TradeMark
- {
- get { return GetString(SaleDestLog_info.cTradeMark); }
- // set { SetField(SaleDestLog_info.cTradeMark, value); }
- }
-
- public DateTime UpdateTime
- {
- get { return GetDateTime(SaleDestLog_info.cUpdateTime); }
- // set { SetField(SaleDestLog_info.cUpdateTime, value); }
- }
-
- public String UserID
- {
- get { return GetString(SaleDestLog_info.cUserID); }
- // set { SetField(SaleDestLog_info.cUserID, value); }
- }
-
- }
- #endregion
- }
|