AccountDAL.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using Common.Model;
  2. using CoreEntity.Entity;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Text;
  7. using ZcPeng.PublicLibrary;
  8. namespace CoreEntity.DAL
  9. {
  10. public class AccountDAL
  11. {
  12. /// <summary>
  13. ///
  14. /// ContactId
  15. /// </summary>
  16. /// <param name="PushAccountId"></param>
  17. /// <param name="BusinessId"></param>
  18. /// <returns></returns>
  19. public static string getContactor(string PushAccountId,string BusinessId)
  20. {
  21. string commandTextContact = "Select ContactId From CONTACTDOC " +
  22. "Where UserId=@Id and BusinessId = @BusinessId";
  23. string resultContact;
  24. Object valueContact = null;
  25. String ContactId = string.Empty;
  26. List<List<Object>> parametersContact = new List<List<Object>>();
  27. if (PushAccountId!=null&&BusinessId != null)
  28. {
  29. parametersContact.Add(new List<Object>() { "Id", PushAccountId });
  30. parametersContact.Add(new List<Object>() { "BusinessId", BusinessId });
  31. DataAccess.GetOneValue(commandTextContact, DataAccess.ToParameters(parametersContact), out valueContact, out resultContact);
  32. }
  33. if (valueContact != null)
  34. {
  35. ContactId = (string)valueContact;
  36. }
  37. return ContactId;
  38. }
  39. }
  40. }