/EQT_V2/EQT/EQT.Model/MoNotice.auto.cs
http://sgsoft-las.googlecode.com/ · C# · 250 lines · 189 code · 15 blank · 46 comment · 39 complexity · 6a54b2a52745905fe9c5ffeeb11c7696 MD5 · raw file
- /*----------------------------------------------------------------//
- // ????MoNotice.cs
- // ????????? MoNotice.
- //
- // ?????Template ver 5.0.20090429 2009-11-20
- //
- // ?????
- // ?????
- //----------------------------------------------------------------*/
- #region MoNotice
- using System;
- using System.Data;
- namespace EQT.Model
- {
- /// <summary>
- /// ????MoNotice
- /// </summary>
- public partial class MoNotice : ICloneable
- {
- #region ?Notice???
- private string noticeId;
- private string uid;
- private int publishType;
- private string noticeContent;
- private DateTime createTime;
- private string title;
- #endregion
-
- #region ????
- public MoNotice()
- {
- createTime = new DateTime(1900, 1, 1);
-
- }
- #endregion
-
- #region ??????
-
- public MoNotice(MoNotice item)
- {
- item.CopyTo(this);
- }
- #endregion
-
- #region ???????
- public MoNotice(string noticeId, string uid, int publishType, string noticeContent, DateTime createTime, string title)
- {
- this.noticeId = noticeId;
- this.uid = uid;
- this.publishType = publishType;
- this.noticeContent = noticeContent;
- this.createTime = createTime;
- this.title = title;
- }
- #endregion
-
- #region ?Notice?????
- /// <summary>
- ///??GUID???
- /// </summary>
- public string NoticeId
- {
- get { return noticeId; }
- set { noticeId = value; }
- }
- /// <summary>
- /// UID
- /// </summary>
- public string Uid
- {
- get { return uid; }
- set { uid = value; }
- }
- /// <summary>
- ///????2?????????
- /// </summary>
- public int PublishType
- {
- get { return publishType; }
- set { publishType = value; }
- }
- /// <summary>
- /// NOTICE_CONTENT
- /// </summary>
- public string NoticeContent
- {
- get { return noticeContent; }
- set { noticeContent = value; }
- }
- /// <summary>
- /// CREATE_TIME
- /// </summary>
- public DateTime CreateTime
- {
- get { return createTime; }
- set { createTime = value; }
- }
- /// <summary>
- /// TITLE
- /// </summary>
- public string Title
- {
- get { return title; }
- set { title = value; }
- }
- #endregion
-
- #region ????
- /// <summary>
- /// ????
- /// </summary>
- public MoNotice CopyTo(MoNotice item)
- {
- item.noticeId = this.noticeId;
- item.uid = this.uid;
- item.publishType = this.publishType;
- item.noticeContent = this.noticeContent;
- item.createTime = this.createTime;
- item.title = this.title;
- return item;
- }
- /// <summary>
- /// ????
- /// </summary>
- public object Clone()
- {
- MoNotice mo = new MoNotice();
- mo.NoticeId = this.NoticeId;
- mo.Uid = this.Uid;
- mo.PublishType = this.PublishType;
- mo.NoticeContent = this.NoticeContent;
- mo.CreateTime = this.CreateTime;
- mo.Title = this.Title;
- return mo;
- }
- ///<summary>
- ///????????
- ///<summary>
- public override bool Equals(object obj)
- {
- if (object.ReferenceEquals(this, obj))
- {
- return true;
- }
- else
- {
- MoNotice NewNotice = obj as MoNotice;
- if (NewNotice == null)
- {
- return false;
- }
- else
- {
- if (NewNotice.NoticeId == this.NoticeId && NewNotice.Uid == this.Uid && NewNotice.PublishType == this.PublishType && NewNotice.NoticeContent == this.NoticeContent && NewNotice.CreateTime == this.CreateTime && NewNotice.Title == this.Title)
- {
- return true;
- }
- }
-
- }
- return false;
-
- }
- ///TODO:you should modify GetHashCode by yourself.
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
- public override string ToString()
- {
- return String.Format(System.Globalization.CultureInfo.InvariantCulture, "NoticeId={0}/Uid={1}/PublishType={2}/NoticeContent={3}/CreateTime={4}/Title={5}", noticeId, uid, publishType, noticeContent, createTime, title);
-
- }
- #endregion
-
-
- #region DataTable Help Function
- ///<summary>
- ///DataRow???Model
- ///</summary>
- public void Row2Model(DataRow row)
- {
- if (row["Notice_ID"] != null && row["Notice_ID"] != DBNull.Value)
- {
- this.NoticeId = (string)row["Notice_ID"];
- }
- else
- {
- this.NoticeId = string.Empty;
- }
- if (row["UID"] != null && row["UID"] != DBNull.Value)
- {
- this.Uid = (string)row["UID"];
- }
- else
- {
- this.Uid = string.Empty;
- }
- if (row["Publish_Type"] != null && row["Publish_Type"] != DBNull.Value)
- {
- this.PublishType = (int)row["Publish_Type"];
- }
- else
- {
- this.PublishType = 0;
- }
- if (row["Notice_Content"] != null && row["Notice_Content"] != DBNull.Value)
- {
- this.NoticeContent = (string)row["Notice_Content"];
- }
- else
- {
- this.NoticeContent = string.Empty;
- }
- if (row["Create_Time"] != null && row["Create_Time"] != DBNull.Value)
- {
- this.CreateTime = (DateTime)row["Create_Time"];
- }
- else
- {
- this.CreateTime = DateTime.MinValue;
- }
- if (row["Title"] != null && row["Title"] != DBNull.Value)
- {
- this.Title = (string)row["Title"];
- }
- else
- {
- this.Title = string.Empty;
- }
- }
-
- ///<summary>
- ///Model???DataRow
- ///</summary>
- public void Model2Row(DataRow row)
- {
- row["Notice_ID"] = this.NoticeId;
- row["UID"] = this.Uid;
- row["Publish_Type"] = this.PublishType;
- row["Notice_Content"] = this.NoticeContent;
- row["Create_Time"] = this.CreateTime;
- row["Title"] = this.Title;
- }
- #endregion
- }
- }
- #endregion