DAL_BindStoreUser.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. namespace LYFZ.WeixinServiceDate.DAL
  7. {
  8. public class DAL_BindStoreUser : BaseDataOperate
  9. {
  10. string _tableName = "tb_BindStoreUser";
  11. public override object ObjModel
  12. {
  13. get { return CurrentModel; }
  14. }
  15. public Model.Model_BindStoreUser CurrentModel
  16. {
  17. get { return new Model.Model_BindStoreUser(); }
  18. }
  19. public override string TableName
  20. {
  21. get
  22. {
  23. return _tableName;
  24. }
  25. set
  26. {
  27. _tableName = value;
  28. }
  29. }
  30. string _tableFieldNameString = "";
  31. public override string TableFieldNameString
  32. {
  33. get
  34. {
  35. return _tableFieldNameString;
  36. }
  37. set
  38. {
  39. _tableFieldNameString = value;
  40. }
  41. }
  42. public Model.Model_BindStoreUser GetStoreUserData(string openId, string entId)
  43. {
  44. string sql = " select * from tb_BindStoreUser where EntID = '" + entId + "' and OpenID='" + openId + "' ";
  45. DataTable dt = QuaryDataSet(sql).Tables[0];
  46. if (dt.Rows.Count > 0)
  47. {
  48. return (Model.Model_BindStoreUser)DataRowToModelObject(dt.Rows[0]);
  49. }
  50. else
  51. {
  52. return new Model.Model_BindStoreUser();
  53. }
  54. }
  55. }
  56. }