12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using ProjectBase.Data.BaseDAL.BaseDatabase;
- using ProjectBase.Util;
- using SIMDP.DAL.IDALSQL;
- using SIMDP.Model;
- using System.Data;
- using System.Collections;
- namespace SIMDP.DAL.DALSQL
- {
- public class DalRemnantInformation : BaseDALSQL<MoRemnantInformation>, IDalRemnantInformation
- {
- #region 对象实例及构造函数
- public static DalRemnantInformation Instance
- {
- get
- {
- return new DalRemnantInformation();
- }
- }
- public DalRemnantInformation() : base("remnant_information", "data_id")
- {
- this.sortField = "data_id";
- this.isDescending = false;
- }
- #endregion
- /// <summary>
- /// 将DataReader的属性值转化为实体类的属性值,返回实体类
- /// </summary>
- /// <param name="dr">有效的DataReader对象</param>
- /// <returns>实体类对象</returns>
- protected override MoRemnantInformation DataReaderToEntity(IDataReader dataReader)
- {
- MoRemnantInformation info = new MoRemnantInformation();
- SmartDataReader reader = new SmartDataReader(dataReader);
- info.Data_id = reader.GetInt64("data_id");
- info.Tray_code = reader.GetString("tray_code");
- info.Record_time = reader.GetDateTime("record_time");
- info.Flag = reader.GetByte("flag");
- return info;
- }
- /// <summary>
- /// 将实体对象的属性值转化为Hashtable对应的键值
- /// </summary>
- /// <param name="obj">有效的实体对象</param>
- /// <returns>包含键值映射的Hashtable</returns>
- protected override Hashtable GetHashByEntity(MoRemnantInformation obj)
- {
- MoRemnantInformation info = obj as MoRemnantInformation;
- Hashtable hash = new Hashtable();
- hash.Add("tray_code", info.Tray_code);
- hash.Add("record_time", info.Record_time);
- hash.Add("flag", info.Flag);
- return hash;
- }
-
- }
- }
|