/EQT_V1/EQT.Model/MoTester.auto.cs
http://sgsoft-las.googlecode.com/ · C# · 223 lines · 164 code · 19 blank · 40 comment · 15 complexity · fba95acaa99032276580954e2e3ae58a MD5 · raw file
- /*----------------------------------------------------------------//
- // ????MoTester.cs
- // ????????? MoTester.
- //
- // ?????2009-02-27
- //
- // ?????
- // ?????
- //----------------------------------------------------------------*/
- #region MoTester
- using System;
- using System.Data;
- using System.Globalization;
- using System.Text;
- using System.Xml;
- using System.Data.Common;
- namespace EQT.Model
- {
- /// <summary>
- /// ????MoTester
- /// </summary>
- public partial class MoTester:ICloneable
- {
- #region ?Tester???
- private string _co_item_id;
- private string _emp_id;
- private string _duty_code;
- private decimal _duty_weight;
- #endregion
-
- #region ????
- public MoTester()
- {
-
-
-
-
- }
- #endregion
-
- #region ??????
-
- public MoTester(MoTester item)
- {
- item.CopyTo(this);
- }
- #endregion
-
- #region ???????
- public MoTester(string co_item_id,string emp_id,string duty_code,decimal duty_weight)
- {
- this._co_item_id=co_item_id;
- this._emp_id=emp_id;
- this._duty_code=duty_code;
- this._duty_weight=duty_weight;
- }
- #endregion
-
- #region ?Tester?????
- /// <summary>
- /// CO_ITEM_ID
- /// </summary>
- public string Co_Item_Id
- {
- get {return _co_item_id;}
- set {_co_item_id=value;}
- }
- /// <summary>
- ///??????????????????????E0001,E0002
- /// </summary>
- public string Emp_Id
- {
- get {return _emp_id;}
- set {_emp_id=value;}
- }
- /// <summary>
- /// DUTY_CODE
- /// </summary>
- public string Duty_Code
- {
- get {return _duty_code;}
- set {_duty_code=value;}
- }
- /// <summary>
- ///
- /// </summary>
- public decimal Duty_Weight
- {
- get {return _duty_weight;}
- set {_duty_weight=value;}
- }
- #endregion
-
- #region ????
- /// <summary>
- /// ????
- /// </summary>
- public MoTester CopyTo(MoTester item)
- {
- item.Co_Item_Id=this.Co_Item_Id;
- item.Emp_Id=this.Emp_Id;
- item.Duty_Code=this.Duty_Code;
- item.Duty_Weight=this.Duty_Weight;
- return item;
- }
- /// <summary>
- /// ????
- /// </summary>
- public object Clone()
- {
- MoTester NewTester=new MoTester();
- NewTester._co_item_id=this._co_item_id;
- NewTester._emp_id=this._emp_id;
- NewTester._duty_code=this._duty_code;
- NewTester._duty_weight=this._duty_weight;
- return NewTester;
- }
-
- private static MoTester _empty = new MoTester(string.Empty,string.Empty,string.Empty,0);
- public static MoTester Empty
- {
- get
- {
- return _empty;
- }
- }
-
- ///<summary>
- ///????????
- ///<summary>
- public override bool Equals(object obj)
- {
- if (base.Equals(obj))
- {
- return true;
- }
- else
- {
- MoTester NewTester = obj as MoTester;
- if (NewTester == null)
- {
- return false;
- }
- else
- {
- if (NewTester.Co_Item_Id==this.Co_Item_Id && NewTester.Emp_Id==this.Emp_Id && NewTester.Duty_Code==this.Duty_Code && NewTester.Duty_Weight==this.Duty_Weight)
- {
- 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("Co_Item_Id={0}/Emp_Id={1}/Duty_Code={2}/Duty_Weight={3}",_co_item_id,_emp_id,_duty_code,_duty_weight);
-
- }
- #endregion
-
- #region DataTable Help Function
- ///<summary>
- ///DataRow???Model
- ///</summary>
- public void Row2Model(DataRow row)
- {
- if(row["Co_Item_ID"]!=null && row["Co_Item_ID"]!=DBNull.Value)
- {
- this.Co_Item_Id = (string)row["Co_Item_ID"];
- }
- else
- {
- this.Co_Item_Id =string.Empty;
- }
- if(row["Emp_ID"]!=null && row["Emp_ID"]!=DBNull.Value)
- {
- this.Emp_Id = (string)row["Emp_ID"];
- }
- else
- {
- this.Emp_Id =string.Empty;
- }
- if(row["Duty_Code"]!=null && row["Duty_Code"]!=DBNull.Value)
- {
- this.Duty_Code = (string)row["Duty_Code"];
- }
- else
- {
- this.Duty_Code =string.Empty;
- }
- if(row["Duty_Weight"]!=null && row["Duty_Weight"]!=DBNull.Value)
- {
- this.Duty_Weight = (decimal)row["Duty_Weight"];
- }
- else
- {
- this.Duty_Weight =0;
- }
- }
-
- ///<summary>
- ///Model???DataRow
- ///</summary>
- ??public void Model2Row(DataRow row)
- {
- row["Co_Item_ID"] = this.Co_Item_Id;
- row["Emp_ID"] = this.Emp_Id;
- row["Duty_Code"] = this.Duty_Code;
- row["Duty_Weight"] = this.Duty_Weight;
- }
- #endregion
- }
- }
- #endregion