public object MerchantBankInfo(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string accNo = builder.ExtractText(Convert.ToString(model.ReportOption), "accNo", ","); string catId = builder.ExtractText(Convert.ToString(model.ReportOption), "catId", "}"); ReportViewer reportViewer = new ReportViewer(); List <MerchantBankInfo> merchantBankInfos = new List <MerchantBankInfo>(); merchantBankInfos = service.MerchantBankInfoReport(fromDate, toDate, accNo, catId); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTMerchantBankInfo.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetReportParameterForChannelBankInfoReport(fromDate, toDate, catId)); ReportDataSource A = new ReportDataSource("MerchantBank", merchantBankInfos); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public byte[] EmsReport(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string transNo = builder.ExtractText(Convert.ToString(model.ReportOption), "transNo", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string studentId = builder.ExtractText(Convert.ToString(model.ReportOption), "studentId", ","); string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", "}"); string schoolId = builder.ExtractText(Convert.ToString(model.ReportOption), "schoolId", ","); string dateType = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", ","); List <EmsReport> emsReports = emsService.GetEmsReport(fromDate, toDate, transNo, studentId, schoolId, branchCode, dateType); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTEmsInfo.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetEmsRptParameter(fromDate, toDate, transNo, studentId, schoolId)); ReportDataSource A = new ReportDataSource("EmsReport", emsReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object DormantAgent(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string type = builder.ExtractText(Convert.ToString(model.ReportOption), "type", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}"); ReportViewer reportViewer = new ReportViewer(); List <DormantAgent> dormantAgentList = new List <DormantAgent>(); dormantAgentList = service.GetDormantAgentList(fromDate, toDate, type); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTDormantAgent.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GenerateParamEmerchantSettlementInfo(fromDate, toDate)); ReportDataSource A = new ReportDataSource("DormantAgent", dormantAgentList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public object CommissionReport(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", "}"); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); ReportViewer reportViewer = new ReportViewer(); List <CommissionReport> commissionReports = new List <CommissionReport>(); commissionReports = service.CommissionReport(mphone, fromDate, toDate); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCommssion.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetGenerateCommissionReportParameter(fromDate, toDate, mphone)); ReportDataSource A = new ReportDataSource("Commission", commissionReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public byte[] CustomerRegistration(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string agentNo = builder.ExtractText(Convert.ToString(model.ReportOption), "agentNo", "}"); if (!string.IsNullOrEmpty(agentNo)) { var agentInfo = (Reginfo)kycService.GetClientInfoByMphone(agentNo); if (agentInfo.Pmphone != mphone) { return(null); } } List <CustomerRegDistPort> customerRegDistPorts = service.CustomerRegistration(mphone, fromDate, toDate, agentNo); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTDist_CustReg.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(CustomerRegistrationRptParameter(mphone, fromDate, toDate, agentNo)); ReportDataSource A = new ReportDataSource("CustomerRegDistPort", customerRegDistPorts); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object SourseWiseRegistration(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string regStatus = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", ","); string status = builder.ExtractText(Convert.ToString(model.ReportOption), "status", ","); string regSource = builder.ExtractText(Convert.ToString(model.ReportOption), "regSource", ","); string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", "}"); ReportViewer reportViewer = new ReportViewer(); List <SourceWiseRegistration> SourceWiseRegistrationList = new List <SourceWiseRegistration>(); SourceWiseRegistrationList = service.SourceWiseRegistration(fromDate, toDate, regStatus, status, regSource, branchCode); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTSourceWiseRegistration.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetReportParameterForSourceWiseRegistration(fromDate, toDate)); ReportDataSource A = new ReportDataSource("SourceWiseRegistration", SourceWiseRegistrationList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public object CashBackReport(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string options = builder.ExtractText(Convert.ToString(model.ReportOption), "reportType", ","); string cbType = builder.ExtractText(Convert.ToString(model.ReportOption), "cbType", "}"); ReportViewer reportViewer = new ReportViewer(); List <CashBackReport> cashBackReports = new List <CashBackReport>(); if (options == "dtl") { cashBackReports = service.CashBackDetails(mphone, fromDate, toDate, cbType); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCashBackDtl.rdlc"); //Request.RequestUri(""); } if (options == "sum") { cashBackReports = service.CashBackSummaryReport(mphone, fromDate, toDate, cbType); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTCashBackSum.rdlc"); //Request.RequestUri(""); } reportViewer.LocalReport.SetParameters(GetGenerateCashBackParameter(fromDate, toDate, cbType)); ReportDataSource A = new ReportDataSource("CashBack", cashBackReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public byte[] LankaBanglaDpsPaymentDetails(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}"); List <LankaBangla> dpsDeilsReports = service.GetDpsDetailsInfo(fromDate, toDate); ReportViewer reportViewer = new ReportViewer(); if (model.FileType == "EXCEL") { reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPT_Lb_Dps_Dtl_Excel.rdlc"); //Request.RequestUri(""); } else { reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPT_Lb_Dps_Dtl.rdlc"); //Request.RequestUri(""); } reportViewer.LocalReport.SetParameters(GetDpsDetailsInfoRptParameter(fromDate, toDate)); ReportDataSource A = new ReportDataSource("LankaBangla", dpsDeilsReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object KycCommission(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string reportName = builder.ExtractText(Convert.ToString(model.ReportOption), "reportName", ","); string regFromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "regFromDate", ","); string regToDate = builder.ExtractText(Convert.ToString(model.ReportOption), "regToDate", ","); string commissionStatus = builder.ExtractText(Convert.ToString(model.ReportOption), "commissionStatus", ","); string authFromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "authFromDate", ","); string authToDate = builder.ExtractText(Convert.ToString(model.ReportOption), "authToDate", ","); string agentNo = builder.ExtractText(Convert.ToString(model.ReportOption), "agentNo", "}"); string distributorNo = builder.ExtractText(Convert.ToString(model.ReportOption), "distributorNo", ","); string transNo = builder.ExtractText(Convert.ToString(model.ReportOption), "transNo", ","); ReportViewer reportViewer = new ReportViewer(); List <KycCommission> kycCommissions = new List <KycCommission>(); kycCommissions = service.GetRptkycCommissionsList(reportName, regFromDate, regToDate, commissionStatus, authFromDate, authToDate, distributorNo, agentNo, transNo); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTKycCom.rdlc"); reportViewer.LocalReport.SetParameters(GenerateParamKycCom(regFromDate, regToDate, reportName)); ReportDataSource A = new ReportDataSource("KycCommission", kycCommissions); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public object BranchWiseCount(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ","); string userId = builder.ExtractText(Convert.ToString(model.ReportOption), "userId", ","); string option = builder.ExtractText(Convert.ToString(model.ReportOption), "option", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", "}"); if (branchCode == "null") { branchCode = null; } if (userId == "null") { userId = null; } if (fromDate == "null") { fromDate = DateTime.Now.AddYears(-99).ToString("yyyy/MM/dd"); } if (toDate == "null") { toDate = DateTime.Now.ToString("yyyy/MM/dd"); } ReportViewer reportViewer = new ReportViewer(); List <BranchWiseCount> BranchWiseCountList = new List <BranchWiseCount>(); BranchWiseCountList = service.BranchWiseCount(branchCode, userId, option, fromDate, toDate); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTBranchWiseCount.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetReportParameterForSourceWiseRegistration(fromDate, toDate)); ReportDataSource A = new ReportDataSource("BranchWiseCount", BranchWiseCountList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } }
public byte[] GetAgentDsrListByPmphone(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", "}"); List <AgentDsrList> registrationReports = service.GetAgentDsrListByPmphone(mphone); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAgentDsr.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetAgentDsrListByPmphoneRptParameter(mphone)); ReportDataSource A = new ReportDataSource("AgentDsrList", registrationReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object OutletSumTransReportByTranDate(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string dateType = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", "}"); var clientInfo = (Reginfo)kycService.GetClientInfoByMphone(mphone); if (clientInfo.CatId != "M") { return("NOTM"); } double totalTransAmt = 0; double totalTransCount = 0; List <MerchantTransactionSummary> merchantTransactionList = new List <MerchantTransactionSummary>(); merchantTransactionList = childMerchantService.ChainMerTransSummReportByTd(mphone, fromDate, toDate).ToList(); if (merchantTransactionList.Count() > 0) { totalTransCount = merchantTransactionList.Count(); totalTransAmt = merchantTransactionList.Sum(x => x.TransAmt); } ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTChainMerTranSumByTd.rdlc"); reportViewer.LocalReport.SetParameters(GetReportParameterMerchantSummary(mphone, fromDate, toDate, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantCode : null, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantName : null, totalTransCount, totalTransAmt)); ReportDataSource A = new ReportDataSource("MerchantTransferSummary", merchantTransactionList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { throw; } }
public object RegistrationReportSummary(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string options = builder.ExtractText(Convert.ToString(model.ReportOption), "options", "}"); List <RegistrationSummary> registrationReports = service.GetRegistrationReportSummary(fromDate, toDate, options); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTRegistrationSummary.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetRegistrationRptParameter(fromDate, toDate, options)); ReportDataSource A = new ReportDataSource("RegistrationSummary", registrationReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object GenerateQrReceipt(string mphone) { try { QrCode qrCode = service.GenerateQrCode(mphone); List <QrCode> qrCodes = new List <QrCode>(); qrCodes.Add(qrCode); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/MerchantSlip.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetGenerateQrReceiptParameter(mphone)); ReportDataSource A = new ReportDataSource("QrCode", qrCodes); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, "PDF")); } //string mphone = "01682393688"; catch (Exception ex) { return(ex.ToString()); } }
public object KycBalance(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string regStatus = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", "}"); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string accNo = builder.ExtractText(Convert.ToString(model.ReportOption), "accNo", ","); string options = builder.ExtractText(Convert.ToString(model.ReportOption), "options", ","); string accCategory = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategory", ","); List <KycBalance> kycBalances = service.GetKycBalance(regStatus, fromDate, toDate, accNo, options, accCategory); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTKycBalance.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetKycBalanceRptParameter(regStatus, fromDate, toDate, accNo, options, accCategory)); ReportDataSource A = new ReportDataSource("KycBalance", kycBalances); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object AgentInformation(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string accCategorySub = builder.ExtractText(Convert.ToString(model.ReportOption), "subAccCategory", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string options = builder.ExtractText(Convert.ToString(model.ReportOption), "options", ","); string accCategory = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategory", "}"); List <AgentInformation> registrationReports = service.GetAgentInfo(fromDate, toDate, options, accCategory, accCategorySub); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAgentInformation.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetKycInformationRptParameter(fromDate, toDate, options, accCategory)); ReportDataSource A = new ReportDataSource("AgentInformation", registrationReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object DailySumReport(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string dateType = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", "}"); //var clientInfo = (Reginfo)kycService.GetClientInfoByMphone(mphone); var childMerchantCode = chainMerchantService.GetChainMerchantCodeByMphone(mphone); List <OutletDailySummaryTransaction> merchantTransactionList = new List <OutletDailySummaryTransaction>(); merchantTransactionList = childMerchantService.ChildMerDailySumReport(mphone, childMerchantCode, fromDate, toDate, dateType).ToList(); string merchantName = merchantTransactionList[0].OutletName; string merchantCode = merchantTransactionList[0].OutletId; ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTChildOutletDailySummaryTrans.rdlc"); reportViewer.LocalReport.SetParameters(GetReportParameterDailySumReport(mphone, fromDate, toDate, merchantName, merchantCode)); ReportDataSource A = new ReportDataSource("OutletDailyTransaction", merchantTransactionList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { throw; } }
public byte[] AuditTrailReport(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ","); string user = builder.ExtractText(Convert.ToString(model.ReportOption), "user", ","); string parentMenu = builder.ExtractText(Convert.ToString(model.ReportOption), "parentMenu", ","); string action = builder.ExtractText(Convert.ToString(model.ReportOption), "action", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string auditId = builder.ExtractText(Convert.ToString(model.ReportOption), "auditId", "}"); List <AuditTrailReport> auditTrailReports = reportShareService.GetAuditTrailReport(branchCode, user, parentMenu, action, fromDate, toDate, auditId); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAuditTrail.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetAuditTrailReportParameter(branchCode, user, parentMenu, action, fromDate, toDate, auditId)); ReportDataSource A = new ReportDataSource("AuditTrail", auditTrailReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public byte[] ApplicationUserReport(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string branchCode = builder.ExtractText(Convert.ToString(model.ReportOption), "branchCode", ","); string userName = builder.ExtractText(Convert.ToString(model.ReportOption), "userName", ","); string name = builder.ExtractText(Convert.ToString(model.ReportOption), "name", ","); string mobileNo = builder.ExtractText(Convert.ToString(model.ReportOption), "mobileNo", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string roleName = builder.ExtractText(Convert.ToString(model.ReportOption), "roleName", "}"); List <ApplicationUserReport> applicationUserReports = reportShareService.GetApplicationUserReports(branchCode, userName, name, mobileNo, fromDate, toDate, roleName); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTApplicationUser.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetApplicationUserRptParameter(branchCode, userName, name, mobileNo, fromDate, toDate, roleName)); ReportDataSource A = new ReportDataSource("ApplicationUserReport", applicationUserReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object OutletDetailsTransReport(ReportModel model) { try { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string dateType = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", "}"); var clientInfo = (Reginfo)kycService.GetClientInfoByMphone(mphone); if (clientInfo.CatId != "M") { return("NOTM"); } List <ChildMerchantTransaction> merchantTransactionList = new List <ChildMerchantTransaction>(); merchantTransactionList = childMerchantService.GetChildMerchantTransactionReport(mphone, fromDate, toDate).ToList(); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTChildMerchantTransaction.rdlc"); reportViewer.LocalReport.SetParameters(GetReportParameterChildMerchant(mphone, fromDate, toDate, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantName : null, merchantTransactionList.Count() > 1 ? merchantTransactionList[1].MerchantCode : null)); ReportDataSource A = new ReportDataSource("ChildMerchantTransaction", merchantTransactionList); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { throw; } }
public byte[] RegistrationReport(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string regStatus = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", "}"); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string basedOn = builder.ExtractText(Convert.ToString(model.ReportOption), "basedOn", ","); string options = builder.ExtractText(Convert.ToString(model.ReportOption), "options", ","); string accCategorySub = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategorySub", ","); string accCategory = builder.ExtractText(Convert.ToString(model.ReportOption), "accCategory", ","); List <RegistrationReport> registrationReports = service.GetRegistrationReports(regStatus, fromDate, toDate, basedOn, options, accCategory, accCategorySub); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTRegistrationDetails.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetRegistrationRptParameter(regStatus, fromDate, toDate, basedOn, options, accCategory)); ReportDataSource A = new ReportDataSource("RegistrationDetails", registrationReports); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object OnlineRegistration(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string accNo = builder.ExtractText(Convert.ToString(model.ReportOption), "accNo", "}"); string category = builder.ExtractText(Convert.ToString(model.ReportOption), "category", ","); string regStatus = builder.ExtractText(Convert.ToString(model.ReportOption), "regStatus", ","); string fromHour = builder.ExtractText(Convert.ToString(model.ReportOption), "fromHour", ","); string toHour = builder.ExtractText(Convert.ToString(model.ReportOption), "toHour", ","); List <OnlineRegistration> onlineRegistrations = service.GetOnlineRegReport(fromDate, toDate, category, accNo, regStatus, fromHour, toHour); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTOnlineReg.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetOnlineRegRptParameter(fromDate, toDate, category, regStatus)); ReportDataSource A = new ReportDataSource("OnlineRegistration", onlineRegistrations); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public object GenerateQrForBackOff(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string qrType = builder.ExtractText(Convert.ToString(model.ReportOption), "qrType", ","); string catId = builder.ExtractText(Convert.ToString(model.ReportOption), "catId", "}"); Reginfo reginfo = (Reginfo)service.GetClientInfoByMphone(mphone); if (qrType == "okqr") { try { //QrCode qrCode = service.GenerateQrCodeForBackOff(mphone); //List<QrCode> qrCodes = new List<QrCode>(); //qrCodes.Add(qrCode); //ReportViewer reportViewer = new ReportViewer(); //reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/QrCodeSlip.rdlc"); //Request.RequestUri(""); //reportViewer.LocalReport.SetParameters(GetGenerateQrReceiptParameter(mphone)); //ReportDataSource A = new ReportDataSource("QrCode", qrCodes); //reportViewer.LocalReport.DataSources.Add(A); //ReportUtility reportUtility = new ReportUtility(); //MFSFileManager fileManager = new MFSFileManager(); //return reportUtility.GenerateReport(reportViewer, model.FileType); string banglaQr = service.GetBanglaQrStream(reginfo.Mphone, reginfo.CatId); QrCode qrCode = service.GenerateQrCodeForBackOff(banglaQr); List <QrCode> qrCodes = new List <QrCode>(); qrCodes.Add(qrCode); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/QrCodeSlip.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetGenerateQrReceiptParameter(mphone)); ReportDataSource A = new ReportDataSource("QrCode", qrCodes); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } } else if (qrType == "bnqr" && (reginfo.CatId == "M" || reginfo.CatId == "CM" || reginfo.CatId == "A") && !string.IsNullOrEmpty(mphone)) { try { string banglaQr = service.GetBanglaQrStream(reginfo.Mphone, reginfo.CatId); QrCode qrCode = service.GenerateQrCodeForBackOff(banglaQr); List <QrCode> qrCodes = new List <QrCode>(); qrCodes.Add(qrCode); ReportViewer reportViewer = new ReportViewer(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/BanglaQrCodeSlip.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetGenerateQrReceiptParameter(mphone)); ReportDataSource A = new ReportDataSource("QrCode", qrCodes); reportViewer.LocalReport.DataSources.Add(A); ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); } catch (Exception ex) { return(ex.ToString()); } } else { return(null); } }
public byte[] ChainMerchantReport(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string chainMerchantCode = null; string outletAccNo = builder.ExtractText(Convert.ToString(model.ReportOption), "outletAccNo", ","); string chainMerchantNo = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", ","); string reportType = builder.ExtractText(Convert.ToString(model.ReportOption), "reportType", ","); string reportViewType = builder.ExtractText(Convert.ToString(model.ReportOption), "reportViewType", ","); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string dateType = builder.ExtractText(Convert.ToString(model.ReportOption), "dateType", ","); string outletCode = builder.ExtractText(Convert.ToString(model.ReportOption), "outletCode", "}"); if (chainMerchantCode == null) { chainMerchantCode = _chainMerchantService.GetChainMerchantCodeByMphone(chainMerchantNo); } //string chainMerchantCode = "1811050000040000"; // string chainMerchantNo = "01841700736"; // string outletAccNo = null; // string outletCode = null; // string reportType = "OSTR"; // string reportViewType = "Transaction Date"; // string fromDate = System.DateTime.Now.AddYears(-5).ToString(); // string toDate = System.DateTime.Now.ToString(); // string dateType = "Transaction Date"; if (reportViewType == "TD") { reportViewType = "Transaction Date"; } if (dateType == "TD") { dateType = "Transaction Date"; } ReportViewer reportViewer = new ReportViewer(); if (reportType == "ODTR") { List <OutletDetailsTransaction> OutletDetailsTransactionList = new List <OutletDetailsTransaction>(); var parentMerchantMphone = kycService.GetChainMerchantMphoneByCode(chainMerchantCode).ToString(); var parentReginfo = (Reginfo)kycService.GetClientInfoByMphone(parentMerchantMphone); OutletDetailsTransactionList = _chainMerchantService.GetOutletDetailsTransactionList(chainMerchantCode, outletAccNo, outletCode, reportType, reportViewType, fromDate, toDate, dateType).ToList(); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTOutletDetailsTransaction.rdlc"); reportViewer.LocalReport.SetParameters(RptParamForOutletDetailsTransaction(fromDate, toDate, chainMerchantCode, parentMerchantMphone, parentReginfo.CompanyName)); ReportDataSource A = new ReportDataSource("OutletDetailsTransaction", OutletDetailsTransactionList); reportViewer.LocalReport.DataSources.Add(A); } else if (reportType == "OSTR") { List <OutletSummaryTransaction> outletSummaryTransactionList = new List <OutletSummaryTransaction>(); outletSummaryTransactionList = _chainMerchantService.GetOutletSummaryTransactionList(chainMerchantCode, outletAccNo, outletCode, reportType, reportViewType, fromDate, toDate, dateType).ToList(); var parentMerchantMphone = kycService.GetChainMerchantMphoneByCode(chainMerchantCode).ToString(); var parentReginfo = (Reginfo)kycService.GetClientInfoByMphone(parentMerchantMphone); string reportName = "Outlet Summary Transaction report"; reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTOutletSummaryTransaction.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(RptParamForOutletSummaryTransaction(fromDate, toDate, chainMerchantCode, reportViewType, reportName, parentMerchantMphone, parentReginfo.CompanyName)); ReportDataSource A = new ReportDataSource("OutletSummaryTransaction", outletSummaryTransactionList); reportViewer.LocalReport.DataSources.Add(A); } else if (reportType == "OTPTR") { List <OutletSummaryTransaction> OutletToParentSummaryTransactionList = new List <OutletSummaryTransaction>(); OutletToParentSummaryTransactionList = _chainMerchantService.GetOutletToParentTransSummaryList(chainMerchantCode, chainMerchantNo, outletAccNo, outletCode, reportType, reportViewType, fromDate, toDate, dateType).ToList(); string reportName = "Outlet To Parent Transaction report"; var parentMerchantMphone = kycService.GetChainMerchantMphoneByCode(chainMerchantCode).ToString(); var parentReginfo = (Reginfo)kycService.GetClientInfoByMphone(parentMerchantMphone); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTOutletSummaryTransaction.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(RptParamForOutletSummaryTransaction(fromDate, toDate, chainMerchantCode, reportViewType, reportName, parentMerchantMphone, parentReginfo.CompanyName)); ReportDataSource A = new ReportDataSource("OutletSummaryTransaction", OutletToParentSummaryTransactionList); reportViewer.LocalReport.DataSources.Add(A); } else //if (reportType == "DSR") { List <OutletDailySummaryTransaction> outletDailySummaryTransactionList = new List <OutletDailySummaryTransaction>(); outletDailySummaryTransactionList = _chainMerchantService.GetOutletDailySummaryTransList(chainMerchantCode, outletAccNo, outletCode, reportType, fromDate, toDate, dateType).ToList(); string reportName = null; var parentMerchantMphone = kycService.GetChainMerchantMphoneByCode(chainMerchantCode).ToString(); var parentReginfo = (Reginfo)kycService.GetClientInfoByMphone(parentMerchantMphone); reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTOutletDailySummaryTrans.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(RptParamForOutletSummaryTransaction(fromDate, toDate, chainMerchantCode, reportViewType, reportName, parentMerchantMphone, parentReginfo.CompanyName)); ReportDataSource A = new ReportDataSource("OutletDailyTransaction", outletDailySummaryTransactionList); reportViewer.LocalReport.DataSources.Add(A); } ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }
public byte[] GenerateAccountStatement(ReportModel model) { StringBuilderService builder = new StringBuilderService(); string mphone = builder.ExtractText(Convert.ToString(model.ReportOption), "mphone", "}"); string fromDate = builder.ExtractText(Convert.ToString(model.ReportOption), "fromDate", ","); string toDate = builder.ExtractText(Convert.ToString(model.ReportOption), "toDate", ","); string transNo = builder.ExtractText(Convert.ToString(model.ReportOption), "transNo", ","); List <MasterWallet> accountStatementList = new List <MasterWallet>(); accountStatementList = _TransactionService.GetMasterWalletAccountStatementList(mphone, fromDate, toDate, transNo).ToList(); ReportViewer reportViewer = new ReportViewer(); if (accountStatementList.Count() > 0) { //if opening balance not coming then add if (accountStatementList[0].Description != "Balance Brought Forward" && transNo == "null") { MasterWallet objAccountStatement = new MasterWallet(); objAccountStatement.TransDate = Convert.ToDateTime(fromDate); objAccountStatement.Description = "BALANCE BROUGHT FORWARD"; objAccountStatement.DebitAmt = 0; objAccountStatement.CreditAmt = 0; objAccountStatement.Balance = 0; accountStatementList.Insert(0, objAccountStatement); } if (accountStatementList.Count() > 1) { for (int i = 1; i < accountStatementList.Count(); i++) { if (accountStatementList[i].CreditAmt != 0) { accountStatementList[i].Balance = accountStatementList[i - 1].Balance + accountStatementList[i].CreditAmt; } if (accountStatementList[i].DebitAmt != 0) { accountStatementList[i].Balance = accountStatementList[i - 1].Balance - accountStatementList[i].DebitAmt; } } } double netBalance = 0; netBalance = accountStatementList[accountStatementList.Count - 1].Balance; reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAccStatMst.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetReportParameter(mphone, fromDate, toDate, netBalance, accountStatementList.Count() > 1 ? accountStatementList[1].CustomerName : null)); ReportDataSource A = new ReportDataSource("MasterWallet", accountStatementList); reportViewer.LocalReport.DataSources.Add(A); } else { double netBalance = 0; reportViewer.LocalReport.ReportPath = HostingEnvironment.MapPath("~/Reports/RDLC/RPTAccStatMst.rdlc"); //Request.RequestUri(""); reportViewer.LocalReport.SetParameters(GetReportParameter(mphone, fromDate == "null" && accountStatementList.Count() > 1 ? accountStatementList[0].TransDate.ToString():fromDate, toDate == "null" && accountStatementList.Count() > 1 ? accountStatementList[0].TransDate.ToString():toDate, netBalance, accountStatementList.Count() > 1 ? accountStatementList[0].CustomerName : null)); ReportDataSource A = new ReportDataSource("MasterWallet", accountStatementList); reportViewer.LocalReport.DataSources.Add(A); } ReportUtility reportUtility = new ReportUtility(); MFSFileManager fileManager = new MFSFileManager(); return(reportUtility.GenerateReport(reportViewer, model.FileType)); }