TBB01_TAFAC_INGR.cs 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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_TAFAC_INGR
  9. {
  10. private string _TAFAC_STL_GRD;
  11. private string _CHEM_CD;
  12. private string _COMP_YN;
  13. private double _CHEM_AIM;
  14. private double _CHEM_MIN;
  15. private double _CHEM_MAX;
  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 TAFAC_STL_GRD { get { return this._TAFAC_STL_GRD; } set { this._TAFAC_STL_GRD = value; } }
  23. public string CHEM_CD { get { return this._CHEM_CD; } set { this._CHEM_CD = value; } }
  24. public string COMP_YN { get { return this._COMP_YN; } set { this._COMP_YN = value; } }
  25. public double CHEM_AIM { get { return this._CHEM_AIM; } set { this._CHEM_AIM = value; } }
  26. public double CHEM_MIN { get { return this._CHEM_MIN; } set { this._CHEM_MIN = value; } }
  27. public double CHEM_MAX { get { return this._CHEM_MAX; } set { this._CHEM_MAX = 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_TAFAC_INGR GetTbb01TafacIngrBySignalRow(DataRow dr)
  35. {
  36. if (dr == null)
  37. return null;
  38. TBB01_TAFAC_INGR tbb = new TBB01_TAFAC_INGR();
  39. try { tbb.TAFAC_STL_GRD = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["TAFAC_STL_GRD"]); }
  40. catch { }
  41. try { tbb.CHEM_CD = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["CHEM_CD"]); }
  42. catch { }
  43. try { tbb.COMP_YN = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString(dr["COMP_YN"]); }
  44. catch { }
  45. try { tbb.CHEM_AIM = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble(dr["CHEM_AIM"]); }
  46. catch { }
  47. try { tbb.CHEM_MIN = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble(dr["CHEM_MIN"]); }
  48. catch { }
  49. try { tbb.CHEM_MAX = Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble(dr["CHEM_MAX"]); }
  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. public static List<TBB01_TAFAC_INGR> GetTbb01TafacIngrByDataSet(DataSet ds)
  66. {
  67. List<TBB01_TAFAC_INGR> list = null;
  68. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  69. return list;
  70. list = new List<TBB01_TAFAC_INGR>();
  71. foreach (DataRow dr in ds.Tables[0].Rows)
  72. {
  73. list.Add(GetTbb01TafacIngrBySignalRow(dr));
  74. }
  75. return list;
  76. }
  77. }
  78. }