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.

44 lines
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Swift.DAL.SwiftDAL;
  6. using System.Data;
  7. namespace Swift.DAL.AccountReport
  8. {
  9. public class DayBookReportDAO : SwiftDao
  10. {
  11. public DataTable GetDayBookReport(string fromDate, string toDate, string vType, string showType = "manual")
  12. {
  13. var sql = "Exec proc_daybook @startdt =" + FilterString(fromDate);
  14. sql += " ,@enddt = " + FilterString(toDate);
  15. sql += " ,@vouchertype = " + FilterString(vType);
  16. sql += " ,@showType = " + FilterString(showType);
  17. sql += " ,@company_id = 1";
  18. return ExecuteDataTable(sql);
  19. }
  20. public DataSet GetDayBookReportUser(string fromDate, string toDate, string vType, string userName)
  21. {
  22. var sql = "Exec procVoucherDetail @flag = 'b'";
  23. sql += ",@StartDate =" + FilterString(fromDate);
  24. sql += ",@EndDate =" + FilterString(toDate);
  25. sql += ",@TranType =" + FilterString(vType);
  26. sql += ",@UserID =" + FilterString(userName);
  27. return ExecuteDataset(sql);
  28. }
  29. public DbResult DeleteAcctDetail(string acct_id, string user)
  30. {
  31. string sql = "Exec [proc_accountStatement]";
  32. sql += " @flag ='d'";
  33. sql += ", @acct_id=" + FilterString(acct_id);
  34. sql += ", @user=" + FilterString(user);
  35. return ParseDbResult(ExecuteDataset(sql).Tables[0]);
  36. }
  37. }
  38. }