using System; using System.Collections.Generic; using System.Text; using System.Data; using SysBaseLibs; using System.Web.Script.Serialization; namespace SysDataLibs.TableClass { #region FSInformationExchange public class FSInformationExchange_info : ITableInfo { #region FSInformationExchange表 字段信息 /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: text; /// 数据长度: 16; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 信息内容; /// public const string cInfoContent = "InfoContent"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 50; /// 是否允许为空: N; /// 默认值: ; /// 描述: 主信息编号; /// public const string cInfoGuid = "InfoGuid"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nvarchar; /// 数据长度: 400; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 信息标题; /// public const string cInfoTitle = "InfoTitle"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 是否删除; /// public const string cIsDeleted = "IsDeleted"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 是否来自平台; /// public const string cIsFromPlat = "IsFromPlat"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: int; /// 数据长度: 4; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 是否主信息; /// public const string cIsRoot = "IsRoot"; /// /// 为关键字段: Y --- PrimaryKey; /// 自动增长: N; /// 数据类型: varchar; /// 数据长度: 50; /// 是否允许为空: N; /// 默认值: ; /// 描述: 编号; /// public const string cMsgID = "MsgID"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nvarchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 接收人; /// public const string cRecipient = "Recipient"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: nvarchar; /// 数据长度: 100; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 发送人; /// public const string cSendBy = "SendBy"; /// /// 为关键字段: N ; /// 自动增长: N; /// 数据类型: datetime; /// 数据长度: 8; /// 是否允许为空: Y; /// 默认值: ; /// 描述: 发送时间; /// public const string cSendDate = "SendDate"; #endregion public FSInformationExchange_info() { } public FSInformationExchange_info(DataRow poRow) { CreateTableInfo(poRow); } public void CreateTableInfo(DataRow poRow) { _InfoContent = UtilStr.StrFromObj(poRow[cInfoContent]); _InfoGuid = UtilStr.StrFromObj(poRow[cInfoGuid]); _InfoTitle = UtilStr.StrFromObj(poRow[cInfoTitle]); _IsDeleted = UtilStr.StrFromObj(poRow[cIsDeleted]); _IsFromPlat = UtilStr.StrFromObj(poRow[cIsFromPlat]); _IsRoot = UtilStr.StrFromObj(poRow[cIsRoot]); _MsgID = UtilStr.StrFromObj(poRow[cMsgID]); _Recipient = UtilStr.StrFromObj(poRow[cRecipient]); _SendBy = UtilStr.StrFromObj(poRow[cSendBy]); _SendDate = UtilStr.StrFromObj(poRow[cSendDate]); } public FSInformationExchange_info(string pcMsgID, DBConnSql poDBConn) { if (pcMsgID.Trim().Length > 0 && poDBConn != null) { string lcSql = "select * from " + Tn.FSInformationExchange + " where MsgID='" + pcMsgID + "'"; rsQuery loQuery = poDBConn.OpenQuery(lcSql); if (loQuery != null && loQuery.IsOpened && loQuery.RecCount == 1) { loQuery.MoveFirst(); CreateTableInfo(loQuery.CurrentRow); } } } private string _InfoContent = ""; public string InfoContent { get { return _InfoContent; } set { _InfoContent = value; } } private string _InfoGuid = ""; public string InfoGuid { get { return _InfoGuid; } set { _InfoGuid = value; } } private string _InfoTitle = ""; public string InfoTitle { get { return _InfoTitle; } set { _InfoTitle = value; } } private string _IsDeleted = ""; public string IsDeleted { get { return _IsDeleted; } set { _IsDeleted = value; } } private string _IsFromPlat = ""; public string IsFromPlat { get { return _IsFromPlat; } set { _IsFromPlat = value; } } private string _IsRoot = ""; public string IsRoot { get { return _IsRoot; } set { _IsRoot = value; } } private string _MsgID = ""; public string MsgID { get { return _MsgID; } set { _MsgID = value; } } private string _Recipient = ""; public string Recipient { get { return _Recipient; } set { _Recipient = value; } } private string _SendBy = ""; public string SendBy { get { return _SendBy; } set { _SendBy = value; } } private string _SendDate = ""; public string SendDate { get { return _SendDate; } set { _SendDate = value; } } [ScriptIgnore] public rsXmlNode DataXMLNode { get { rsXmlNode loMainNode = new rsXmlNode("FSInformationExchangeRecord", ""); rsXmlNode loNode = null; loNode = new rsXmlNode(cInfoContent, InfoContent); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cInfoGuid, InfoGuid); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cInfoTitle, InfoTitle); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsDeleted, IsDeleted); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsFromPlat, IsFromPlat); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cIsRoot, IsRoot); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cMsgID, MsgID); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cRecipient, Recipient); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cSendBy, SendBy); loMainNode.AddChild(loNode); loNode = new rsXmlNode(cSendDate, SendDate); loMainNode.AddChild(loNode); return loMainNode; } } public string InsertSql() { return " insert into " + Tn.FSInformationExchange + " " + " (" + cMsgID + "," + cInfoGuid + "," + cInfoTitle + "," + cInfoContent + "," + cSendDate + "," + cSendBy + "," + cRecipient + "," + cIsRoot + "," + cIsDeleted + "," + cIsFromPlat + ") " + " values ('" + _MsgID + "','" + _InfoGuid + "','" + _InfoTitle + "','" + _InfoContent + "','" + _SendDate + "','" + _SendBy + "','" + _Recipient + "'," + _IsRoot +"," + _IsDeleted + "," + _IsFromPlat + ") "; } public string UpdateIsDeletedSql() { return " update " + Tn.FSInformationExchange + " " + " set " + cIsDeleted + "=" + _IsDeleted + " where " + cMsgID + "='" + _MsgID + "'"; } public string DeleteSql() { return "Delete " + Tn.FSInformationExchange + " where " + cMsgID + "='" + _MsgID + "'"; } } #endregion #region public class FSInformationExchange_Qry : rsQuery { public String InfoContent { get { return GetString(FSInformationExchange_info.cInfoContent); } // set { SetField(FSInformationExchange_info.cInfoContent, value); } } public String InfoGuid { get { return GetString(FSInformationExchange_info.cInfoGuid); } // set { SetField(FSInformationExchange_info.cInfoGuid, value); } } public String InfoTitle { get { return GetString(FSInformationExchange_info.cInfoTitle); } // set { SetField(FSInformationExchange_info.cInfoTitle, value); } } public Int64 IsDeleted { get { return GetInt(FSInformationExchange_info.cIsDeleted); } // set { SetField(FSInformationExchange_info.cIsDeleted, value); } } public Int64 IsFromPlat { get { return GetInt(FSInformationExchange_info.cIsFromPlat); } // set { SetField(FSInformationExchange_info.cIsFromPlat, value); } } public Int64 IsRoot { get { return GetInt(FSInformationExchange_info.cIsRoot); } // set { SetField(FSInformationExchange_info.cIsRoot, value); } } public String MsgID { get { return GetString(FSInformationExchange_info.cMsgID); } // set { SetField(FSInformationExchange_info.cMsgID, value); } } public String Recipient { get { return GetString(FSInformationExchange_info.cRecipient); } // set { SetField(FSInformationExchange_info.cRecipient, value); } } public String SendBy { get { return GetString(FSInformationExchange_info.cSendBy); } // set { SetField(FSInformationExchange_info.cSendBy, value); } } public DateTime SendDate { get { return GetDateTime(FSInformationExchange_info.cSendDate); } // set { SetField(FSInformationExchange_info.cSendDate, value); } } } #endregion }