TBB01_SEQ_INGR.cs 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Data;
  5. using System.Text;
  6. namespace Core.LgMes.Client.lgClassModel.SqModel
  7. {
  8. public class TBB01_SEQ_INGR
  9. {
  10. private string _CHEM_CD;
  11. private double _DISPLAY_SEQ;
  12. private string _DISPLAY_LEN;
  13. private string _COMP_YN;
  14. private string _COMP_CAL;
  15. private string _COMP_DETAIL;
  16. private string _REG_PGM_ID;
  17. private string _REG_ID;
  18. private string _REG_DTIME;
  19. private string _MOD_PGM_ID;
  20. private string _MOD_ID;
  21. private string _MOD_DTIME;
  22. public string CHEM_CD { get { return this._CHEM_CD; } set { this._CHEM_CD = value; } }
  23. public double DISPLAY_SEQ { get { return this._DISPLAY_SEQ; } set { this._DISPLAY_SEQ = value; } }
  24. public string DISPLAY_LEN { get { return this._DISPLAY_LEN; } set { this._DISPLAY_LEN = value; } }
  25. public string COMP_YN { get { return this._COMP_YN; } set { this._COMP_YN = value; } }
  26. public string COMP_CAL { get { return this._COMP_CAL; } set { this._COMP_CAL = value; } }
  27. public string COMP_DETAIL { get { return this._COMP_DETAIL; } set { this._COMP_DETAIL = value; } }
  28. public string REG_PGM_ID { get { return this._REG_PGM_ID; } set { this._REG_PGM_ID = value; } }
  29. public string REG_ID { get { return this._REG_ID; } set { this._REG_ID = value; } }
  30. public string REG_DTIME { get { return this._REG_DTIME; } set { this._REG_DTIME = value; } }
  31. public string MOD_PGM_ID { get { return this._MOD_PGM_ID; } set { this._MOD_PGM_ID = value; } }
  32. public string MOD_ID { get { return this._MOD_ID; } set { this._MOD_ID = value; } }
  33. public string MOD_DTIME { get { return this._MOD_DTIME; } set { this._MOD_DTIME = value; } }
  34. public static TBB01_SEQ_INGR GetTbb01SeqIngrBySignalRow(DataRow dr)
  35. {
  36. if (dr == null)
  37. return null;
  38. TBB01_SEQ_INGR tbb = new TBB01_SEQ_INGR();
  39. try { tbb.CHEM_CD = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["CHEM_CD"]); }
  40. catch { }
  41. try { tbb.DISPLAY_SEQ = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble(dr["DISPLAY_SEQ"]); }
  42. catch { }
  43. try { tbb.DISPLAY_LEN = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["DISPLAY_LEN"]); }
  44. catch { }
  45. try { tbb.COMP_YN = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["COMP_YN"]); }
  46. catch { }
  47. try { tbb.COMP_CAL = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["COMP_CAL"]); }
  48. catch { }
  49. try { tbb.COMP_DETAIL = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["COMP_DETAIL"]); }
  50. catch { }
  51. try { tbb.REG_PGM_ID = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["REG_PGM_ID"]); }
  52. catch { }
  53. try { tbb.REG_ID = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["REG_ID"]); }
  54. catch { }
  55. try { tbb.REG_DTIME = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["REG_DTIME"]); }
  56. catch { }
  57. try { tbb.MOD_PGM_ID = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["MOD_PGM_ID"]); }
  58. catch { }
  59. try { tbb.MOD_ID = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["MOD_ID"]); }
  60. catch { }
  61. try { tbb.MOD_DTIME = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["MOD_DTIME"]); }
  62. catch { }
  63. return tbb;
  64. }
  65. /// <summary>
  66. /// 将同名数据集转为实体类返回
  67. /// </summary>
  68. /// <param name="ds"></param>
  69. /// <returns></returns>
  70. public static List<TBB01_SEQ_INGR> GetTbb01SeqIngrByDataSet(DataSet ds)
  71. {
  72. List<TBB01_SEQ_INGR> list = null;
  73. if (ds == null || ds.Tables.Count == 0|| ds.Tables[0].Rows.Count == 0)
  74. return list;
  75. list = new List<TBB01_SEQ_INGR>();
  76. foreach (DataRow dr in ds.Tables[0].Rows)
  77. {
  78. list.Add(GetTbb01SeqIngrBySignalRow(dr));
  79. }
  80. return list;
  81. }
  82. }
  83. }