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表 字段信息 /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 200; /// 是否允许为空: N; /// 默认值: ; /// 描述: 销售去向; /// public const string cDestination = "Destination"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 记录人; /// public const string cExecutor = "Executor"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: N; /// 默认值: ; /// 描述: 商品名称; /// public const string cGoodsName = "GoodsName"; /// /// 为关键字段: Y --- PrimaryKey; /// 自动增长: Y; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: 编号; /// public const string cID = "ID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: char; /// 数据长度: 10; /// 是否允许为空: N; /// 默认值: ; /// 描述: 市场编号; /// public const string cMarketID = "MarketID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 规格类型; /// public const string cModelType = "ModelType"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 200; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 备注; /// public const string cNotes = "Notes"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 生产批号; /// public const string cProduceBatch = "ProduceBatch"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ((0)); /// 描述: 数量; /// public const string cSaleCount = "SaleCount"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: datetime; /// 数据长度: 8; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 销售时间; /// public const string cSaleTime = "SaleTime"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: 经营户; /// public const string cSellerID = "SellerID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: datetime; /// 数据长度: 8; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 进货时间; /// public const string cStockTime = "StockTime"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 商品商标; /// public const string cTradeMark = "TradeMark"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: datetime; /// 数据长度: 8; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 更新时间; /// public const string cUpdateTime = "UpdateTime"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 30; /// 是否允许为空: N; /// 默认值: ; /// 描述: 用户编号; /// 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 }