Advertisement
Ranish666

example repo

Mar 12th, 2021
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.21 KB | None | 0 0
  1. namespace mediflow.Areas.Account.Repository
  2. {
  3.     public class AcLedgerRepository
  4.     {
  5.         DBAll db = new DBAll();
  6.         public List<AcLedgerReportModel> GetLedgerReport(DateTime? FromDate, DateTime? Todate, decimal? groupId, decimal? ledgerId, int yearid, int branchid)
  7.         {
  8.             try
  9.             {
  10.                 List<AcLedgerReportModel> Data;
  11.                 db.connection();
  12.                 db.con.Open();
  13.                
  14.                 DynamicParameters parm = new DynamicParameters();
  15.                 parm.Add("@fromDate", FromDate);
  16.                 parm.Add("@toDate", Todate);
  17.                 parm.Add("@accountGroupId", groupId);
  18.                 parm.Add("@ledgerId", ledgerId);
  19.                 parm.Add("@financialyearid", yearid);
  20.                 parm.Add("@branchid", branchid);
  21.                 Data = SqlMapper.Query<AcLedgerReportModel>(db.con, "AccountLedgerReportFill", parm, commandType: System.Data.CommandType.StoredProcedure).ToList();
  22.                 return Data;
  23.             }
  24.             catch (Exception ex)
  25.             {
  26.                 throw ex;
  27.             }
  28.  
  29.             finally
  30.             {
  31.                 db.con.Close();
  32.             }
  33.         }
  34.    }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement