SEL_FUND_USERANDBALRELATION.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Core.StlMes.Client.Sale.SaleFundMgt.Model
  5. {
  6. public class SEL_FUND_USERANDBALRELATION
  7. {
  8. private string _USERID;
  9. private string _BALANCESUBJECT;
  10. private string _IMPORTOR;
  11. private string _IMPORTTIME;
  12. public string USERID { get { return this._USERID; } set { this._USERID = value; } }
  13. public string BALANCESUBJECT { get { return this._BALANCESUBJECT; } set { this._BALANCESUBJECT = value; } }
  14. public string IMPORTOR { get { return this._IMPORTOR; } set { this._IMPORTOR = value; } }
  15. public string IMPORTTIME { get { return this._IMPORTTIME; } set { this._IMPORTTIME = value; } }
  16. public SEL_FUND_USERANDBALRELATION()
  17. {
  18. }
  19. public SEL_FUND_USERANDBALRELATION(string userid,string balancesubject,string importer,string importtime)
  20. {
  21. this.USERID = userid;
  22. this.BALANCESUBJECT = balancesubject;
  23. this.IMPORTOR = importer;
  24. this.IMPORTTIME = importtime;
  25. }
  26. public static List<Model.SEL_FUND_USERANDBALRELATION> GetSelFundUserAndBalRealtion(System.Data.DataSet ds)
  27. {
  28. if (ds == null)
  29. return null;
  30. if (ds.Tables.Count == 0)
  31. return null;
  32. if (ds.Tables[0].Rows.Count == 0)
  33. return null;
  34. List<Model.SEL_FUND_USERANDBALRELATION> list = new List<SEL_FUND_USERANDBALRELATION>();
  35. foreach (System.Data.DataRow dr in ds.Tables[0].Rows)
  36. {
  37. list.Add(new Model.SEL_FUND_USERANDBALRELATION(dr["USERID"].ToString(), dr["BALANCESUBJECT"].ToString(), dr["IMPORTOR"].ToString(), dr["IMPORTTIME"].ToString()));
  38. }
  39. return list;
  40. }
  41. /// <summary>
  42. /// 有效性检查
  43. /// </summary>
  44. /// <param name="real"></param>
  45. /// <returns></returns>
  46. public static Boolean IsValid(Model.SEL_FUND_USERANDBALRELATION real)
  47. {
  48. if(real == null)
  49. return false;
  50. if (real.USERID.Length == 0)
  51. return false;
  52. if (real.BALANCESUBJECT.Length == 0)
  53. return false;
  54. return true;
  55. }
  56. }
  57. }