using System; using System.Collections.Generic; using System.Text; using System.Data; using SysBaseLibs; using System.Web.Script.Serialization; namespace SysDataLibs.TableClass { #region SellerViolationLog public class SellerViolationLog_info : ITableInfo { #region SellerViolationLog表 字段信息 /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 200; /// 是否允许为空: N; /// 默认值: ; /// 描述: Content; /// public const string cContent = "Content"; /// /// 为关键字段: Y --- PrimaryKey; /// 自动增长: Y; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: ID; /// public const string cID = "ID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: smalldatetime; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: LogDate; /// public const string cLogDate = "LogDate"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: char; /// 数据长度: 10; /// 是否允许为空: N; /// 默认值: ; /// 描述: MarketID; /// public const string cMarketID = "MarketID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: MinusScore; /// public const string cMinusScore = "MinusScore"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 100; /// 是否允许为空: N; /// 默认值: ; /// 描述: Notes; /// public const string cNotes = "Notes"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: N; /// 默认值: ; /// 描述: SellerID; /// public const string cSellerID = "SellerID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: datetime; /// 数据长度: 8; /// 是否允许为空: N; /// 默认值: ; /// 描述: UpdateTime; /// public const string cUpdateTime = "UpdateTime"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 30; /// 是否允许为空: N; /// 默认值: ; /// 描述: UserID; /// public const string cUserID = "UserID"; #endregion public SellerViolationLog_info(){} public SellerViolationLog_info(DataRow poRow) { CreateTableInfo(poRow); } public void CreateTableInfo(DataRow poRow) { _Content=UtilStr.StrFromObj(poRow[cContent]); _ID=UtilStr.StrFromObj(poRow[cID]); _LogDate=UtilStr.StrFromObj(poRow[cLogDate]); _MarketID=UtilStr.StrFromObj(poRow[cMarketID]); _MinusScore=UtilStr.StrFromObj(poRow[cMinusScore]); _Notes=UtilStr.StrFromObj(poRow[cNotes]); _SellerID=UtilStr.StrFromObj(poRow[cSellerID]); _UpdateTime=UtilStr.StrFromObj(poRow[cUpdateTime]); _UserID=UtilStr.StrFromObj(poRow[cUserID]); } public SellerViolationLog_info( string pcID, DBConnSql poDBConn) { if ( pcID.Trim().Length > 0 && poDBConn != null) { string lcSql = "select * from " + Tn.SellerViolationLog + " where ID='"+pcID+"'"; rsQuery loQuery = poDBConn.OpenQuery(lcSql); if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1) { loQuery.MoveFirst(); CreateTableInfo(loQuery.CurrentRow); } } } private string _Content=""; public string Content { get { return _Content; } set { _Content = value; } } private string _ID=""; public string ID { get { return _ID; } set { _ID = value; } } private string _LogDate=""; public string LogDate { get { return _LogDate; } set { _LogDate = value; } } private string _MarketID=""; public string MarketID { get { return _MarketID; } set { _MarketID = value; } } private string _MinusScore=""; public string MinusScore { get { return _MinusScore; } set { _MinusScore = value; } } private string _Notes=""; public string Notes { get { return _Notes; } set { _Notes = value; } } private string _SellerID=""; public string SellerID { get { return _SellerID; } set { _SellerID = 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("SellerViolationLogRecord", ""); rsXmlNode loNode =null; loNode = new rsXmlNode(cContent, Content); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cID, ID); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cLogDate, LogDate); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cMarketID, MarketID); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cMinusScore, MinusScore); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cNotes, Notes); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cSellerID, SellerID); 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.SellerViolationLog+" "+ " ("+cContent+","+cLogDate+","+cMarketID+","+cMinusScore+","+cNotes+","+cSellerID+","+cUpdateTime+","+cUserID+") "+ " values ('"+_Content+"','"+_LogDate+"','"+_MarketID+"',"+_MinusScore+",'"+_Notes+"',"+_SellerID+",'"+_UpdateTime+"','"+_UserID+"') " ; } public string UpdateSql() { return " update "+Tn.SellerViolationLog+" "+ " set "+cContent+"='"+_Content+"',"+cLogDate+"='"+_LogDate+"',"+cMarketID+"='"+_MarketID+"',"+cMinusScore+"="+_MinusScore+","+cNotes+"='"+_Notes+"',"+cSellerID+"="+_SellerID+","+cUpdateTime+"='"+_UpdateTime+"',"+cUserID+"='"+_UserID+"' "+ " where "+cID+"="+_ID+"" ; } public string DeleteSql() { return "Delete "+Tn.SellerViolationLog+" where "+cID+"="+_ID+"" ; } } #endregion #region public class SellerViolationLog_Qry : rsQuery { public String Content { get { return GetString(SellerViolationLog_info.cContent); } // set { SetField(SellerViolationLog_info.cContent, value); } } public Int64 ID { get { return GetInt(SellerViolationLog_info.cID); } // set { SetField(SellerViolationLog_info.cID, value); } } public DateTime LogDate { get { return GetDateTime(SellerViolationLog_info.cLogDate); } // set { SetField(SellerViolationLog_info.cLogDate, value); } } public String MarketID { get { return GetString(SellerViolationLog_info.cMarketID); } // set { SetField(SellerViolationLog_info.cMarketID, value); } } public Int64 MinusScore { get { return GetInt(SellerViolationLog_info.cMinusScore); } // set { SetField(SellerViolationLog_info.cMinusScore, value); } } public String Notes { get { return GetString(SellerViolationLog_info.cNotes); } // set { SetField(SellerViolationLog_info.cNotes, value); } } public Int64 SellerID { get { return GetInt(SellerViolationLog_info.cSellerID); } // set { SetField(SellerViolationLog_info.cSellerID, value); } } public DateTime UpdateTime { get { return GetDateTime(SellerViolationLog_info.cUpdateTime); } // set { SetField(SellerViolationLog_info.cUpdateTime, value); } } public String UserID { get { return GetString(SellerViolationLog_info.cUserID); } // set { SetField(SellerViolationLog_info.cUserID, value); } } } #endregion }