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.

57 lines
2.1 KiB

  1. using Swift.DAL.SwiftDAL;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Swift.DAL.Remittance.TxnFileUpload
  10. {
  11. public class TxnDao : RemittanceDao
  12. {
  13. public DbResult GetFileName(string fileName)
  14. {
  15. var sql = "Exec proc_UploadedFileTxnHistory @flag='checkFileName'";
  16. sql += " ,@showFileName =" + FilterString(fileName);
  17. return ParseDbResult(sql.ToString());
  18. }
  19. public DbResult InsertData(string user, string fileName, string agentCode, string xml)
  20. {
  21. var sql = "Exec proc_UploadedFileTxnHistory @flag='insertData'";
  22. sql += " ,@user =" + FilterString(user);
  23. sql += " ,@showFileName =" + FilterString(fileName);
  24. sql += " ,@agentCode =" + FilterString(agentCode);
  25. sql += ",@xml ='" + xml + "'";
  26. return ParseDbResult(sql);
  27. }
  28. public DataTable ShowFileList()
  29. {
  30. var sql = "Exec proc_UploadedFileTxnHistory @flag='showFileList'";
  31. return ExecuteDataTable(sql.ToString());
  32. }
  33. public DataTable ShowTxnList(string UploadedFileId, string txnType)
  34. {
  35. var sql = "Exec proc_UploadedFileTxnHistory @flag='showTxnList'";
  36. sql += " ,@uploadedFileId =" + Convert.ToInt32(UploadedFileId);
  37. sql += " ,@txnType =" + FilterString(txnType);
  38. return ExecuteDataTable(sql.ToString());
  39. }
  40. public DbResult ProcessTxn(string user, string rowIds)
  41. {
  42. var sql = "Exec proc_UploadedFileTxnHistory @flag='processTxn'";
  43. sql += " ,@user =" + FilterString(user);
  44. sql += " ,@rowIds =" + FilterString(rowIds);
  45. return ParseDbResult(sql.ToString());
  46. }
  47. public DbResult DeleteTxn(string user, string rowId)
  48. {
  49. var sql = "Exec proc_UploadedFileTxnHistory @flag='deleteTxn'";
  50. sql += " ,@user =" + FilterString(user);
  51. sql += " ,@rowId =" + FilterString(rowId);
  52. return ParseDbResult(sql.ToString());
  53. }
  54. }
  55. }