You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.3 KiB

4 years ago
  1. using Repository.DAO;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Text;
  7. namespace Swift.DAL.Remittance.Administration.ReceiverInformation
  8. {
  9. public class ReceiverInformationDAO: RemittanceDao
  10. {
  11. public DataRow SelectReceiverInformationByCustomerId(string user, string customerId)
  12. {
  13. string sql = "EXEC proc_online_receiverSetup ";
  14. sql += " @flag ='sDetailByCusId'";
  15. sql += ", @customerId =" + FilterString(customerId);
  16. sql += ", @user = " + FilterString(user);
  17. DataSet ds = ExecuteDataset(sql);
  18. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  19. return null;
  20. return ds.Tables[0].Rows[0];
  21. }
  22. public DataRow SelectReceiverInformationByReceiverId(string user, string receiverId)
  23. {
  24. string sql = "EXEC proc_online_receiverSetup ";
  25. sql += " @flag ='sDetailByReceiverId'";
  26. sql += ", @receiverId =" + FilterString(receiverId);
  27. sql += ", @user = " + FilterString(user);
  28. DataSet ds = ExecuteDataset(sql);
  29. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  30. return null;
  31. return ds.Tables[0].Rows[0];
  32. }
  33. public DataRow SelectReceiverInformationByReceiverIdForPrint(string user, string receiverId)
  34. {
  35. string sql = "EXEC proc_online_receiverSetup ";
  36. sql += " @flag ='sDetailByReceiverIdForPrint'";
  37. sql += ", @receiverId =" + FilterString(receiverId);
  38. sql += ", @user = " + FilterString(user);
  39. DataSet ds = ExecuteDataset(sql);
  40. if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
  41. return null;
  42. return ds.Tables[0].Rows[0];
  43. }
  44. public DataTable GetAllReceiverSenderDataForPrint(string receiverId, string user)
  45. {
  46. var sql = "EXEC proc_online_sender_receiver @flag ='forPrint'";
  47. sql += ", @user = " + FilterString(user);
  48. sql += ", @receiverIds = " + FilterString(receiverId);
  49. var dt = ExecuteDataTable(sql);
  50. return dt;
  51. }
  52. }
  53. }