SEL_FUND_BUSINESSINFO.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Data;
  5. namespace Core.StlMes.Client.Sale.SaleFundMgt.Model
  6. {
  7. public class SEL_FUND_BUSINESSINFO
  8. {
  9. private string _BUSISEQ;
  10. private string _BUSITYPE;
  11. private string _BALANCESUBJECT;
  12. private string _BUYERCODE;
  13. private string _SECONDACCOUNT;
  14. private string _PACTNO;
  15. private double _MONEY;
  16. private string _IMPORTOR;
  17. private string _IMPORTTIME;
  18. private string _REMARK;
  19. public string BUSISEQ { get { return this._BUSISEQ; } set { this._BUSISEQ = value; } }
  20. public string BUSITYPE { get { return this._BUSITYPE; } set { this._BUSITYPE = value; } }
  21. public string BALANCESUBJECT { get { return this._BALANCESUBJECT; } set { this._BALANCESUBJECT = value; } }
  22. public string BUYERCODE { get { return this._BUYERCODE; } set { this._BUYERCODE = value; } }
  23. public string SECONDACCOUNT { get { return this._SECONDACCOUNT; } set { this._SECONDACCOUNT = value; } }
  24. public string PACTNO { get { return this._PACTNO; } set { this._PACTNO = value; } }
  25. public double MONEY { get { return this._MONEY; } set { this._MONEY = value; } }
  26. public string IMPORTOR { get { return this._IMPORTOR; } set { this._IMPORTOR = value; } }
  27. public string IMPORTTIME { get { return this._IMPORTTIME; } set { this._IMPORTTIME = value; } }
  28. public string REMARK { get { return this._REMARK; } set { this._REMARK = value; } }
  29. public SEL_FUND_BUSINESSINFO()
  30. {
  31. }
  32. public SEL_FUND_BUSINESSINFO(string busiseq,string busitype,string balancesubject,string buyercode,string secondacct,string pactno,
  33. double money,string importor,string importtime,string remark)
  34. {
  35. this.BUSISEQ = busiseq;
  36. this.BUSITYPE = busitype;
  37. this.BALANCESUBJECT = balancesubject;
  38. this.BUYERCODE = buyercode;
  39. this.SECONDACCOUNT = secondacct;
  40. this.PACTNO = pactno;
  41. this.MONEY = money;
  42. this.IMPORTOR = importor;
  43. this.IMPORTTIME = importtime;
  44. this.REMARK = remark;
  45. }
  46. public SEL_FUND_BUSINESSINFO(string busiseq, string busitype,string importor, string importtime, string remark)
  47. {
  48. this.BUSISEQ = busiseq;
  49. this.BUSITYPE = busitype;
  50. this.BALANCESUBJECT = "";
  51. this.BUYERCODE = "";
  52. this.SECONDACCOUNT = "";
  53. this.PACTNO = "";
  54. this.MONEY = 0;
  55. this.IMPORTOR = importor;
  56. this.IMPORTTIME = importtime;
  57. this.REMARK = remark;
  58. }
  59. public static SEL_FUND_BUSINESSINFO GetSelFundBusinessInfo(DataRow dr)
  60. {
  61. if (dr == null)
  62. return null;
  63. SEL_FUND_BUSINESSINFO fund = new SEL_FUND_BUSINESSINFO();
  64. try { fund.BUSISEQ = Convert.ToString(dr["BUSISEQ"]); }
  65. catch { }
  66. try { fund.BUSITYPE = Convert.ToString(dr["BUSITYPE"]); }
  67. catch { }
  68. try { fund.BALANCESUBJECT = Convert.ToString(dr["BALANCESUBJECT"]); }
  69. catch { }
  70. try { fund.BUYERCODE = Convert.ToString(dr["BUYERCODE"]); }
  71. catch { }
  72. try { fund.SECONDACCOUNT = Convert.ToString(dr["SECONDACCOUNT"]); }
  73. catch { }
  74. try { fund.PACTNO = Convert.ToString(dr["PACTNO"]); }
  75. catch { }
  76. try { fund.MONEY = Convert.ToDouble(dr["MONEY"]); }
  77. catch { }
  78. try { fund.IMPORTOR = Convert.ToString(dr["IMPORTOR"]); }
  79. catch { }
  80. try { fund.IMPORTTIME = Convert.ToString(dr["IMPORTTIME"]); }
  81. catch { }
  82. try { fund.REMARK = Convert.ToString(dr["REMARK"]); }
  83. catch { }
  84. return fund;
  85. }
  86. public static List<SEL_FUND_BUSINESSINFO> GetSelFundBusinessInfoList(DataSet ds)
  87. {
  88. if (Util.DataSetUtil.Count(ds) == 0)
  89. return null;
  90. List<SEL_FUND_BUSINESSINFO> list = new List<SEL_FUND_BUSINESSINFO>();
  91. foreach (DataRow dr in ds.Tables[0].Rows)
  92. {
  93. list.Add(GetSelFundBusinessInfo(dr));
  94. }
  95. return list;
  96. }
  97. }
  98. }