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.
 
 
 
 
 

5030 lines
222 KiB

using Swift.DAL.BL.Remit.Compliance;
using Swift.DAL.BL.Remit.ExchangeRate;
using Swift.DAL.BL.Remit.Transaction;
using Swift.DAL.BL.System.UserManagement;
using Swift.DAL.MobileDao;
using Swift.DAL.Remittance.AML;
using Swift.DAL.SwiftDAL;
using Swift.web.Library;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Text;
using System.Threading;
using System.Web.UI;
namespace Swift.web.RemittanceSystem.RemittanceReports
{
public partial class Reports : System.Web.UI.Page
{
private Boolean AllowDrillDown;
private string cssClass = "table table-responsive table-bordered table-striped";
private string fieldAlignment = "";
private string fieldFormat = "";
private string fieldWrap = "";
private string tblCaption = "";
private Boolean mergeColumnHead;
private ReportResult reportResult = new ReportResult();
private string excludeColumns = "";
private bool includeSerialNo = false;
private bool useDBRowColorCode = false;
private int subTotalBy = -1;
private int totalTextCol = -1;
private int subTotalTextCol = -1;
private string subTotalFields = "";
private string subTotalText = "";
private string totalFields = "";
private string totalText = "";
private int totalPage = 0;
private int pageNo = 0;
private double grandTotal = 0.00;
private double grandTotalUsd = 0.00;
private double grandTotal_1 = 0.00;
private string reportName = "";
private int extraCol = 0;
private string flag = "";
protected string Url = GetStatic.GetUrlRoot();
private string isExportFull = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (GetStatic.GetUser() == "")
Response.Redirect(GetStatic.GetDefaultPage());
}
PrintReport();
}
private void PrintHead()
{
Page.Title = reportResult.ReportHead;
head.InnerHtml = reportResult.ReportHead;
}
private void PrintFilters()
{
var user = GetStatic.GetUser();
var now = GetStatic.GetUserDateTime();
filters.InnerHtml = "Filters Applied : <br />" + reportResult.Filters +
"<br /><br />Generated On=" + now +
" || Generated By=" + user;
}
private void PrintError()
{
rptDiv.InnerHtml = "<div class = \"reportError\">" + reportResult.Msg + "</div>";
}
protected string GetURL()
{
return Request.Url.AbsoluteUri.Replace("&pageNumber=" + GetPageNumber(), "");
}
private void PrintReport()
{
string reportName = GetStatic.ReadQueryString("reportName", "").ToLower();
string mode = GetStatic.ReadQueryString("mode", "").ToLower();
isExportFull = mode.ToLower() == "download" ? "Y" : "N";
reportResult = PrepareReport(reportName);
if (mode == "download")
{
//Excel.Worksheet xlWorkSheet = new Excel.Worksheet();
//Excel.Range range;
string format = GetStatic.ReadQueryString("format", "xls");
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=" + reportName + "." + format);
exportDiv.Visible = false;
}
PrintHead();
PrintFilters();
if (reportResult.ErrorCode != "0")
{
PrintError();
return;
}
if (reportName == "40112500txnsummaryrpt")
{
txnsummaryrpt();
return;
}
if (reportName == "usermatrix")
{
PrintUserMatrixReport();
return;
}
DataTable dt;
int tableCount = reportResult.Result.Tables.Count;
if (tableCount > 4)
{
if (mode != "download")
ShowPaging(reportResult.Result.Tables[0]);
dt = reportResult.Result.Tables[1];
}
else
{
dt = reportResult.ResultSet;
}
string reportText = GenerateReport(ref dt);
rptDiv.InnerHtml = reportText;
}
private void ShowPaging(DataTable dt)
{
DataTable dtPaging = dt;
int totalRecords = Convert.ToInt32(dtPaging.Rows[0]["TXNCOUNT"].ToString());
int PageSizes = Convert.ToInt32(dtPaging.Rows[0]["PAGESIZE"].ToString());
int PageNumber = Convert.ToInt32(dtPaging.Rows[0]["PAGENUMBER"].ToString());
if (dtPaging.Columns.Count > 3)
grandTotal = Convert.ToDouble(dtPaging.Rows[0]["GRANDTOTAL"].ToString());
if (dtPaging.Columns.Count > 4)
grandTotalUsd = Convert.ToDouble(dtPaging.Rows[0]["GRANDTOTAL_USD"].ToString());
string cssLink = "pagingLink";
totalPage = totalRecords / PageSizes;
if ((totalPage * PageSizes) < totalRecords)
totalPage++;
var sbPaging = new StringBuilder("<table class=\"table table-responsive table-striped table-bordered\"><tr><td nowrap='nowrap'>");
sbPaging.AppendLine("<div class='reportFilters' >");
sbPaging.AppendLine("<span style='float:left; width:auto; margin-top:5px;'>Results:&nbsp; " + totalRecords + " records &nbsp; </span>");
paging.Visible = true;
int currPage = GetPageNumber();
int startPage = (currPage - 5 <= 0 ? 1 : currPage - 5);
int offSet = (startPage == 1 ? ((currPage - 5) * -1 + 1) : 0);
int endPage = currPage + 4 + offSet;
endPage = currPage == 0 ? 10 : endPage;
endPage = (endPage > totalPage ? totalPage : endPage);
if (currPage > 10 && (endPage - startPage) + 1 != 10)
{
startPage = startPage - (10 - (endPage - startPage + 1));
}
if (totalRecords > PageSizes)// Convert.ToInt32(GetStatic.GetReportPagesize()))
{
string url = GetURL();
sbPaging.AppendLine("<img onclick='GotoPage(1);' src='../../Images/paging_Icons/first_page.png' alt='First Page' style='margin-top:5px;float:left;border:none;cursor:pointer' />");
sbPaging.AppendLine("<img " + (GetPageNumber() != 1 ? " onclick='GotoPage(" + (GetPageNumber() - 1) + ");'" : "") + " src='../../Images/paging_Icons/" + (GetPageNumber() == 1 ? "previous_page_dis" : "previous_page") + ".png' style='margin-top:5px;float:left;border:none;cursor:pointer' alt='Previous Page' /></a>");
for (int i = startPage; i < endPage + 1; i++)
{
cssLink = PageNumber == i ? "pagingLinkSelected" : "pagingLink";
sbPaging.AppendLine("<span onclick ='GotoPage(" + i + ");' class='" + cssLink + "'>" + i + "</span>");
}
sbPaging.AppendLine("<img " + (GetPageNumber() != totalPage ? "onclick=GotoPage(" + (GetPageNumber() + 1) + ");" : "") + " src='../../Images/paging_Icons/" + (GetPageNumber() == totalPage ? "next_page_dis" : "next_page") + ".png' style='margin-top:5px;border:none;cursor:pointer' alt='Next Page' /></a>");
sbPaging.AppendLine("<img onclick=GotoPage(" + totalPage + "); src='../../Images/paging_Icons/last_page.png' style='margin-top:5px;border:none;cursor:pointer' />");
}
sbPaging.AppendLine("</div></td><td nowrap='nowrap' width='135' align=\"right\">");
if (totalRecords > PageSizes) //Convert.ToInt32(GetStatic.GetReportPagesize()))
sbPaging.AppendLine("Goto Page: " + GotoList(totalPage));
sbPaging.AppendLine("</td></tr></table>");
paging.InnerHtml = sbPaging.ToString();
}
private string GotoList(int totalPage)
{
StringBuilder sb = new StringBuilder("");
sb.AppendLine("<select id='gotoLabel' onchange=GotoPage(this.value); style='min-width:50px'>");
for (int i = 0; i < totalPage; i++)
{
sb.AppendLine("<option value='" + (i + 1) + "' " + (GetPageNumber() == (i + 1) ? "Selected=Selected" : "") + " >" + (i + 1) + "</option>");
}
sb.AppendLine("</select>");
return sb.ToString();
}
private ReportResult PrepareReport(string reportName)
{
if (reportName == "tran")
reportResult = PrepareTranReport();
else if (reportName == "comm")
reportResult = PrepareCommReport();
else if (reportName == "commsenddetail")
reportResult = PrepareCommSendReport();
else if (reportName == "commpaydetail")
reportResult = PrepareCommPayReport();
else if (reportName == "trnrptmaster")
reportResult = PrepareTranMasterReport();
else if (reportName == "reportdummy")
reportResult = PrepareDummyReport();
else if (reportName == "creditdetail")
reportResult = PrepareCreditDetailReport();
else if (reportName == "agentstmt")
reportResult = PrepareAgentStmtReport();
else if (reportName == "agentbal")
reportResult = PrepareAgentBalReport();
else if (reportName == "agenttrandetail")
reportResult = PrepareAgentBalDrillDownReport();
else if (reportName == "soa")
reportResult = PrepareAgentSOA();
else if (reportName == "soadrilldown")
reportResult = PrepareAgentSoaDrilldown();
else if (reportName == "urole")
reportResult = ShowUserMatrixReportRole();
else if (reportName == "urole2")
reportResult = ShowUserMatrixReportRole2();
else if (reportName == "ufn")
reportResult = ShowUserMatrixReportFunction();
else if (reportName == "enrol")
reportResult = PrepareEnrollCommRpt();
else if (reportName == "endetail")
reportResult = PrepareEnrollCommDetailRpt();
else if (reportName == "logbytran")
reportResult = PrepareAppLogByTranId();
else if (reportName == "logbydate")
reportResult = PrepareAppLogByDate();
else if (reportName == "troublerpt")
reportResult = PrepareTroubleTicketRpt();
else if (reportName == "tranaccess")
reportResult = PrepareTranAccessReport();
else if (reportName == "exrate")
reportResult = PrepareExchangeRateReport();
else if (reportName == "userloginagingrpt")
reportResult = PrepareUserLoginAgingRpt();
else if (reportName == "errorpaidrpt")
reportResult = PrepareErroneouslyPaidRpt();
else if (reportName == "acdepositdetail")
reportResult = PrepareAcDepositDetailReport();
else if (reportName == "acdepositsummary")
reportResult = PrepareAcDepositSummaryReport();
else if (reportName == "ncellfreesimrpt")
reportResult = PrepareNcellFreeSimRpt();
else if (reportName == "ncellsimsummaryrpt")
reportResult = PrepareNcellSimSummaryRpt();
else if (reportName == "usermatrix")
reportResult = ShowUserMatrixReport();
else if (reportName == "20163300")
reportResult = PrepareReportCancelreport();
else if (reportName == "settlementint")
reportResult = PrepareSettlementIntRpt();
else if (reportName == "newcustomerregistrationreport")
reportResult = PrepareNewCustomerRegistrationRpt();
else if (reportName == "settlementdom")
reportResult = PrepareSettlementDomRpt();
else if (reportName == "irhsettdrildwn")
reportResult = PrepareSettlementDdl();
else if (reportName == "transactionnewrpt")
reportResult = PrepareTransactionReport();
else if (reportName == "amlreport")
reportResult = PrepareAMLReport();
else if (reportName == "amlddlreport")
reportResult = PrepareAMLReport_DDL();
else if (reportName == "20164200")
reportResult = Prepare_20164200_report();
else if (reportName == "20164400")
reportResult = PrepareCustomerEnrollmentReport();
else if (reportName == "customerrpt")
reportResult = PrepareTxnRptByMemIDReport();
else if (reportName == "20164500")
reportResult = PrepareSMSRpt();
else if (reportName == "20167200")
reportResult = PrepareBonusRpt20167200();
else if (reportName == "20171000")
reportResult = PrepareReport_20171000();
else if (reportName == "20821400")
reportResult = PrepareReport_20821400();
else if (reportName == "10122200_login")
reportResult = PrepareReport_10122200_login();
else if (reportName == "10122200_txn")
reportResult = PrepareReport_10122200_txn();
else if (reportName == "20167300")
reportResult = PrepareReport_20167300();
else if (reportName == "20601200")
reportResult = PrepareprocMultipleTxnAnalysisReport_20601200();
//reconcile report
//quick search unpaid txn
else if (reportName == "20167600")
reportResult = PrepareReport_20167600();
//reconcile user wise rpt
else if (reportName == "20182200")
reportResult = PrepareReport_20182200();
else if (reportName == "20167700")
reportResult = PrepareReport_20167700();
else if (reportName == "20161700")
reportResult = PrepareReport_20161700();
//payable remittance report
else if (reportName == "20161200")
reportResult = PrepareReport_20161200();
else if (reportName == "20182200_recon2")
reportResult = PrepareReport_20182200_recon2();
//soa monthly log report
else if (reportName == "20167800")
reportResult = PrepareReport_20167800();
//certificate Report
else if (reportName == "20167900")
reportResult = PrepareReport_20167900();
else if (reportName == "20167500")
reportResult = PrepareReport_20167500();
else if (reportName == "unpaid-rpt-nepal")
reportResult = PrepareReport_NepalUnpaid();
else if (reportName == "20167600")
reportResult = PrepareReport_20167600();
else if (reportName == "accountingsummary")
reportResult = PrepareAccountingSummary();
//CUSTOMER REPORT
else if (reportName == "customerptenrollment")//enrollment
reportResult = PrepareReport_customerptenrollment();
else if (reportName == "20821700") //user wise approval
reportResult = PrepareReport_20821700();//
else if (reportName == "20822100_txn") // txn report
reportResult = PrepareReport_20822100_txn();
else if (reportName == "20822100_bonus")// bonus repirt
reportResult = PrepareReport_20822100_bonus();
else if (reportName == "20821700_3") //agent wise approval
reportResult = PrepareReport_20821700_3();//
else if (reportName == "getcardstockreport")
reportResult = PrepareReport_getcardstockreport();
//GIBL Domestic Report
else if (reportName == "trashtranrpt")
reportResult = PrepareReport_trashtranrpt();
else if (reportName == "txnrpt")
reportResult = PrepareReport_txnrpt();
else if (reportName == "domtxndetail")
reportResult = PrepareReport_txnrpt_Detail();
else if (reportName == "20831400")
reportResult = PrepareReport_20831400();
//agent profile update
else if (reportName == "20102900")
reportResult = PrepareReport_20102900();
//report for credit Security report
else if (reportName == "20181800")
reportResult = PrepareReport_20181800();
else if (reportName == "20181800_1")
reportResult = PrepareReport_20181800_1();
//GIBL profile update
else if (reportName == "20832300")
reportResult = PrepareReport_20832300();
else if (reportName == "20832300_enroll")
reportResult = PrepareReport_20832300_enroll();
// Slab wise & Consplidated Report
else if (reportName == "20168200")
reportResult = PrepareReport_20168200();
else if (reportName == "aclogiso")
reportResult = PrepareAcIsoLog();
//Ho User Vs Txn Report
else if (reportName == "20168300")
reportResult = PrepareReport_20168300();
else if (reportName == "20168000")
reportResult = PrepareReport_20168000();
else if (reportName == "40112500txnsummaryrpt")
reportResult = Prepare40112500TxnSummary();
else if (reportName == "20167400_debit")
reportResult = PrepareReport_20167400_debit();
else if (reportName == "20821400_zonewise")
reportResult = PrepareReport_20821400_zoneWise();
else if (reportName == "trashtranrpt-intl")
reportResult = PrepareReport_trashtranintlrpt();
else if (reportName == "20821100")
reportResult = PrepareReport_20821100();
else if (reportName == "trashtranrpt-intl")
reportResult = PrepareReport_trashtranintlrpt();
else if (reportName == "bankgauranteerpt")
reportResult = PrepareReport_BankGauranteeReport();
else if (reportName == "20822000_sc")
reportResult = PrepareReport_20822000_sc();
else if (reportName == "customercardexpiryrpt")
reportResult = PrepareReport_CustomerCardExpiryRpt();
else if (reportName == "20821700_activation")
reportResult = PrepareReport_20821700_activation();//Agent wise card activation report
else if (reportName == "incomeexpreport")
reportResult = IncomeExpReport();
else if (reportName == "20833500")
reportResult = PrepareReport_20833500();
else if (reportName == "settlementint_pagent")
reportResult = PrepareSettlementIntRpt_Pagent();
else if (reportName == "20831500")
reportResult = PrepareReport_20831500();
else if (reportName == "20821700_dcupload")
{
reportResult = PrepareReport_20821700_dcUpload();
}
else if (reportName == "20181930")
{
reportResult = PrepareReport_20181930();
}
else if (reportName == "40122100_reportrecon")
{
reportResult = PrepareReport_40122100_ReportRecon();
}
else if (reportName == "20177000")
{
// reportResult = PrepareReport_20177000();
}
else if (reportName == "funddepositrpt")
{
reportResult = PrepareReport_FundDeposit();
}
else if (reportName == "customerinquiry")
{
reportResult = PrepareReport_CustomerInquiry();
}
else if (reportName == "customerreport")
{
reportResult = PrepareReport_customerReport();
}
else if (reportName == "customerreportuserwise")
{
reportResult = PrepareReport_customerreportuserwise();
}
else if (reportName == "customerdetailreport")
{
reportResult = PrepareReport_customerDetailReport();
}
else if (reportName == "referrerreport" || reportName == "customerreportdrilldowndetail" || reportName == "txnreportdrilldowndetail" || reportName == "customerreportdrilldowntotalreferrerdetail" || reportName == "txnreportdrilldowntotalreferrerdetail")
{
reportResult = PrepareReport_referrerReport();
}
else if (reportName == "referralschemareport")
{
reportResult = PrepareReport_referralSchemaReport();
}
//else if (reportName == "txnreportdrilldowndetail")
//{
// reportResult = PrepareReport_txnreportdrilldownReport();
//}
else if (reportName == "autodebit")
{
reportResult = PrepareReport_autoDebitReport();
}
else if (reportName == "mitasu")
reportResult = PrepareReport_mitasuReport();
else if (reportName == "untransacted")
reportResult = PrepareReport_UntransactedReport();
else if (reportName.Equals("customermodifylog"))
reportResult = CustomerModifyLog();
else if (reportName.Equals("agentwisereferrerreport"))
reportResult = AgentWiseReferrerReport();
else if (reportName.Equals("cashstatus"))
reportResult = CashStatusReport();
else if (reportName.Equals("cashstatusreferral"))
reportResult = CashStatusReportReferral();
else if (reportName.Equals("dailypaidreport"))
reportResult = PrepareDailyPaidReport();
else if (reportName.Equals("dailysendingreport"))
reportResult = PrepareDailySendingReport();
else if (reportName.Equals("beneficiaryregistration"))
reportResult = PrepareBeneficaryRegistrationReport();
else if (reportName.Equals("customerregistration"))
reportResult = PrepareCustomerRegistrationReport();
else if (reportName.Equals("agentwisereferrerreport"))
reportResult = PrepareAgentWiseReferrerReport();
else if (reportName.Equals("checkreferal"))
reportResult = PrepareCheckReferalReport();
else if (reportName.Equals("rejectedreport"))
reportResult = PrepareRejectedReport();
else if (reportName.Equals("customerhistory"))
reportResult = PrepareCustomerHistory();
else if (reportName.Equals("jpdepositlist"))
reportResult = PrepareJpDepositList();
else if (reportName.Equals("updatecustomerreport"))
reportResult = PrepareUpdateCustomerReport();
//else if (reportName == "statementofaccount")
// reportResult = PrepareReport_StatementOfAccount();
else if (reportName == "compliancerejectreport")
reportResult = compliancerejectreport();
else if (reportName == "nooftransaction")
reportResult = utilityReport("nooftransaction");
else if (reportName == "pertransaction")
reportResult = utilityReport("pertransaction");
else if (reportName == "transactionthroughagent")
reportResult = utilityReport("transactionthroughagent");
else if (reportName == "noofcustomer")
reportResult = utilityReport("noofcustomer");
else if (reportName == "newregistration")
reportResult = utilityReport("newregistration");
else if (reportName == "newregistationwithvisastatus")
reportResult = utilityReport("newRegistationWithVisaStatus");
else if (reportName == "customerandtxnlist")
reportResult = PrepareCustomerAndTxnList();
else if (reportName == "cashreport")
reportResult = PrepareCashReport();
else if (reportName.Equals("staffvisitearnings"))
reportResult = StaffVisitEarningsReport();
else if (reportName.Equals("complicanceofacrejectreport"))
reportResult = ComplicanceOfacRejectReport();
else if (reportName.Equals("noworkpermit"))
reportResult = PrepareNoWorkPermitReport();
else if (reportName.Equals("transactionreport"))
reportResult = PreparTransactionReport();
else if (reportName.Equals("disabledcustomers"))
reportResult = PreparDisabledCustomersReport();
else if (reportName.Equals("customerbyintroducerreport"))
reportResult = CustomerByIntroducerReport();
else if (reportName.Equals("mobileregistrationreport"))
reportResult = PrepareMobileRegistrationReport();
else if (reportName.Equals("mobiletransactionreport"))
reportResult = PrepareMobileTransactionReport();
//else if (reportName.Equals("reuploadkycreport"))
// reportResult = ReuploadKycReport();
else if (reportName.Equals("untransctedonly"))
reportResult = UntransactedOnlyReport();
else if (reportName.Equals("sentrefundreport"))
reportResult = SentRefundReport();
else if (reportName.Equals("runningbalancereport"))
reportResult = RunningBalanceReport();
else if (reportName.Equals("mobileregistrationsummaryreport"))
reportResult = MobileRegistrationSummaryReport();
//else if (reportName=="mobiletransactionReport")
// reportResult = PrepareMobileTransactionReport()/*;*/
else if (reportName.Equals("sentreport"))
reportResult = SentReport();
else if (reportName.Equals("refundedonreport"))
reportResult = RefundedOnReport();
else if (reportName.Equals("refundedbeforereport"))
reportResult = RefundedBeforeReport();
else if (reportName.Equals("customerregistrationstatus"))
reportResult = CustomerRegistrationStatusReport();
else if (reportName.Equals("incompletekyc"))
reportResult = IncompleteKycReport();
else if (reportName.Equals("lawsondepositlist"))
reportResult = PrepareLawsonDepositList();
else if (reportName.Equals("agentearningreport"))
reportResult = PrepareAgentEarningReport();
else if (reportName.Equals("mobileregsummaryreport"))
reportResult = MobileRegSummaryReport();
else if (reportName.Equals("mobiletransummaryreport"))
reportResult = MobileTranSummaryReport();
else if (reportName.Equals("customerpromotionreport"))
reportResult = CustomerPromotionReport();
else if (reportName.Equals("promotionsummaryreport"))
reportResult = CustomerPromotionSummaryReport();
else if (reportName.Equals("customerbyreferralreport"))
reportResult = CustomerByReferralReport();
else if (reportName.Equals("partnertroubleticket"))
reportResult = PreparePartnerTroubleTicket();
return reportResult;
}
private ReportResult PrepareAccountingSummary()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
mergeColumnHead = true;
fieldFormat = "|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|N|";
fieldAlignment = "|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36|37|38|39|40";
totalText = "Total";
return (new TranAgentReportDao().GetAccountingSummary(GetStatic.GetUser(), "RPT", fromDate, toDate));
}
private ReportResult PrepareJpDepositList()
{
string particulars = GetStatic.ReadQueryString("particulars", "");
var txnDate = GetStatic.ReadQueryString("txnDate", "");
string amount = GetStatic.ReadQueryString("amount", "");
fieldFormat = "||N|N||N|";
fieldAlignment = "||R|R||R|";
return (new TranAgentReportDao().PrepareJpDepositList(GetStatic.GetUser(), particulars, txnDate, amount));
}
private ReportResult PrepareLawsonDepositList()
{
string particulars = GetStatic.ReadQueryString("particulars", "");
var txnDate = GetStatic.ReadQueryString("txnDate", "");
string amount = GetStatic.ReadQueryString("amount", "");
string account = GetStatic.ReadQueryString("account", "");
fieldFormat = "||N|N||N|";
fieldAlignment = "||R|R||R|";
return (new TranAgentReportDao().PrepareLawsonDepositList(GetStatic.GetUser(), particulars, txnDate, amount, account));
}
private ReportResult PrepareUpdateCustomerReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
fieldFormat = "||||||||";
fieldAlignment = "||||||||";
return (new TranAgentReportDao().GetUpdateCustomerReport(GetStatic.GetUser(), "s", fromDate, toDate, sAgent));
}
private ReportResult PrepareCustomerAndTxnList()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string searchBy = GetStatic.ReadQueryString("searchBy", "");
string groupBy = GetStatic.ReadQueryString("groupBy", "");
fieldFormat = "||||||||";
fieldAlignment = "||||||||";
return (new TranAgentReportDao().GetCustomerAndTxnList(GetStatic.GetUser(), "s-customerAndTxn", fromDate, toDate, searchBy, groupBy));
}
private ReportResult PrepareCashReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
fieldFormat = "||||||||";
fieldAlignment = "||||||||";
return (new TranAgentReportDao().GetCashReport(GetStatic.GetUser(), "CASH-REPORT", fromDate, toDate));
}
private ReportResult compliancerejectreport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
fieldFormat = "||||||||";
fieldAlignment = "||||||||";
return (new TranAgentReportDao().GetComplianceRejectedReport(fromDate, toDate, GetStatic.GetUser()));
}
private ReportResult utilityReport(string flag)
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string year = GetStatic.ReadQueryString("year", "");
fieldFormat = "||||||||";
fieldAlignment = "||||||||";
if (flag.ToLower() != "transactionthroughagent")
{
totalText = "Total";
totalFields = "1|2|3|4|5|6|7|8|9|10|11|12";
}
return (new TranAgentReportDao().GetUtilityReport(year, flag, fromDate, toDate, GetStatic.GetUser()));
}
private ReportResult PrepareSettlementIntRpt_Pagent()
{
string pCountry = GetStatic.ReadQueryString("pCountry", "");
var sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string type = GetStatic.ReadQueryString("type", "1");
string flag = GetStatic.ReadQueryString("flag", "s_pAgent");
mergeColumnHead = true;
totalText = "<b>Total</b>";
if (flag == "s_pAgent")
{
fieldFormat = "|N|N|||N|N||N|N";
fieldAlignment = "|R|R|||R|R||R|R";
totalFields = "1|2|3|5|6|7|8|9";
}
else if (flag == "s_pAgent_new")
{
fieldFormat = "|N|N|||N|N";
fieldAlignment = "|R|R|||R|R";
totalFields = "1|2|5|6";
}
else
{
fieldFormat = "|||N|N|||||N|N|";
fieldAlignment = "|||R|R|||||R|R|";
totalFields = "|3|4|9|10";
}
return (new TranReportDao().GetSettlementInternational_Pagent(GetStatic.GetUser(), pCountry, sAgent, sBranch, fromDate,
toDate, pageNumber, GetStatic.GetReportPagesize(), type, flag));
}
private ReportResult PrepareCustomerHistory()
{
string customerId = GetStatic.ReadQueryString("customerId", "");
return (new TranAgentReportDao().GetCustomerHistory(GetStatic.GetUser(), "customerHistroy", customerId));
}
private ReportResult PrepareRejectedReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string tranType = GetStatic.ReadQueryString("tType", "");
string isOnlineTxn = GetStatic.ReadQueryString("isOnlineTxn", "");
return (new TranAgentReportDao().GetRejectedReport(GetStatic.GetUser(), "rejectedReport", fromDate, toDate, sAgent, sBranch, "", tranType, isOnlineTxn));
}
private ReportResult PrepareCheckReferalReport()
{
string controlNo = GetStatic.ReadQueryString("controlNo", "");
string tranNo = GetStatic.ReadQueryString("tranNo", "");
return (new TranAgentReportDao().GetReferral(GetStatic.GetUser(), controlNo, tranNo));
}
private ReportResult PrepareAgentWiseReferrerReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("todate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
return (new TranAgentReportDao().GetAgentWiseReferrerReport(GetStatic.GetUser(), fromDate, toDate, referralCode));
}
private ReportResult PrepareBeneficaryRegistrationReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
return (new TranAgentReportDao().GetNewRegistrationReport(GetStatic.GetUser(), "beneficiary", fromDate, toDate, sAgent, sBranch, ""));
}
private ReportResult PreparDisabledCustomersReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
return (new TranAgentReportDao().GetDisabledCustomersReport(GetStatic.GetUser(), "disabled", fromDate, toDate));
}
private ReportResult PrepareCustomerRegistrationReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string withAgent = GetStatic.ReadQueryString("withAgent", "");
mergeColumnHead = true;
return (new TranAgentReportDao().GetNewRegistrationReport(GetStatic.GetUser(), "customer", fromDate, toDate, sAgent, sBranch, withAgent));
}
private ReportResult PrepareMobileRegistrationReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string registeredFrom = GetStatic.ReadQueryString("registeredFrom", "");
string user = GetStatic.GetUser();
fieldFormat = "|||||||||||||||";
fieldAlignment = "|||||||||R||R||||";
// totalText = "Total";
// totalFields = "9|";
return (new TranAgentReportDao().PrepareMobileRegistrationReport(user, fromDate, toDate, registeredFrom));
}
private ReportResult PrepareMobileTransactionReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string countryId = GetStatic.ReadQueryString("country", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "9|";
return (new TranReportDao().MobileTransactionReport(user, fromDate, toDate, countryId));
}
private ReportResult MobileRegistrationSummaryReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "9|";
return (new TranReportDao().MobileRegistrationSummaryReport(user, fromDate, toDate));
}
private ReportResult MobileRegSummaryReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string approvedBy = GetStatic.ReadQueryString("approvedBy", "");
string type = GetStatic.ReadQueryString("type", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "9|";
return (new TranReportDao().MobileRegSummaryReport(user, fromDate, toDate, approvedBy, type));
}
private ReportResult MobileTranSummaryReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string approvedBy = GetStatic.ReadQueryString("approvedBy", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "9|";
return (new TranReportDao().MobileTranSummaryReport(user, fromDate, toDate, approvedBy));
}
private ReportResult CustomerPromotionReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "3|";
return (new TranReportDao().CustomerPromotionReport(user, fromDate, toDate));
}
private ReportResult CustomerPromotionSummaryReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string sourceCustomerId = GetStatic.ReadQueryString("sourceCustomerId", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
totalText = "Total";
totalFields = "4|";
return (new TranReportDao().CustomerPromotionSummaryReport(user, fromDate, toDate, sourceCustomerId));
}
private ReportResult CustomerByReferralReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
//totalText = "Total";
//totalFields = "3|";
return (new TranReportDao().CustomerByReferralReport(user, fromDate, toDate));
}
private ReportResult ReuploadKycReport()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string customerId = GetStatic.ReadQueryString("customerId", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "||||R|R||R|||||";
return (new TranReportDao().ReuploadKycReport(user, fromDate, toDate, customerId));
}
private ReportResult UntransactedOnlyReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
//string status = GetStatic.ReadQueryString("status", "");
string user = GetStatic.GetUser();
fieldFormat = "|N||N||||";
fieldAlignment = "|R||R||";
totalText = "Total";
totalFields = "1|";
return (new TranAgentReportDao().UntransactedOnlyReport(user, fromDate, toDate,flag ));
}
private ReportResult SentRefundReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
//string status = GetStatic.ReadQueryString("status", "");
string user = GetStatic.GetUser();
fieldFormat = "|N||N||||";
fieldAlignment = "|R||R||";
totalText = "Total";
totalFields = "3|";
return (new TranAgentReportDao().SentRefundReport(user, fromDate, toDate, flag));
}
private ReportResult RunningBalanceReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
fieldFormat = "||||N|N|N|N|N||";
fieldAlignment = "||||R|R|R|R|R||";
totalText = "Total";
totalFields = "4|5|6|7|8";
return (new TranAgentReportDao().RunningBalanceReport(user, fromDate, toDate, flag));
}
private ReportResult SentReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "|||N||N|N||||||";
fieldAlignment = "|||R||R|R|||||";
totalText = "Total";
totalFields = "3|5|6|";
return (new TranAgentReportDao().SentReport(user, fromDate, toDate));
}
private ReportResult RefundedOnReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
fieldFormat = "|||N|N|||||||";
fieldAlignment = "|||R|R||||||";
totalText = "Total";
totalFields = "3|4|";
return (new TranAgentReportDao().RefundedOnReport(user, fromDate, toDate, flag));
}
private ReportResult RefundedBeforeReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
fieldFormat = "|||N|N|||||||";
fieldAlignment = "|||R|R||||||";
totalText = "Total";
totalFields = "3|4|";
return (new TranAgentReportDao().RefundedBeforeReport(user, fromDate, toDate, flag));
}
private ReportResult CustomerRegistrationStatusReport()
{
string searchCriteria = GetStatic.ReadQueryString("searchCriteria", "");
string searchValue = GetStatic.ReadQueryString("searchValue", "");
string user = GetStatic.GetUser();
fieldFormat = "||||";
fieldAlignment = "||||";
return (new TranReportDao().CustomerRegistrationStatusReport(user, searchCriteria, searchValue));
}
private ReportResult IncompleteKycReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string searchCriteria = GetStatic.ReadQueryString("fromDate", "");
string searchValue = GetStatic.ReadQueryString("searchValue", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||||";
fieldAlignment = "|||||||||||";
return (new TranReportDao().IncompleteKycReport(user, fromDate, toDate, searchValue));
}
private ReportResult PrepareDailyPaidReport()
{
string payoutPartnerName = GetStatic.ReadQueryString("payoutPartner", "");
string payoutPartnerId = GetStatic.ReadQueryString("payoutPartnerId", "");
string sAgentId = GetStatic.ReadQueryString("sAgent", "").Split('|')[0].ToString();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string tranType = GetStatic.ReadQueryString("tType", "");
string user = GetStatic.GetUser();
fieldFormat = "|||||||||N||N||||";
fieldAlignment = "|||||||||R||R||||";
totalText = "Total";
totalFields = "9|";
return (new TranReportDao().DailyPaidReport(user, fromDate, toDate, sAgentId, payoutPartnerName, payoutPartnerId, tranType));
}
private ReportResult PrepareDailySendingReport()
{
string verificationType = GetStatic.ReadQueryString("verificationType", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "|||||||||||||N||N|N|N||||";
fieldAlignment = "|||||||||||||R||R|R|R|||||";
totalText = "Total";
totalFields = "13|15|16|17|20";
subTotalBy = 4;
subTotalFields = "13|15|16|17|20";
subTotalText = "<b>Sub Total</b>";
return (new TranReportDao().DailySendingReport(user, fromDate, toDate, verificationType));
}
private ReportResult PrepareNoWorkPermitReport()
{
string payoutPartnerName = GetStatic.ReadQueryString("payoutPartner", "");
string payoutPartnerId = GetStatic.ReadQueryString("payoutPartnerId", "");
string sAgentId = GetStatic.ReadQueryString("sAgent", "").Split('|')[0].ToString();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
fieldFormat = "||||||||||N||N|N|N||||";
fieldAlignment = "||||||||||R||R|R|R|||||";
totalText = "Total";
totalFields = "10|12|13";
subTotalBy = 4;
subTotalFields = "10|12|13";
subTotalText = "<b>Sub Total</b>";
return (new TranReportDao().NoWorkPermitReport(user, fromDate, toDate, sAgentId, payoutPartnerName, payoutPartnerId));
}
private ReportResult PreparTransactionReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string user = GetStatic.GetUser();
mergeColumnHead = true;
//fieldFormat = "||||||||||N||N|N|N||||";
//fieldAlignment = "||||||||||R||R|R|R|||||";
//totalText = "Total";
//totalFields = "10|12|13";
//subTotalBy = 4;
//subTotalFields = "10|12|13";
//subTotalText = "<b>Sub Total</b>";
return (new TranReportDao().TransactionReport(user, fromDate));
}
//private ReportResult PrepareReport_StatementOfAccount()
//{
// string fromDate = GetStatic.ReadQueryString("fromDate", "");
// string toDate = GetStatic.ReadQueryString("toDate", "");
// string sAgent = GetStatic.ReadQueryString("sAgent", ""); string sBranch =
// GetStatic.ReadQueryString("sBranch", ""); string reportFor =
// GetStatic.ReadQueryString("reportFor", ""); string user = GetStatic.GetUser();
// includeSerialNo = true;
// //flag = "summary";
// totalFields = "8";
// totalText = "Total";
// fieldFormat = "||||||||N";
// fieldAlignment = "||||||||R";
// //return (new TranReportDao().StatementOfAccount(user, fromDate, toDate, sAgent, sBranch, reportFor));
//}
private ReportResult CashStatusReport()
{
includeSerialNo = true;
string asOfDate = GetStatic.ReadQueryString("asOfDate", "");
string branchId = GetStatic.ReadQueryString("branchId", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
fieldFormat = "|N|N|N|N";
fieldAlignment = "|R|R|R|R";
totalText = "Total";
totalFields = "1|2|3|4|5";
return (new TranReportDao().CashStatusReport(user, asOfDate, flag, branchId));
}
private ReportResult CashStatusReportReferral()
{
includeSerialNo = true;
string asOfDate = GetStatic.ReadQueryString("asOfDate", "");
string branchId = GetStatic.ReadQueryString("branchId", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
fieldFormat = "|N|N|N|N";
fieldAlignment = "|R|R|R|R";
totalText = "Total";
totalFields = "1|2|3|4|5";
return (new TranReportDao().CashStatusReportReferral(user, asOfDate, flag, branchId));
}
private ReportResult CustomerModifyLog()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string searchFor = GetStatic.ReadQueryString("searchFor", "");
string customerId = GetStatic.ReadQueryString("customerId", "") == "" ? searchFor : GetStatic.ReadQueryString("customerId", "");
string user = GetStatic.GetUser();
return (new TranReportDao().CustomerModifyReport(user, customerId, flag, fromDate, todate));
}
private ReportResult AgentWiseReferrerReport()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
fieldFormat = "||N|N|N|N|N|N|N|N|N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
string user = GetStatic.GetUser();
return (new TranReportDao().AgentWiseReferrerReport(user, referralCode, flag, fromDate, todate));
}
private ReportResult StaffVisitEarningsReport()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
fieldFormat = "||N|N|N|N|N|N|N|N|N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
string user = GetStatic.GetUser();
return (new TranReportDao().AgentWiseReferrerReport(user, referralCode, flag, fromDate, toDate));
}
private ReportResult PrepareAgentEarningReport()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
fieldFormat = "||N|N|N|N|N|N|N|N|N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
string user = GetStatic.GetUser();
return (new TranReportDao().AgentEarningReport(user, referralCode, flag, fromDate, todate));
}
private ReportResult ComplicanceOfacRejectReport()
{
complianceDao cd = new complianceDao();
includeSerialNo = true;
fieldFormat = "|||||||||N|N|||||||||";
fieldAlignment = "|||||||||R|R|||||||||";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return cd.GetComplianceOfacRejectedReport(fromDate, todate, user);
}
private ReportResult PrepareReport_UntransactedReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string dataFor = GetStatic.ReadQueryString("dataFor", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
//flag = "summary";
totalFields = "8";
totalText = "Total";
fieldFormat = "||||||||N";
fieldAlignment = "||||||||R";
return (new TranReportDao().UntransactedReport(user, fromDate, toDate, dataFor));
}
private ReportResult PrepareReport_mitasuReport()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string fsaFormat = GetStatic.ReadQueryString("fsaFormat", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
if (fsaFormat.ToLower().Equals("true"))
{
fieldFormat = "||N|N|N|N|N";
fieldAlignment = "||R|R|R|R|R";
}
else
{
fieldFormat = "||N|N|N|N|N|N|N|N|N|N|N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R|R|R";
}
return (new TranReportDao().MitasuReport(user, fromDate, toDate, fsaFormat));
}
private ReportResult PrepareReport_autoDebitReport()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string statusType = GetStatic.ReadQueryString("StatusType", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
//flag = "summary";
totalFields = "8";
totalText = "Total";
fieldFormat = "||||||||N";
fieldAlignment = "||||||||R";
return (new TranReportDao().AutoDebitReport(user, startDate, endDate, statusType));
}
private ReportResult PrepareReport_customerreportuserwise()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string country = GetStatic.ReadQueryString("country", "");
string approvedBy = GetStatic.ReadQueryString("approvedBy", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
if (string.IsNullOrEmpty(flag))
{
flag = "summary";
totalFields = "2";
totalText = "Total";
}
return (new TranReportDao().CustomerReportUserWise(user, startDate, endDate, country, approvedBy, flag));
}
private ReportResult IncomeExpReport()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string branch = GetStatic.ReadQueryString("branch", "");
includeSerialNo = true;
fieldFormat = "|N|N|N||N|N|N";
fieldAlignment = "|R|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6|7";
return (new TranReportDao().IncomeExpencesReport(GetStatic.GetUser(), startDate, endDate, branch));
}
private ReportResult PrepareReport_customerDetailReport()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string country = GetStatic.ReadQueryString("country", "");
string branch = GetStatic.ReadQueryString("branch", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
if (flag == "detail-tran-customer")
{
fieldFormat = "||||N|N||";
fieldAlignment = "||||R|R||";
totalFields = "|4|5|";
}
else
{
fieldFormat = "|||||||N|";
fieldAlignment = "|||||||R|";
totalFields = "7|";
}
includeSerialNo = true;
return (new TranReportDao().CustomerDetailReport(user, startDate, endDate, country, branch, flag));
}
private ReportResult PrepareReport_referralSchemaReport() // add by ganesh gyawali for referralSchemaReport
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
if (flag == "Report" || flag == "Report_Old")
{
fieldFormat = "||||||N|N|N|";
fieldAlignment = "||||||R|R|R|";
totalFields = "6|7|8";
totalText = "<b>Total</b>";
}
return (new TranReportDao().ReferralSchemaReport(user, startDate, endDate, referralCode, flag));
}
private ReportResult PrepareReport_referrerReport()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string referralCode = GetStatic.ReadQueryString("referralCode", "");
string Country = GetStatic.ReadQueryString("country", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
if (flag == "detail-txn-report" || flag == "detail-customer-report" || flag == "detail-customer-drilldown-report")
{
totalFields = "0";
}
else if (flag == "detail-txn-drilldown-report")
{
totalFields = "5";
totalText = "Total";
}
else if (flag == "register-rpt" || flag == "transaction-rpt")
{
totalFields = "3";
totalText = "Total";
}
else if (flag == "summary-rpt")
{
fieldFormat = "|||N";
totalFields = "2|3";
totalText = "Total";
}
else if (flag == "detail-drilldown-report")
{
fieldFormat = "|||||||||||N";
totalFields = "11";
totalText = "Total";
}
else
{
totalFields = "2";
totalText = "Total";
}
includeSerialNo = true;
return (new TranReportDao().ReferrerReport(user, startDate, endDate, referralCode, flag, Country));
}
//private ReportResult PrepareReport_customerreportdrilldownReport()
//{
// string startDate = GetStatic.ReadQueryString("startDate", "");
// string endDate = GetStatic.ReadQueryString("endDate", "");
// string referralCode = GetStatic.ReadQueryString("referralCode", "");
// string flag = GetStatic.ReadQueryString("flag", ""); string user = GetStatic.GetUser();
// totalFields = "2"; includeSerialNo = true;
// return (new TranReportDao().ReferrerReport(user, startDate, endDate, referralCode, flag));
//}
//private ReportResult PrepareReport_txnreportdrilldownReport()
//{
// string startDate = GetStatic.ReadQueryString("startDate", "");
// string endDate = GetStatic.ReadQueryString("endDate", "");
// string referralCode = GetStatic.ReadQueryString("referralCode", "");
// string flag = GetStatic.ReadQueryString("flag", ""); string user = GetStatic.GetUser();
// totalFields = "2"; includeSerialNo = true;
// return (new TranReportDao().ReferrerReport(user, startDate, endDate, referralCode, flag));
//}
private ReportResult PrepareReport_customerReport()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string country = GetStatic.ReadQueryString("country", "");
string branch = GetStatic.ReadQueryString("branch", "");
string flag = GetStatic.ReadQueryString("flag", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
if (flag == "matrix-detail")
{
}
else
{
totalFields = "2";
}
return (new TranReportDao().CustomerReport(user, startDate, endDate, country, branch, flag));
}
private ReportResult PrepareReport_CustomerInquiry()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
return (new TranReportDao().CustomerInquiryReport(user, startDate, endDate));
}
private ReportResult PrepareReport_FundDeposit()
{
string startDate = GetStatic.ReadQueryString("startDate", "");
string endDate = GetStatic.ReadQueryString("endDate", "");
string ReportType = GetStatic.ReadQueryString("ReportType", "");
string SearchType = GetStatic.ReadQueryString("SearchType", "");
string searchValue = GetStatic.ReadQueryString("searchValue", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
totalText = "Total";
if (ReportType.ToLower() == "statement")
{
fieldFormat = "|||N|N";
fieldAlignment = "|||R|R";
totalFields = "3|4|5";
}
else if (ReportType.ToLower() == "d")
{
fieldFormat = "|||N";
fieldAlignment = "|||R";
totalFields = "3";
//fieldFormat = "|||||N";
//fieldAlignment = "|||||R";
//totalFields = "5";
}
else
{
fieldFormat = "|N|";
fieldAlignment = "|R|";
totalFields = "1|2";
}
return (new TranReportDao().KJDepositReport(user, startDate, endDate, ReportType, SearchType, searchValue));
}
//private ReportResult PrepareReport_20177000()
//{
// string iDate = GetStatic.ReadQueryString("date", "");
// string user = GetStatic.GetUser();
// includeSerialNo = true;
// totalText = "Total";
// fieldFormat = "|||||N";
// fieldAlignment = "|||||R";
// totalFields = "5";
// return new GlobalBankDao().GetReconcileReport(user, iDate);
//}
private ReportResult PrepareReport_40122100_ReportRecon()
{
mergeColumnHead = true;
string flags = GetStatic.ReadQueryString("flag", "s");
string agentId = GetStatic.GetAgentId();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("todate", "");
string isDocUpload = GetStatic.ReadQueryString("isDocUpload", "");
string rptType = GetStatic.ReadQueryString("rptType", "");
string icn = GetStatic.ReadQueryString("icn", "");
string user = GetStatic.GetUser();
if (rptType == "u")
flags = "uploaded";
else if (rptType == "r")
flags = "txn-wise";
else
flags = GetStatic.ReadQueryString("flag", "s");
if (flags == "txn-wise" || flags == "s")
{
fieldAlignment = "||C|C|C|C|C|C|C|C|C|C|C|C|C|C";
totalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14";
totalText = "Total";
totalTextCol = 1;
}
else
{
fieldFormat = "|||||||||||";
fieldAlignment = "|C|C|C|C|C|C|C|C|C|C";
}
return (new TranReportDao().ReconcilationReportForAgent(user, flags, agentId, fromDate, todate, isDocUpload, icn));
}
private ReportResult PrepareReport_20181930()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agent = GetStatic.ReadQueryString("agent", "");
string bank = GetStatic.ReadQueryString("bank", "");
string user = GetStatic.GetUser();
return (new TranReportDao().DepositVoucherReport(user, fromDate, toDate, agent, bank));
}
private ReportResult PrepareReport_20821700_dcUpload()
{
mergeColumnHead = true;
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var cardType = GetStatic.ReadQueryString("cardType", "");
var agentId = GetStatic.ReadQueryString("agent", "");
var zone = GetStatic.ReadQueryString("zone", "");
var flag = GetStatic.ReadQueryString("flag", "active1");
var user = GetStatic.GetUser();
if (flag == "active1")
{
fieldAlignment = "C||||C";
totalFields = "4";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetAgentwiseCustomerDcUpload(user, fromDate, toDate, cardType, flag, agentId, zone));
}
private ReportResult PrepareReport_20831500()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
mergeColumnHead = true;
if (flag == "d")
{
fieldFormat = "|N|N|N|N||N|N||N|N|N|N";
fieldAlignment = "|R|R|R|R|R|R|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6|7|8|9|10|11|12";
totalText = "<b>Total</b>";
}
else if (flag == "s")
{
fieldFormat = "||N|N|N|N|N";
fieldAlignment = "|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6";
totalText = "<b>Total</b>";
}
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return (new TranReportDao().DomesticTxtreport(user, flag, fromDate, todate));
}
private ReportResult PrepareReport_CustomerCardExpiryRpt()
{
var asOnDate = GetStatic.ReadQueryString("asOnDate", "");
var zone = GetStatic.ReadQueryString("zone", "");
var district = GetStatic.ReadQueryString("district", "");
var agentGrp = GetStatic.ReadQueryString("agentGrp", "");
var agent = GetStatic.ReadQueryString("agent", "");
var reportType = GetStatic.ReadQueryString("flag", "summary");
var idType = GetStatic.ReadQueryString("idType", "");
var user = GetStatic.GetUser();
return (new TranReportDao().GetCustomerCardExpiryRpt(user, asOnDate, zone, district, agentGrp, agent, reportType, idType));
}
private ReportResult PrepareReport_20821700_activation()
{
mergeColumnHead = true;
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var cardType = GetStatic.ReadQueryString("cardType", "");
var agentId = GetStatic.ReadQueryString("agent", "");
var zone = GetStatic.ReadQueryString("zone", "");
var flag = GetStatic.ReadQueryString("flag", "active");
var user = GetStatic.GetUser();
if (flag == "active")
{
fieldAlignment = "C||||C";
totalFields = "4";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetAgentwiseCustomerActivation(user, fromDate, toDate, cardType, flag, agentId, zone));
}
private ReportResult PrepareReport_20822000_sc()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var status = GetStatic.ReadQueryString("status", "");
var zone = GetStatic.ReadQueryString("sZone", "");
var district = GetStatic.ReadQueryString("district", "");
var agentGrp = GetStatic.ReadQueryString("agentGrp", "");
var agent = GetStatic.ReadQueryString("sAgent", "");
var membershipId = GetStatic.ReadQueryString("membershipId", "");
var isDocUploaded = GetStatic.ReadQueryString("isDocUploaded", "");
var user = GetStatic.GetUser();
var ageGrp = GetStatic.ReadQueryString("ageGrp", "");
var flag = GetStatic.ReadQueryString("flag", "");
var rptType = GetStatic.ReadQueryString("rptType", "");
includeSerialNo = true;
if (rptType == "detail")
{
flag = "detail";
}
includeSerialNo = true;
if (flag == "")
{
flag = "s_summary";
}
if (rptType == "summary")
{
totalText = "<b>Total</b><td></td>";
fieldFormat = "|||";
fieldAlignment = "|C|C|C|C";
totalFields = "1|2|3";
}
else if (flag == "dis")
{
totalText = "<b>Total</b><td></td>";
fieldFormat = "|||";
fieldAlignment = "|C|C|C|C";
totalFields = "1|2|3";
}
else if (flag == "agent")
{
totalText = "<b>Total</b><td></td>";
fieldFormat = "|||";
fieldAlignment = "|C|C|C|C";
totalFields = "1|2|3";
}
return (new TranReportDao().GetApproveCustomerSearch(flag, user, fromDate, toDate, status, zone, district, agentGrp, agent, isDocUploaded, membershipId));
}
private ReportResult PrepareReport_BankGauranteeReport()
{
var date = GetStatic.ReadQueryString("date", "");
var agentGroup = GetStatic.ReadQueryString("agentGroup", "");
var ignoreBlockedAgent = GetStatic.ReadQueryString("ignoreBlockedAgent", "");
var user = GetStatic.GetUser();
return (new TranReportDao().GetBankGauranteeReport(user, date, agentGroup, ignoreBlockedAgent));
}
private ReportResult PrepareReport_20821100()
{
mergeColumnHead = true;
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string rptType = GetStatic.ReadQueryString("rptType", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string memId = GetStatic.ReadQueryString("memId", "");
if (rptType == "detail")
{
}
else
{
fieldFormat = "||";
fieldAlignment = "||C";
totalText = "<b>Total</b>";
totalFields = "2";
}
return (new TranReportDao().GetCustomerReconcileRpt(GetStatic.GetUser(), rptType, fromDate, toDate, agentId
, memId, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareReport_trashtranintlrpt()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var txnAmt = GetStatic.ReadQueryString("txnAmt", "");
var rptType = GetStatic.ReadQueryString("rptType", "");
var rptNature = GetStatic.ReadQueryString("rptNature", "");
var user = GetStatic.GetUser();
mergeColumnHead = true;
if (rptType == "s")
{
fieldAlignment = "|||||||||R|";
fieldFormat = "|||||||||N|";
totalFields = "9";
totalText = "<B>Grand Total</B>";
totalTextCol = 2;
subTotalBy = 3;
subTotalFields = "9";
subTotalText = "<B>Sub Total</B>";
subTotalTextCol = 2;
}
else if (rptType == "r")
{
fieldAlignment = "|||||||||R|";
fieldFormat = "|||||||||N|";
totalFields = "9";
totalText = "<B>Grand Total</B>";
totalTextCol = 2;
subTotalBy = 3;
subTotalFields = "9";
subTotalText = "<B>Sub Total</B>";
subTotalTextCol = 2;
}
return (new TranReportDao().GetThrasholdTransIntlReport(user, fromDate, toDate, txnAmt, rptType, rptNature));
}
private ReportResult PrepareReport_20821400_zoneWise()
{
string yr = GetStatic.ReadQueryString("yr", "");
string Zone = GetStatic.ReadQueryString("Zone", "");
string pageNumber = GetPageNumber().ToString();
fieldAlignment = "|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R";
fieldFormat = "||||||||||||||||||";
mergeColumnHead = true;
includeSerialNo = true;
totalText = "Total<td></td>";
totalFields = "1|2|5|6|9|10|13|14";
string user = GetStatic.GetUser();
return (new TranReportDao().GetZoneTargetRpt(user, Zone, yr, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareReport_getcardstockreport()
{
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var cardBy = GetStatic.ReadQueryString("cardBy", "");
var zone = GetStatic.ReadQueryString("sZone", "");
var agent = GetStatic.ReadQueryString("sAgent", "");
var membershipId = GetStatic.ReadQueryString(GetStatic.ReadQueryString("searchText", "") != "" ? "searchText" : "membershipId", "");
var user = GetStatic.GetUser();
if (searchBy == "sz")
{
totalText = "<b>Total</b>";
fieldFormat = "|||||";
fieldAlignment = "|||||";
totalFields = "2|3|4|5";
}
if (searchBy == "sa")
{
totalText = "<b>Total</b>";
fieldFormat = "||||||";
fieldAlignment = "||||||";
totalFields = "3|4|5|6";
}
return (new TranReportDao().StockCardDetails(user, searchBy, cardBy, zone, agent, membershipId));
}
private ReportResult PrepareReport_20181800_1()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var agentId = GetStatic.ReadQueryString("agent", "");
var userName = GetStatic.ReadQueryString("userName", "");
totalText = "<b>Total</b>";
fieldFormat = "||N|N|";
fieldAlignment = "||R|R|";
totalFields = "2|3";
mergeColumnHead = true;
return (new TranReportDao().GetCreditLimitRpt(GetStatic.GetUser(), fromDate, toDate, agentId, userName));
}
private ReportResult PrepareReport_20167400_debit()
{
fieldFormat = "|||N|N";
fieldAlignment = "|||R|R";
mergeColumnHead = true;
totalFields = "3|4|5";
totalText = "Total<td></td>";
includeSerialNo = true;
subTotalBy = 1;
subTotalFields = "3|4|5";
subTotalText = "Sub Total<td></td>";
subTotalTextCol = 1;
string agentId = GetStatic.ReadQueryString("agentId", "");
string agentName = GetStatic.ReadQueryString("agentName", "");
string agentGroup = GetStatic.ReadQueryString("agentGroup", "");
string date = GetStatic.ReadQueryString("date", "");
string closingBalType = GetStatic.ReadQueryString("closingBalType", "");
string user = GetStatic.GetUser();
return (new TranReportDao().AgentDebitBalance(user, agentId, agentName, agentGroup, date, closingBalType));
}
private ReportResult PrepareReport_20168000()
{
string bankId = GetStatic.ReadQueryString("bankId", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetBankBranchList(user, bankId));
}
private ReportResult PrepareReport_20168300()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetHoUserTxn(user, fromDate, toDate));
}
private ReportResult PrepareReport_20168200()
{
string user = GetStatic.GetUser();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string flag = GetStatic.ReadQueryString("flag", "");
mergeColumnHead = true;
if (flag == "c")
{
fieldFormat = "||||N|N|||N|N|N|N|N||N";
fieldAlignment = "|||C|R|R|C|C|R|R|R|R|R|C|R";
totalText = "<b>Total</b>";
totalFields = "3|4|5|6|7|8|9|10|11|12|13|14";
totalTextCol = 1;
subTotalBy = 2;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "3|4|5|6|7|8|9|10|11|12|13|14";
subTotalTextCol = 1;
}
if (flag == "s")
{
fieldFormat = "|||";
fieldAlignment = "|||C";
totalText = "<b>Total</b>";
totalFields = "3";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "3";
subTotalTextCol = 1;
}
return (new TranReportDao().SlabWiseConsolidatedReport(user, flag, fromDate, toDate));
}
private ReportResult PrepareAcIsoLog()
{
mergeColumnHead = true;
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string rptType = GetStatic.ReadQueryString("rptType", "");
string sendingAgent = GetStatic.ReadQueryString("sendingAgent", "");
string beneficiaryCountry = GetStatic.ReadQueryString("beneficiaryCountry", "");
string tranType = GetStatic.ReadQueryString("tranType", "");
string bankId = GetStatic.ReadQueryString("bankId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string dateType = GetStatic.ReadQueryString("dateType", "");
string fromTime = GetStatic.ReadQueryString("fromTime", "");
string toTime = GetStatic.ReadQueryString("toTime", "");
string logStatus = GetStatic.ReadQueryString("logStatus", "");
string paidUser = GetStatic.ReadQueryString("paidUser", "");
string user = GetStatic.GetUser();
if (rptType == "detail")
{
fieldFormat = "|||||||N|";
fieldAlignment = "|||||||R|";
totalText = "<b>Total</b>";
totalFields = "7";
}
else
{
fieldFormat = "|||N";
fieldAlignment = "||C|R";
totalText = "<b>Total</b>";
totalFields = "2|3";
}
return (new TranReportDao().GetAcDepositPaidIsoRpt(user, rptType, sendingAgent, beneficiaryCountry, bankId
, tranType, fromDate, toDate, dateType, fromTime,
toTime, logStatus, paidUser, pageNumber, GetStatic.GetReportPagesize()));
}
//GIBL Remit Card Reconcile report
private ReportResult PrepareReport_20832300()
{
string rptType = GetStatic.ReadQueryString("rptType", "");
string user = GetStatic.GetUser();
string remitCardNo = GetStatic.ReadQueryString("remitCardNo", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string sZone = GetStatic.ReadQueryString("sZone", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
if (rptType == "detail")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|";
totalFields = "3|4";
}
else if (rptType == "remit")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|";
fieldAlignment = "C||C|R|C";
totalFields = "2|3|4";
}
else if (rptType == "zone")
{
totalFields = "2";
totalText = "Total";
totalTextCol = 1;
}
else if (rptType == "district")
{
totalFields = "2";
totalText = "Total";
totalTextCol = 1;
}
else if (rptType == "agent")
{
totalFields = "3";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetKycTxnReport(user, fromDate, toDate, sZone, sAgent, rptType, remitCardNo));
}
//KYC Enrollment Report
private ReportResult PrepareReport_20832300_enroll()
{
string rptType = GetStatic.ReadQueryString("rptType", "");
string user = GetStatic.GetUser();
string remitCardNo = GetStatic.ReadQueryString("remitCardNo", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string sZone = GetStatic.ReadQueryString("sZone", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sDistrict = GetStatic.ReadQueryString("sDistrict", "");
if (rptType == "detail")
{
}
else if (rptType == "zone" || rptType == "district")
{
fieldAlignment = "C||C|C|C";
totalFields = "2|3|4";
totalText = "Total";
totalTextCol = 1;
}
else if (rptType == "agent")
{
fieldAlignment = "C|||C|C|C";
totalFields = "3|4|5";
totalText = "Total";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "3|4|5";
subTotalTextCol = 1;
}
return (new TranReportDao().GetKycEnrollmentReport(user, fromDate, toDate, sZone, sDistrict, sAgent, rptType, remitCardNo));
}
private ReportResult PrepareReport_20831400()
{
fieldFormat = "||||N|";
fieldAlignment = "||||R|";
totalText = "<b>Total</b>";
totalFields = "4";
totalTextCol = 2;
string user = GetStatic.GetUser();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string searchBy = GetStatic.ReadQueryString("searchBy", "");
string searchValue = GetStatic.ReadQueryString("searchValue", "");
return (new TranReportDao().GetGiblSearchTransaction(user, fromDate, toDate, searchBy, searchValue));
}
private ReportResult PrepareReport_20181800()
{
string user = GetStatic.GetUser();
string zone = GetStatic.ReadQueryString("zone", "");
string district = GetStatic.ReadQueryString("district", "");
string location = GetStatic.ReadQueryString("location", "");
string agent = GetStatic.ReadQueryString("agent", "");
string securitytype = GetStatic.ReadQueryString("securitytype", "");
string groupby = GetStatic.ReadQueryString("groupby", "");
string isexpiry = GetStatic.ReadQueryString("isexpiry", "");
string date = GetStatic.ReadQueryString("date", "");
if (securitytype == "" && groupby == "aw")
{
fieldFormat = "|||||N|N|N|N";
fieldAlignment = "|||||R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "5|6|7|8";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "5|6|7|8";
subTotalTextCol = 1;
}
if ((securitytype == "cs" || securitytype == "bg" || securitytype == "fd" | securitytype == "mo") && groupby == "aw")
{
fieldFormat = "||||||N||";
fieldAlignment = "||||||R||";
totalText = "<b>Total</b>";
totalFields = "6";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "6";
subTotalTextCol = 1;
}
if (securitytype == "na" && groupby == "aw")
{
fieldFormat = "|||||";
fieldAlignment = "|||||";
}
if (groupby == "summary")
{
fieldFormat = "||";
fieldAlignment = "||C";
totalText = "<b>Total</b>";
totalFields = "2";
totalTextCol = 1;
}
return (new TranReportDao().GetCreditSecurityRpt(user, zone, district, location, agent, securitytype, groupby, isexpiry, date));
}
private ReportResult PrepareReport_20102900()
{
var user = GetStatic.GetUser();
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var rptType = GetStatic.ReadQueryString("rptType", "");
var agentId = GetStatic.ReadQueryString("agentId", "");
includeSerialNo = true;
return (new TranReportDao().GetAgentProfileUpdateRpt(user, fromDate, toDate, rptType, agentId));
}
private ReportResult PrepareReport_trashtranrpt()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var txnAmt = GetStatic.ReadQueryString("txnAmt", "");
var rptType = GetStatic.ReadQueryString("rptType", "");
var rptNature = GetStatic.ReadQueryString("rptNature", "");
var user = GetStatic.GetUser();
//includeSerialNo = true;
mergeColumnHead = true;
if (rptType == "s")
{
fieldAlignment = "||||||||||||R|";
fieldFormat = "||||||||||||N|";
totalFields = "12";
totalText = "<B>Grand Total</B>";
totalTextCol = 2;
subTotalBy = 2;
subTotalFields = "12";
subTotalText = "<B>Sub Total</B>";
subTotalTextCol = 2;
}
else if (rptType == "r")
{
fieldAlignment = "||||||||||||R|";
fieldFormat = "||||||||||||N|";
totalFields = "12";
totalText = "<B>Grand Total</B>";
totalTextCol = 5;
subTotalBy = 5;
subTotalFields = "12";
subTotalText = "<B>Sub Total</B>";
subTotalTextCol = 5;
}
else
{
fieldAlignment = "|||||R";
fieldFormat = "|||||N";
totalFields = "4";
totalText = "<B>TOTAL</B><td></td>";
rptType = "o";
}
return (new TranReportDao().GetThrasholdTransReport(user, fromDate, toDate, txnAmt, rptType, rptNature));
}
private ReportResult PrepareReport_txnrpt()
{
includeSerialNo = true;
fieldAlignment = "|C|R";
fieldFormat = "||N";
totalFields = "1|2";
totalText = "<B>TOTAL</B><td></td>";
var rptType = GetStatic.ReadQueryString("rptType", "");
var user = GetStatic.GetUser();
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var dateType = GetStatic.ReadQueryString("dateType", "");
return (new TranReportDao().GetTxnReport(user, fromDate, toDate, rptType, dateType));
}
private ReportResult PrepareReport_txnrpt_Detail()
{
var user = GetStatic.GetUser();
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var rptType = GetStatic.ReadQueryString("reportType", "");
var agent = GetStatic.ReadQueryString("agent", "");
var dateType = GetStatic.ReadQueryString("dateType", "");
includeSerialNo = true;
fieldAlignment = "|||R||R||";
fieldFormat = "|||N||N||";
totalFields = "3|5";
totalText = "<B>TOTAL</B><td></td>";
return (new TranReportDao().GetTxnDetailReport(user, fromDate, toDate, rptType, agent, dateType));
}
private ReportResult PrepareDummyReport()
{
mergeColumnHead = true;
subTotalBy = 0;
subTotalText = "<b><i> SubTotal </i></b>";
subTotalFields = "1";
totalText = "<b>Total</b>";
totalFields = "1";
fieldFormat = "|N";
fieldAlignment = "L|R";
string agentId = GetStatic.ReadQueryString("agentId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetDummyResult(user, agentId, fromDate, toDate));
}
private ReportResult PrepareCreditDetailReport()
{
string agentId = GetStatic.ReadQueryString("agent", "");
string reportType = GetStatic.ReadQueryString("reportType", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetCreditDetailReport(reportType, user, agentId, "", ""));
}
private ReportResult PrepareTranReport()
{
string reportType = GetStatic.ReadQueryString("reportType", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
if (reportType == "S")
{
fieldFormat = "||N|N";
fieldAlignment = "L|L|R|R";
totalText = "<b>Total</b>";
totalFields = "2|3";
}
if (reportType == "P")
{
fieldFormat = "||N";
fieldAlignment = "L|L|R";
totalText = "<b>Totals</b>";
totalFields = "2";
}
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetReport(user, fromDate, toDate, reportType, pageNumber,
GetStatic.GetReportPagesize(), GetStatic.GetSessionId()));
}
private ReportResult PrepareCommReport()
{
fieldFormat = "||||N|N";
fieldAlignment = "L|L|L|R|R|R";
totalText = "<b>Total</b>";
totalFields = "4|5";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("AgentId", "");
string reportType = GetStatic.ReadQueryString("reportType", "srpt");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetCommReport(reportType, user, fromDate, toDate, agentId, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult PrepareCommSendReport()
{
fieldFormat = "|||N|N";
fieldAlignment = "L|L|L|R|R";
totalText = "<b>Total</b>";
totalFields = "3|4";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string date = GetStatic.ReadQueryString("date", "");
string user = GetStatic.GetUser();
string agentId = GetStatic.ReadQueryString("AgentId", "");
return
(new TranReportDao().GetCommSendReport(user, date, agentId, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareCommPayReport()
{
fieldFormat = "|||N|N";
fieldAlignment = "L|L|L|R|R";
totalText = "<b>Total</b>";
totalFields = "3|4";
string date = GetStatic.ReadQueryString("date", "");
string user = GetStatic.GetUser();
string agentId = GetStatic.ReadQueryString("AgentId", "");
return (new TranReportDao().GetCommPayReport(user, date, agentId));
}
private ReportResult PrepareTranMasterReport()
{
mergeColumnHead = true;
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string sHub = GetStatic.ReadQueryString("sHub", "");
string ssAgent = GetStatic.ReadQueryString("ssAgent", "");
string sCountry = GetStatic.ReadQueryString("sCountry", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string sUser = GetStatic.ReadQueryString("sUser", "");
string sZone = GetStatic.ReadQueryString("sZone", "");
string sDistrict = GetStatic.ReadQueryString("sDistrict", "");
string sLocation = GetStatic.ReadQueryString("sLocation", "");
string sFirstName = GetStatic.ReadQueryString("sFirstName", "");
string sMiddleName = GetStatic.ReadQueryString("sMiddleName", "");
string sLastName1 = GetStatic.ReadQueryString("sLastName1", "");
string sLastName2 = GetStatic.ReadQueryString("sLastName2", "");
string sMobile = GetStatic.ReadQueryString("sMobile", "");
string sEmail = GetStatic.ReadQueryString("sEmail", "");
string sIDNumber = GetStatic.ReadQueryString("sIDNumber", "");
string rHub = GetStatic.ReadQueryString("rHub", "");
string rsAgent = GetStatic.ReadQueryString("rsAgent", "");
string rCountry = GetStatic.ReadQueryString("rCountry", "");
string rAgent = GetStatic.ReadQueryString("rAgent", "");
string rBranch = GetStatic.ReadQueryString("rBranch", "");
string rUser = GetStatic.ReadQueryString("rUser", "");
string rZone = GetStatic.ReadQueryString("rZone", "");
string rDistrict = GetStatic.ReadQueryString("rDistrict", "");
string rLocation = GetStatic.ReadQueryString("rLocation", "");
string rFirstName = GetStatic.ReadQueryString("rFirstName", "");
string rMiddleName = GetStatic.ReadQueryString("rMiddleName", "");
string rLastName1 = GetStatic.ReadQueryString("rLastName1", "");
string rLastName2 = GetStatic.ReadQueryString("rLastName2", "");
string rMobile = GetStatic.ReadQueryString("rMobile", "");
string rEmail = GetStatic.ReadQueryString("rEmail", "");
string rIDNumber = GetStatic.ReadQueryString("rIDNumber", "");
string controlNumber = GetStatic.ReadQueryString("controlNumber", "");
string pType = GetStatic.ReadQueryString("paymentType", "");
string orderBy = GetStatic.ReadQueryString("orderBy", "");
string sendDateFrom = GetStatic.ReadQueryString("sendDateFrom", "");
string sendDateTo = GetStatic.ReadQueryString("sendDateTo", "");
string paidDateFrom = GetStatic.ReadQueryString("paidDateFrom", "");
string paidDateTo = GetStatic.ReadQueryString("paidDateTo", "");
string cancelledDateFrom = GetStatic.ReadQueryString("cancelledDateFrom", "");
string cancelledDateTo = GetStatic.ReadQueryString("cancelledDateTo", "");
string approvedDateFrom = GetStatic.ReadQueryString("approvedDateFrom", "");
string approvedDateTo = GetStatic.ReadQueryString("approvedDateTo", "");
string collectionAmountFrom = GetStatic.ReadQueryString("collectionAmountFrom", "");
string collectionAmountTo = GetStatic.ReadQueryString("collectionAmountTo", "");
string payoutAmountFrom = GetStatic.ReadQueryString("payoutAmountFrom", "");
string payoutAmountTo = GetStatic.ReadQueryString("payoutAmountTo", "");
string tranStatus = GetStatic.ReadQueryString("tranStatus", "");
string tranSend = GetStatic.ReadQueryString("tranSend", "");
string sender = GetStatic.ReadQueryString("sender", "");
string tranPay = GetStatic.ReadQueryString("tranPay", "");
string receiver = GetStatic.ReadQueryString("receiver", "");
string tranType = GetStatic.ReadQueryString("tType", "");
return (new TranReportDao()).GetMasterReport(GetStatic.GetUser(), sHub, ssAgent, sCountry, sAgent, sBranch,
sUser, sZone, sDistrict,
sLocation, sFirstName, sMiddleName, sLastName1, sLastName2,
sMobile,
sEmail, sIDNumber, rHub, rsAgent, rCountry, rAgent, rBranch,
rUser,
rZone, rDistrict, rLocation, rFirstName, rMiddleName,
rLastName1,
rLastName2, rMobile, rEmail, rIDNumber, controlNumber, pType,
orderBy, sendDateFrom, sendDateTo, paidDateFrom,
paidDateTo,
cancelledDateFrom, cancelledDateTo, approvedDateFrom,
approvedDateTo,
collectionAmountFrom, collectionAmountTo, payoutAmountFrom,
payoutAmountTo, tranStatus, tranSend, sender, tranPay, receiver, tranType,
(pageNumber == "" ? "1" : pageNumber),
GetStatic.GetReportPagesize());
}
private ReportResult PrepareEnrollCommRpt()
{
fieldFormat = "|||N|N";
fieldAlignment = "L|L|R|R|R";
totalText = "<b>Total</b>";
totalFields = "1|3";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("AgentId", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetEnrollRpt(user, fromDate, toDate, agentId, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult ShowUserMatrixReportRole()
{
var roleId = GetStatic.ReadNumericDataFromQueryString("role");
var report = new UserMatrixDao();
return report.GetReportRole(GetStatic.GetUser(), roleId.ToString());
}
private ReportResult ShowUserMatrixReportRole2()
{
var roleId = GetStatic.ReadNumericDataFromQueryString("role");
var report = new UserMatrixDao();
return report.GetReportRole2(GetStatic.GetUser(), roleId.ToString());
}
private ReportResult ShowUserMatrixReportFunction()
{
var fn = GetStatic.ReadQueryString("fn", "");
var report = new UserMatrixDao();
return report.GetReportFunction(GetStatic.GetUser(), fn);
}
private ReportResult PrepareEnrollCommDetailRpt()
{
fieldFormat = "|||N|N";
fieldAlignment = "L|L|R|R|R";
totalText = "<b>Total</b>";
totalFields = "2|4";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("AgentId", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetEnrollDetailRpt(user, fromDate, toDate, agentId, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult PrepareAppLogByTranId()
{
fieldFormat = "|||||";
fieldAlignment = "C|L|L|L|L|C";
string tranId = GetStatic.ReadQueryString("tranId", "");
string controlNo = GetStatic.ReadQueryString("controlNo", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetAppViewLogByTranId(user, tranId, controlNo));
}
private ReportResult PrepareAppLogByDate()
{
fieldFormat = "|||||";
fieldAlignment = "C|L|L|L|L|C";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string searchBy = GetStatic.ReadQueryString("searchBy", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetAppViewLogByDate(user, fromDate, toDate, searchBy));
}
private ReportResult PrepareTroubleTicketRpt()
{
fieldFormat = "|||||";
fieldAlignment = "C|L|L|L|L|C";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string ticketBy = GetStatic.ReadQueryString("ticketBy", "");
string msgType = GetStatic.ReadQueryString("msgType", "");
string txnType = GetStatic.ReadQueryString("txnType", "");
string paymentMethod = GetStatic.ReadQueryString("paymentMethod", "");
string status = GetStatic.ReadQueryString("status", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetTroubleTicketRpt(user, fromDate, toDate, ticketBy, msgType, txnType,
paymentMethod, status));
}
private ReportResult PreparePartnerTroubleTicket()
{
fieldFormat = "|||||";
fieldAlignment = "C|L|L|L|L|C";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string partnerId = GetStatic.ReadQueryString("partnerId", "");
string controlNo = GetStatic.ReadQueryString("controlNo", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetPartnerTroubleTicketRpt(user, fromDate, toDate, partnerId, controlNo ));
}
private ReportResult PrepareUserLoginAgingRpt()
{
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string agentType = GetStatic.ReadQueryString("agentType", "");
string days = GetStatic.ReadQueryString("days", "");
string agingFor = GetStatic.ReadQueryString("agingFor", "");
string chkInactiveAgent = GetStatic.ReadQueryString("chkInctiveAgent", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetUserLoginAgingRpt(user, agentType, days, chkInactiveAgent, agingFor, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult PrepareErroneouslyPaidRpt()
{
fieldFormat = "||N||||N||||N";
fieldAlignment = "L|L|R|C|||R|C|||R";
totalText = "<b>Total</b>";
totalFields = "2|6|10";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string controlNo = GetStatic.ReadQueryString("controlNo", "");
string reportFor = GetStatic.ReadQueryString("reportFor", "");
string paymentMethod = GetStatic.ReadQueryString("paymentMethod", "");
string tranType = GetStatic.ReadQueryString("tranType", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetErroneouslyPaidRpt(user, fromDate, toDate, controlNo, paymentMethod, tranType, reportFor, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareAcDepositDetailReport()
{
fieldFormat = "|||||||N|";
fieldAlignment = "|||||||R|";
totalText = "<b>Total</b>";
totalFields = "7";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string sendingAgent = GetStatic.ReadQueryString("sendingAgent", "");
string beneficiaryCountry = GetStatic.ReadQueryString("beneficiaryCountry", "");
string tranType = GetStatic.ReadQueryString("tranType", "");
string bankId = GetStatic.ReadQueryString("bankId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string dateType = GetStatic.ReadQueryString("dateType", "");
string fromTime = GetStatic.ReadQueryString("fromTime", "");
string toTime = GetStatic.ReadQueryString("toTime", "");
string redownload = GetStatic.ReadQueryString("redownload", "");
string paidUser = GetStatic.ReadQueryString("paidUser", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetAcDepositPaidDetailRpt(user, sendingAgent, beneficiaryCountry, bankId
, tranType, fromDate, toDate, dateType, fromTime,
toTime, redownload, paidUser, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareAcDepositSummaryReport()
{
fieldFormat = "|||N";
fieldAlignment = "||C|R";
totalText = "<b>Total</b>";
totalFields = "2|3";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string sendingAgent = GetStatic.ReadQueryString("sendingAgent", "");
string beneficiaryCountry = GetStatic.ReadQueryString("beneficiaryCountry", "");
string tranType = GetStatic.ReadQueryString("tranType", "");
string bankId = GetStatic.ReadQueryString("bankId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string dateType = GetStatic.ReadQueryString("dateType", "");
string fromTime = GetStatic.ReadQueryString("fromTime", "");
string toTime = GetStatic.ReadQueryString("toTime", "");
string redownload = GetStatic.ReadQueryString("redownload", "");
string paidUser = GetStatic.ReadQueryString("paidUser", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetAcDepositPaidSummaryRpt(user, sendingAgent, beneficiaryCountry, bankId
, tranType, fromDate, toDate, dateType, fromTime,
toTime, redownload, paidUser, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareNcellFreeSimRpt()
{
fieldFormat = "|||||||";
fieldAlignment = "||C|C|C|C|C|C|C|C";
totalText = "<b>Total</b>";
totalFields = "2|3|4|5|6|7|8|9";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetNcellFreeSimReport(user, fromDate, toDate, agentId, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult PrepareNcellSimSummaryRpt()
{
fieldFormat = "|||||||";
fieldAlignment = "||C|C|C|C|C|C|C|C";
totalText = "<b>Total</b>";
totalFields = "2|3|4|5|6|7|8|9";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetNcellSimSummaryReport(user, fromDate, toDate, agentId, pageNumber,
GetStatic.GetReportPagesize()));
}
private ReportResult ShowUserMatrixReport()
{
var userName = GetStatic.ReadQueryString("userName", "");
var report = new UserMatrixDao();
return report.GetReport(GetStatic.GetUser(), userName);
}
private ReportResult PrepareReportCancelreport()
{
mergeColumnHead = true;
fieldFormat = "|||||||||N|N||";
fieldAlignment = "|||||||||R|R||";
totalText = "<b>Total</b>";
totalFields = "9|10";
mergeColumnHead = true;
string pageNumber = GetPageNumber().ToString();
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string sCountry = GetStatic.ReadQueryString("sCountry", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string rCountry = GetStatic.ReadQueryString("rCountry", "");
string rAgent = GetStatic.ReadQueryString("rAgent", "");
string ctype = GetStatic.ReadQueryString("ctype", "");
string user = GetStatic.GetUser();
return
(new TranReportDao().GetCancelreport(user, fromDate, toDate, sCountry, sAgent, sBranch, rCountry, rAgent,
ctype, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareSettlementIntRpt()
{
string pCountry = GetStatic.ReadQueryString("pCountry", "");
string rCountry = GetStatic.ReadQueryString("rCountry", "");
var sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string type = GetStatic.ReadQueryString("type", "1");
mergeColumnHead = true;
fieldFormat = "|||N|N|N|N|N|N|N|N|N|N|N|N";
fieldAlignment = "|C|C||R|R|R|R|R|R|R|R|R|R";
totalText = "<b>Grand Total</b>";
totalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14|15";
subTotalBy = 0;
subTotalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14|15";
subTotalText = "<b>Sub Total</b>";
return (new TranReportDao().GetSettlementInternational(GetStatic.GetUser(), pCountry, sAgent, sBranch, fromDate,
toDate, pageNumber, GetStatic.GetReportPagesize(), type, rCountry));
}
private ReportResult PrepareNewCustomerRegistrationRpt()
{
string fromDate = GetStatic.ReadQueryString("from", "");
string toDate = GetStatic.ReadQueryString("to", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string type = GetStatic.ReadQueryString("type", "1");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
mergeColumnHead = true;
fieldFormat = "|||||||||||||||||";
fieldAlignment = "|||||||||||||||||";
return (new TranReportDao().GetNewCustomerRegistration(GetStatic.GetUser(), fromDate,
toDate, sBranch, pageNumber, GetStatic.GetReportPagesize(), type));
}
private ReportResult PrepareSettlementDomRpt()
{
string agent = GetStatic.ReadQueryString("AGENT", "");
string branch = GetStatic.ReadQueryString("BRANCH", "");
string fromDate = GetStatic.ReadQueryString("DATE1", "");
string toDate = GetStatic.ReadQueryString("DATE2", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string rptFlag = GetStatic.ReadQueryString("FLAG", "1");
string country = GetStatic.ReadQueryString("COUNTRY", "1");
if (rptFlag == "m2")
{
fieldFormat = "||||N|N";
fieldAlignment = "|||C|R|R";
totalText = "<b>Grand Total</b>";
totalFields = "3|4|5";
totalTextCol = 1;
subTotalBy = 1;
subTotalFields = "3|4|5";
subTotalText = "<b>Sub Total</b>";
}
else if (rptFlag == "PAY_COUNTRY")
{
fieldFormat = "||||N|N";
fieldAlignment = "|||C|R|R";
totalText = "<b>Grand Total</b>";
totalFields = "3|4|5";
totalTextCol = 1;
}
else
{
//fieldFormat = "|||||N|||";
//fieldAlignment = "|||||R|||";
//totalText = "<b>Total</b>";
//totalFields = "5";
//totalTextCol = 1;
fieldFormat = "|||||N|N||";
fieldAlignment = "|||||R|R||";
totalText = "<b>Total</b>";
totalFields = "5|6";
totalTextCol = 1;
}
//SEND_USER_D
//PAY_USER_D
//CANCEL_USER_D
//ERR_USER
//PAYORD_USER
//ERR_USER_D
//PAYORD_USER_D
return (new TranReportDao().GetSettlementDomRpt(GetStatic.GetUser(), rptFlag, country, agent, branch, fromDate, toDate, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareSettlementDdl()
{
var flag = GetStatic.ReadQueryString("flag", "");
var pCountry = GetStatic.ReadQueryString("pCountry", "");
var rCountry = GetStatic.ReadQueryString("rCountry", "");
var sAgent = GetStatic.ReadQueryString("sAgent", "");
var sBranch = GetStatic.ReadQueryString("sBranch", "");
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
totalText = "<b>Total</b>";
totalFields = "6|7|8|9|10|11|12|15";
fieldAlignment = "||||||R|R|R|R|R|R||R|R|R|R|R|R";
includeSerialNo = true;
mergeColumnHead = true;
return
(new TranReportDao().GetSettlementInternationalDdl(GetStatic.GetUser(), pCountry, sAgent, sBranch,
fromDate, toDate, pageNumber,
GetStatic.GetReportPagesize(), flag, rCountry));
}
private ReportResult PrepareTransactionReport()
{
mergeColumnHead = true;
string user = GetStatic.GetUser();
string sCountry = GetStatic.ReadQueryString("sCountry", "");
string rCountry = GetStatic.ReadQueryString("rCountry", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string rAgent = GetStatic.ReadQueryString("rAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string rBranch = GetStatic.ReadQueryString("rBranch", "");
string sFirstName = GetStatic.ReadQueryString("sFirstName", "");
string rFirstName = GetStatic.ReadQueryString("rFirstName", "");
string sMiddleName = GetStatic.ReadQueryString("sMiddleName", "");
string rMiddleName = GetStatic.ReadQueryString("rMiddleName", "");
string sLastName = GetStatic.ReadQueryString("sLastName", "");
string rLastName = GetStatic.ReadQueryString("rLastName", "");
string sSecondLastName = GetStatic.ReadQueryString("sSecondLastName", "");
string rSecondLastName = GetStatic.ReadQueryString("rSecondLastName", "");
string sMobile = GetStatic.ReadQueryString("sMobile", "");
string rMobile = GetStatic.ReadQueryString("rMobile", "");
string sEmail = GetStatic.ReadQueryString("sEmail", "");
string rEmail = GetStatic.ReadQueryString("rEmail", "");
string sIdNumber = GetStatic.ReadQueryString("sIdNumber", "");
string rIdNumber = GetStatic.ReadQueryString("rIdNumber", "");
string sState = GetStatic.ReadQueryString("sState", "");
string rState = GetStatic.ReadQueryString("rState", "");
string sCity = GetStatic.ReadQueryString("sCity", "");
string rCity = GetStatic.ReadQueryString("rCity", "");
string sZip = GetStatic.ReadQueryString("sZip", "");
string rZip = GetStatic.ReadQueryString("rZip", "");
string tranNo = GetStatic.ReadQueryString("tranNo", "");
string icn = GetStatic.ReadQueryString("icn", "");
string senderCompany = GetStatic.ReadQueryString("senderCompany", "");
string cAmtFrom = GetStatic.ReadQueryString("cAmtFrom", "");
string cAmtTo = GetStatic.ReadQueryString("cAmtTo", "");
string pAmtFrom = GetStatic.ReadQueryString("pAmtFrom", "");
string pAmtTo = GetStatic.ReadQueryString("pAmtTo", "");
string localDateFrom = GetStatic.ReadQueryString("localDateFrom", "");
string localDateTo = GetStatic.ReadQueryString("localDateTo", "");
string confirmDateFrom = GetStatic.ReadQueryString("confirmDateFrom", "");
string confirmDateTo = GetStatic.ReadQueryString("confirmDateTo", "");
string paidDateFrom = GetStatic.ReadQueryString("paidDateFrom", "");
string paidDateTo = GetStatic.ReadQueryString("paidDateTo", "");
string cancelledDateFrom = GetStatic.ReadQueryString("cancelledDateFrom", "");
string cancelledDateTo = GetStatic.ReadQueryString("cancelledDateTo", "");
string receivingMode = GetStatic.ReadQueryString("receivingMode", "");
string status = GetStatic.ReadQueryString("status", "");
string reportIn = GetStatic.ReadQueryString("reportIn", "");
string rptTemplate = GetStatic.ReadQueryString("rptTemplate", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string dateType = GetStatic.ReadQueryString("dateType", "");
string isAdvanceSearch = GetStatic.ReadQueryString("isAdvanceSearch", "");
string tranType = GetStatic.ReadQueryString("tranType", "");
string pageNumber = GetPageNumber().ToString();
var res = (new TranReportDao().GetTransactionReport(user
, sCountry
, rCountry
, sAgent
, rAgent
, sBranch
, rBranch
, sFirstName
, rFirstName
, sMiddleName
, rMiddleName
, sLastName
, rLastName
, sSecondLastName
, rSecondLastName
, sMobile
, rMobile
, sEmail
, rEmail
, sIdNumber
, rIdNumber
, sState
, rState
, sCity
, rCity
, sZip
, rZip
, tranNo
, icn
, senderCompany
, cAmtFrom
, cAmtTo
, pAmtFrom
, pAmtTo
, localDateFrom
, localDateTo
, confirmDateFrom
, confirmDateTo
, paidDateFrom
, paidDateTo
, cancelledDateFrom
, cancelledDateTo
, receivingMode
, status
, reportIn
, rptTemplate
, fromDate
, toDate
, dateType
, isAdvanceSearch
, pageNumber
, GetStatic.GetReportPagesize()
, isExportFull
, tranType)
);
var fList = GetColumnNameToIndex(res.Result.Tables[1], "Sender Commission|Collected Amount|Sevice Charge",
"");
fieldFormat = fList.Format;
fieldAlignment = fList.Alignment;
totalText = "<b>Total</b>";
totalFields = fList.TotalFields;
totalTextCol = 0;
return res;
}
//private ReportResult PrepareAMLReport()
//{
// var sCountry = GetStatic.ReadQueryString("sCountry", "");
// var rCountry = GetStatic.ReadQueryString("rCountry", "");
// var sAgent = GetStatic.ReadQueryString("sAgent", "");
// var rAgent = GetStatic.ReadQueryString("rAgent", "");
// var sBranch = GetStatic.ReadQueryString("sBranch", "");
// var rBranch = GetStatic.ReadQueryString("rBranch", "");
// var sCurr = GetStatic.ReadQueryString("sCurr", "");
// var rCurr = GetStatic.ReadQueryString("rCurr", "");
// var rMode = GetStatic.ReadQueryString("rMode", "");
// var tranType = GetStatic.ReadQueryString("tranType", "");
// var dateType = GetStatic.ReadQueryString("dateType", "");
// var frmDate = GetStatic.ReadQueryString("frmDate", "");
// var toDate = GetStatic.ReadQueryString("toDate", "");
// var user = GetStatic.GetUser();
// var flag = GetStatic.ReadQueryString("flag", "");
// ReportResult r = new ReportResult(); if (flag.Equals("sbc")) { totalFields = "2|3";
// totalText = "Total"; fieldFormat = "|||N"; fieldAlignment = "C||C|R"; var searchBy =
// GetStatic.ReadQueryString("searchBy", ""); var idType =
// GetStatic.ReadQueryString("idType", ""); var idNumber =
// GetStatic.ReadQueryString("idNumber", ""); } else if (flag.Equals("tc")) { totalFields =
// "4|5"; totalText = "Total"; fieldFormat = "|||||N||N|"; fieldAlignment = "||||C|R||R|";
// mergeColumnHead = true; var rptBy = GetStatic.ReadQueryString("rptBy", ""); var rptFor =
// GetStatic.ReadQueryString("rptFor", ""); var tcNo = GetStatic.ReadQueryString("tcNo",
// ""); if (rptFor.ToLower().Equals("sender")) { totalFields = "7|8|10"; fieldFormat =
// "||||||||N||N|"; fieldAlignment = "|||||||C|R||R|"; } }
// else if (flag.Equals("cr")) { mergeColumnHead = true; totalText = "Total"; totalFields =
// "1|2|4|5"; fieldFormat = "||N||N|N||N"; fieldAlignment = "|R|R||R|R||R";
// var fromAmt = GetStatic.ReadQueryString("fromAmt", ""); var toAmt =
// GetStatic.ReadQueryString("toAmt", ""); var orderBy =
// GetStatic.ReadQueryString("orderBY", ""); var isd = GetStatic.ReadQueryString("isd", "");
// if (isd.ToLower().Equals("y")) { totalFields = "7|8|10|11"; fieldFormat =
// "||||||||N||N|N||N"; fieldAlignment = "||||||||R||R|R||R"; }
// }
// else if (flag.Equals("mr")) { var mrType = GetStatic.ReadQueryString("mrType", "");
// totalText = "Total"; switch (mrType.ToLower()) { case "ssmt": totalFields = "6|7";
// fieldFormat = "|||||||N||N"; fieldAlignment = "||||||C|R||R"; break; case "ssmtd":
// totalFields = "10|12"; totalText = "Grand Total"; fieldFormat = "||||||||||N||N||N";
// fieldAlignment = "||||||||||R||R||R"; totalTextCol = 3; subTotalBy = 3; subTotalFields =
// "10|12"; subTotalText = "Sub Total"; break; case "sbmt": totalFields = "3|4"; fieldFormat
// = "||||N||N"; fieldAlignment = "|||C|R||R"; break; case "sbmtd": totalFields = "10|12";
// totalText = "Grand Total"; fieldFormat = "||||||||||N||N||N"; fieldAlignment =
// "||||||||||R||R||R"; totalTextCol = 3; subTotalBy = 3; subTotalFields = "10|12";
// subTotalText = "Sub Total"; break; case "sssb": case "sncrc": totalFields = "10|12|13";
// fieldFormat = "||||||||||N||N|N||N"; fieldAlignment = "||||||||||R||R|R||R"; break; }
// mergeColumnHead = true; }
// else if (flag.Equals("oc")) { totalFields = "10|11"; totalText = "Total"; fieldFormat =
// "||||||||||N|N||N"; fieldAlignment = "||||||||||R|R||R"; mergeColumnHead = true;
// var octype = GetStatic.ReadQueryString("ocDateType", ""); var ocrptType =
// GetStatic.ReadQueryString("ocrptType", "");
// }
// return r;
//}
private ReportResult PrepareAMLReport()
{
var sCountry = GetStatic.ReadQueryString("sCountry", "");
var rCountry = GetStatic.ReadQueryString("rCountry", "");
var sAgent = GetStatic.ReadQueryString("sAgent", "");
var rAgent = GetStatic.ReadQueryString("rAgent", "");
var rMode = GetStatic.ReadQueryString("rMode", "");
var dateType = GetStatic.ReadQueryString("dateType", "");
var frmDate = GetStatic.ReadQueryString("frmDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var reportType = GetStatic.ReadQueryString("reportType", "");
var amtType = GetStatic.ReadQueryString("amtType", "");
var user = GetStatic.GetUser();
var flag = GetStatic.ReadQueryString("flag", "");
var amlReport = new AMLReportDao();
ReportResult r = new ReportResult();
if (flag.Equals("sbc"))
{
totalFields = "2|3";
totalText = "Total";
fieldFormat = "|||N";
fieldAlignment = "C||C|R";
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var saerchType = GetStatic.ReadQueryString("saerchType", "");
var searchValue = GetStatic.ReadQueryString("searchValue", "");
r = amlReport.SearchByCustomer(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
searchBy, saerchType, searchValue,
GetPageNumber().ToString(), GetStatic.GetReportPagesize(), isExportFull);
}
else if (flag.Equals("tc"))
{
var rptBy = GetStatic.ReadQueryString("rptBy", "");
var rptFor = GetStatic.ReadQueryString("rptFor", "");
var tcNo = GetStatic.ReadQueryString("tcNo", "");
if (rptFor.ToLower().Equals("receiver"))
{
fieldFormat = "||||||N||N";
fieldAlignment = "||||||R||R";
}
if (rptFor.ToLower().Equals("sender"))
{
mergeColumnHead = true;
fieldFormat = "|||||||||||N||N";
fieldAlignment = "|||||||||||R||R";
}
if (reportType.ToLower().Equals("summary date"))
{
totalFields = "|5";
totalText = "Total";
fieldFormat = "||||N";
fieldAlignment = "||||R";
}
if (reportType.ToLower().Equals("summary name"))
{
totalFields = "|4";
totalText = "Total";
fieldFormat = "|||N";
fieldAlignment = "|||R";
}
r = amlReport.TopCustomer(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
rptBy, rptFor, tcNo, GetPageNumber().ToString(), GetStatic.GetReportPagesize(), isExportFull, reportType);
}
else if (flag.Equals("cr"))
{
mergeColumnHead = true;
totalText = "Total";
totalFields = "1|2|4|5";
fieldFormat = "||N||N|N||N";
fieldAlignment = "|R|R||R|R||R";
var fromAmt = GetStatic.ReadQueryString("fromAmt", "");
var toAmt = GetStatic.ReadQueryString("toAmt", "");
var orderBy = GetStatic.ReadQueryString("orderBY", "");
var isd = GetStatic.ReadQueryString("isd", "");
if (isd.ToLower().Equals("y"))
{
totalFields = "6|7|9|10";
fieldFormat = "|||||||N||N|N||N";
fieldAlignment = "|||||||R||R|R||R";
}
r = amlReport.CustomerReport(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
fromAmt, toAmt, isd, orderBy, GetPageNumber().ToString(), GetStatic.GetReportPagesize(), isExportFull, amtType);
}
else if (flag.Equals("cd"))
{
mergeColumnHead = true;
totalText = "Total";
totalFields = "2|3|5";
fieldFormat = "|||N||N";
fieldAlignment = "|||R||R|";
var fromAmt = GetStatic.ReadQueryString("fromAmt", "");
var toAmt = GetStatic.ReadQueryString("toAmt", "");
var orderBy = GetStatic.ReadQueryString("orderBY", "");
var isd = GetStatic.ReadQueryString("isd", "");
if (isd.ToLower().Equals("y"))
{
totalFields = "7|8|10";
fieldFormat = "||||||||N||N";
fieldAlignment = "||||||||R||R";
}
r = amlReport.CustomerReportDaily(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
fromAmt, toAmt, isd, orderBy, GetPageNumber().ToString(), GetStatic.GetReportPagesize(), isExportFull);
}
else if (flag.Equals("mr"))
{
var mrType = GetStatic.ReadQueryString("mrType", "");
var asOnDate = GetStatic.ReadQueryString("asOnDate", "");
totalText = "Total";
switch (mrType.ToLower())
{
case "ssmt":
totalFields = "5|6";
fieldFormat = "||||||N||N";
fieldAlignment = "|||||C|R||R";
break;
case "str":
fieldFormat = "||||||||||||N||N";
fieldAlignment = "||||||||||||R||R";
break;
case "ssmtd":
totalFields = "10|12";
totalText = "Grand Total";
fieldFormat = "||||||||||N||N||N";
fieldAlignment = "||||||||||R||R||R";
totalTextCol = 3;
subTotalBy = 3;
subTotalFields = "10|12";
subTotalText = "Sub Total";
break;
case "sbmt":
totalFields = "3|4";
fieldFormat = "||||N||N";
fieldAlignment = "|||C|R||R";
break;
case "sbmtd":
totalFields = "10|12";
totalText = "Grand Total";
fieldFormat = "||||||||||N||N||N";
fieldAlignment = "||||||||||R||R||R";
totalTextCol = 3;
subTotalBy = 3;
subTotalFields = "10|12";
subTotalText = "Sub Total";
break;
case "sssb":
case "sncrc":
totalFields = "11|13|14";
fieldFormat = "|||||||||||N||N|N||N";
fieldAlignment = "|||||||||||R||R|R||R";
break;
}
mergeColumnHead = true;
r = amlReport.MISReport(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
mrType, GetPageNumber().ToString(), GetStatic.GetReportPagesize(),
isExportFull, asOnDate);
}
else if (flag.Equals("oc"))
{
totalFields = "10|11";
totalText = "Total";
fieldFormat = "||||||||||N|N||N";
fieldAlignment = "||||||||||R|R||R";
mergeColumnHead = true;
var octype = GetStatic.ReadQueryString("ocDateType", "");
var ocrptType = GetStatic.ReadQueryString("ocrptType", "");
r = amlReport.OFACAndCompliance(user, sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate,
octype, ocrptType, GetPageNumber().ToString(), GetStatic.GetReportPagesize(), isExportFull);
}
return r;
}
private ReportResult PrepareAMLReport_DDL()
{
var flag = GetStatic.ReadQueryString("flag", "");
var sCountry = GetStatic.ReadQueryString("sCountry", "");
var rCountry = GetStatic.ReadQueryString("rCountry", "");
var sAgent = GetStatic.ReadQueryString("sAgent", "");
var rAgent = GetStatic.ReadQueryString("rAgent", "");
var rMode = GetStatic.ReadQueryString("rMode", "");
var dateType = GetStatic.ReadQueryString("dateType", "");
var frmDate = GetStatic.ReadQueryString("frmDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
//changed params
var saerchType = GetStatic.ReadQueryString("saerchType", "");
var searchValue = GetStatic.ReadQueryString("searchValue", "");
var customerId = GetStatic.ReadQueryString("customerId", "");
var rptFor = GetStatic.ReadQueryString("rptFor", "");
var fromAmt = GetStatic.ReadQueryString("fAmt", "");
var toAmt = GetStatic.ReadQueryString("tAmt", "");
var sCustomer = GetStatic.ReadQueryString("scust", "");
var receiverName = GetStatic.ReadQueryString("recName", "");
var txnDate = GetStatic.ReadQueryString("date", "");
var country = GetStatic.ReadQueryString("country", "");
var sIdType = GetStatic.ReadQueryString("idType", "");
var sIdNumber = GetStatic.ReadQueryString("idNumber", "");
var company = GetStatic.ReadQueryString("company", "");
var senderName = GetStatic.ReadQueryString("senderName", "");
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var recMobile = GetStatic.ReadQueryString("recMobile", "");
var amtType = GetStatic.ReadQueryString("amtType", "");
totalFields = "10|12";
totalText = "Total";
fieldFormat = "||||||||||N||N||N";
fieldAlignment = "||||||||||R||R||R";
mergeColumnHead = true;
var amlReport = new AMLReportDao();
ReportResult r = new ReportResult();
r = amlReport.DDLSearchByCustomer(flag, GetStatic.GetUser(), sCountry, rCountry, sAgent, rAgent, rMode, dateType, frmDate, toDate, saerchType, searchValue, txnDate
, senderName, receiverName, customerId, rptFor, fromAmt, toAmt, country, sIdType, sIdNumber, company, searchBy, isExportFull
, recMobile, amtType);
return r;
}
private ReportResult Prepare_20164200_report()
{
totalFields = "2|3|4|5|6|7|8|9|10|11";
totalText = "Total";
totalTextCol = 1;
fieldFormat = "||||||||N|N";
fieldAlignment = "C||C|C|C|C|C|C|R|R";
mergeColumnHead = true;
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var agentGrp = GetStatic.ReadQueryString("agentGrp", "");
var agent = GetStatic.ReadQueryString("agent", "");
var branch = GetStatic.ReadQueryString("branch", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
return (new TranReportDao().GetCooperativeReport(GetStatic.GetUser(), fromDate, toDate, agentGrp, agent, branch, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareCustomerEnrollmentReport()
{
string rptFlag = GetStatic.ReadQueryString("flag", "");
if (rptFlag == "main")
{
fieldFormat = "||";
fieldAlignment = "C||C";
totalText = "<b>Total</b>";
totalFields = "2";
}
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string agentId = GetStatic.ReadQueryString("agent", "");
string branchId = GetStatic.ReadQueryString("branch", "");
string memId = GetStatic.ReadQueryString("memId", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetCustomerEnrollReport(user, rptFlag, fromDate, toDate, agentId, branchId, memId, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareTxnRptByMemIDReport()
{
fieldFormat = "||||N||||||";
totalText = "<b>Total</b>";
subTotalBy = 15;
totalFields = "4";
subTotalText = "Sub Total";
subTotalFields = "4";
mergeColumnHead = true;
subTotalTextCol = 2;
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string memId = GetStatic.ReadQueryString("memId", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetCustomerTxnReport(user, fromDate, toDate, memId, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareSMSRpt()
{
string rptType = GetStatic.ReadQueryString("rptType", "s");
if (rptType == "s")
{
fieldFormat = "||";
fieldAlignment = "C||C";
totalText = "<b>Total</b>";
totalFields = "2";
totalTextCol = 1;
}
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string country = GetStatic.ReadQueryString("country", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetSMSRpt(user, rptType, fromDate, toDate, country, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareBonusRpt20167200()
{
string flag = GetStatic.ReadQueryString("flag", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string mFrom = GetStatic.ReadQueryString("mFrom", "");
string mTo = GetStatic.ReadQueryString("mTo", "");
string orderBy = GetStatic.ReadQueryString("orderBy", "");
string membershipId = GetStatic.ReadQueryString("membershipId", "");
string pageNumber = GetPageNumber().ToString();
string user = GetStatic.GetUser();
if (flag == "bRptDrildown")
{
totalFields = "6|7|8|9|10|11";
totalText = "Total";
fieldFormat = "||||||N|N|N|N|N|N";
fieldAlignment = "||||||R|R|R|R|R|R";
mergeColumnHead = true;
return (new TranReportDao().GetBonusTxnDetail(user, flag, fromDate, toDate, membershipId, pageNumber, GetStatic.GetReportPagesize()));
}
else
{
fieldFormat = "|||N||||||||";
fieldAlignment = "|||R||||||||";
mergeColumnHead = true;
totalFields = "3";
totalText = "Total";
return (new TranReportDao().GetBonusReport(user, flag, fromDate, toDate, mFrom, mTo, membershipId, orderBy, pageNumber, GetStatic.GetReportPagesize()));
}
}
protected string GetPartnerIdArr(string partnerAndSubPartner)
{
if (!string.IsNullOrEmpty(partnerAndSubPartner))
{
return partnerAndSubPartner.Split('|')[0];
}
else
{
return null;
}
}
private ReportResult PrepareReport_20171000()
{
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
string provider = GetStatic.ReadQueryString("provider", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string rptType = GetStatic.ReadQueryString("rptType", "");
includeSerialNo = true;
totalText = "Total";
var rr = new ReportResult();
//if (provider == DAL.BL.System.Utility.Utility.GetgblAgentId())
//{
// rr = new GlobalBankDao().GetReconcileReport(user, fromDate);
// fieldFormat = "|||||N";
// fieldAlignment = "|||||R";
// totalFields = "5";
//}
//else if (GetPartnerIdArr(provider) == DAL.BL.System.Utility.Utility.GetkumariAgentId())
//{
// rr = new KumariBankDao().GetReconcileReport(user, fromDate, toDate, rptType);
// fieldFormat = "|||||N||";
// fieldAlignment = "|||||R||";
// totalFields = "5";
// totalText = "<td></td>Total";
//}
//else if (provider == DAL.BL.System.Utility.Utility.GetMaxMoneyAgentId())
//{
// rr = new MaxMoneyDao().GetReconcileReport(user, fromDate, toDate);
// fieldFormat = "|||||N||";
// fieldAlignment = "|||||R||";
// totalFields = "5";
// totalText = "<td></td>Total";
//}
return rr;
}
private ReportResult PrepareReport_20821400()
{
string agentId = GetStatic.ReadQueryString("agentId", "");
string year = GetStatic.ReadQueryString("year", "");
string month = GetStatic.ReadQueryString("month", "");
string pageNumber = GetPageNumber().ToString();
string user = GetStatic.GetUser();
fieldAlignment = "||||R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R|R";
mergeColumnHead = true;
return (new TranReportDao().GetAgentTargetRpt(user, agentId, year, month, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareReport_10122200_login()
{
string agentCountry = GetStatic.ReadQueryString("sCountry", "");
string agentCountryName = GetStatic.ReadQueryString("sCountryName", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string reportBy = GetStatic.ReadQueryString("reportBy", "");
string operators = GetStatic.ReadQueryString("operator", "");
string count = GetStatic.ReadQueryString("count", "");
string userName = GetStatic.ReadQueryString("userName", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
return (new TranReportDao().GetFraudAnalysisLoginReport(reportBy, agentCountry, fromDate, toDate, operators, count, user, userName, agentId, agentCountryName));
}
private ReportResult PrepareReport_10122200_txn()
{
includeSerialNo = true;
string sCountry = GetStatic.ReadQueryString("sCountryId", "");
string sCountryName = GetStatic.ReadQueryString("sCountryName", "");
string rCountry = GetStatic.ReadQueryString("rCountry", "");
string fromDate = GetStatic.ReadQueryString("fromTxnDate", "");
string toDate = GetStatic.ReadQueryString("toTxnDate", "");
string reportBy = GetStatic.ReadQueryString("reportByTxn", "");
string operatorTxn = GetStatic.ReadQueryString("operatorTxn", "");
string count = GetStatic.ReadQueryString("count", "");
string userName = GetStatic.ReadQueryString("UserName", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string agentUser = GetStatic.ReadQueryString("userName", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetFraudTxn(reportBy, user, sCountry, rCountry, fromDate, toDate, operatorTxn, count, userName, agentId, agentUser));
}
private ReportResult PrepareReport_20167300()
{
string dateType = GetStatic.ReadQueryString("dateType", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string tAgent = GetStatic.ReadQueryString("tAgent", "");
string status = GetStatic.ReadQueryString("status", "");
string rptType = GetStatic.ReadQueryString("rptType", "");
string groupBy = GetStatic.ReadQueryString("groupBy", "");
string rType = GetStatic.ReadQueryString("rType", "");
string pCountry = GetStatic.ReadQueryString("pCountry", "");
string charge = GetStatic.ReadQueryString("charge", "");
string sCountry = GetStatic.ReadQueryString("sCountry", "");
string pageNumber = GetPageNumber().ToString();
if (string.IsNullOrWhiteSpace(rType))
{
if (rptType == "S")
{
fieldFormat = "||N|N|N|N|N||N";
fieldAlignment = "||R|R|R|R|R||R";
mergeColumnHead = true;
totalText = "Total";
totalFields = "1|2|3|4|5";
}
else
{
useDBRowColorCode = true;
mergeColumnHead = true;
subTotalText = "<b><i>Country Total</i></b>";
totalTextCol = 3;
subTotalTextCol = 3;
subTotalFields = "8|10|12|14";
fieldFormat = "||||||||N||N||N||N";
fieldAlignment = "R||||||R||R||R||R||R";
fieldWrap = "||||||Y";
excludeColumns = "rowColor";
subTotalBy = 3;
}
}
rptType = (string.IsNullOrWhiteSpace(rType) ? rptType : rType);
return (new TranReportDao().GetThirdpartytxnReport(GetStatic.GetUser(), dateType, fromDate, toDate,
tAgent, status, rptType, groupBy, pCountry, charge, isExportFull, sCountry, pageNumber, GetStatic.GetReportPagesize()));
}
private ReportResult PrepareprocMultipleTxnAnalysisReport_20601200()
{
string flag = GetStatic.ReadQueryString("flag", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string transactionType = GetStatic.ReadQueryString("transactionType", "");
string reportBy = GetStatic.ReadQueryString("reportBy", "");
string customer = GetStatic.ReadQueryString("customer", "");
string pageNumber = GetPageNumber().ToString();
string user = GetStatic.GetUser();
if (flag == "amRptDrildown")
{
totalFields = "6|7|8|9|10|11";
totalText = "Total";
fieldFormat = "||||||N|N|N|N|N|N";
fieldAlignment = "||||||R|R|R|R|R|R";
mergeColumnHead = true;
return (new TranReportDao().GetMultipleTxnAnalysisReport(user, flag, fromDate, toDate, transactionType, reportBy, customer, pageNumber, GetStatic.GetReportPagesize()));
}
else
{
fieldFormat = "|||||||||";
fieldAlignment = "|||R||||||";
mergeColumnHead = true;
totalFields = "3";
totalText = "Total";
return (new TranReportDao().GetMultipleTxnAnalysisReport(user, flag, fromDate, toDate, transactionType, reportBy, customer, pageNumber, GetStatic.GetReportPagesize()));
}
}
private ReportResult PrepareReport_20167400()
{
fieldFormat = "|||N|N|N|N|N|N|N|N";
fieldAlignment = "|||R|R|R|R|R|R|R|R|R";
mergeColumnHead = true;
totalFields = "3|4|5|6|7|8|9|10|11|12";
totalText = "Total<td></td>";
includeSerialNo = true;
subTotalBy = 1;
subTotalFields = "3|4|5|6|7|8|9|10|11|12";
subTotalText = "Sub Total<td></td>";
subTotalTextCol = 1;
string agentMapCode = GetStatic.ReadQueryString("agent", "");
string agentName = GetStatic.ReadQueryString("agentName", "");
string agentGroup = GetStatic.ReadQueryString("agentGroup", "");
string user = GetStatic.GetUser();
return (new TranReportDao().AgentSummaryBalance(user, agentMapCode, agentName, agentGroup));
}
private ReportResult PrepareReport_NepalUnpaid()
{
string flag = GetStatic.ReadQueryString("flag", "u-nepal");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
fieldFormat = "|||||||N|";
fieldAlignment = "|||||||R";
totalFields = "7";
totalText = "Total";
return (new TranReportDao().UnpaidTransactionReportNepal(user, flag, fromDate));
}
private ReportResult PrepareReport_20167500()
{
string tranType = GetStatic.ReadQueryString("TranType", "d");
string flag = GetStatic.ReadQueryString("flag", "s");
string agentId = GetStatic.ReadQueryString("agentId", "");
string agentName = GetStatic.ReadQueryString("agentName", "");
string country = GetStatic.ReadQueryString("country", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string paymentMode = GetStatic.ReadQueryString("paymentMode", "");
string user = GetStatic.GetUser();
includeSerialNo = true;
if (flag.Equals("s"))
{
fieldFormat = "||N|";
fieldAlignment = "||R|R";
totalFields = "2|3";
totalText = "Total";
}
else if (flag.Equals("detail") || flag.Equals("detail1") || flag.Equals("between5to15") || flag.Equals("greaterthan15"))
{
fieldFormat = "||||N|N||N|||||";
fieldAlignment = "||||R|R||R|||||";
totalFields = "4|5";
totalText = "Total";
}
return (new TranReportDao().UnpaidTransactionReport(user, flag, tranType, agentId, agentName, country, paymentMode, fromDate));
}
private ReportResult PrepareReport_20167600()
{
string PayingAgent = GetStatic.ReadQueryString("PayingAgent", "");
string flag = GetStatic.ReadQueryString("flag", "s");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string ToDate = GetStatic.ReadQueryString("ToDate", "");
string agentId = GetStatic.ReadQueryString("agentId", "");
string agentName = GetStatic.ReadQueryString("agentName", "");
string user = GetStatic.GetUser();
if (flag.Equals("s"))
{
fieldFormat = "|||N|N|N|N";
fieldAlignment = "||R|R|R|R|R|R";
totalFields = "3|4|5|6";
totalText = "Total";
}
else if (flag.Equals("detail"))
{
fieldFormat = "|||||N||N||||";
fieldAlignment = "|||||R||R||||";
totalFields = "5|7";
totalText = "Total";
}
return (new TranReportDao().PayingAgentSettlementReport(user, flag, PayingAgent, agentId, fromDate, ToDate));
}
private ReportResult PrepareReport_20182200_recon()
{
mergeColumnHead = true;
string flags = GetStatic.ReadQueryString("flag", "s");
string agentId = GetStatic.ReadQueryString("agentId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("todate", "");
string isDocUpload = GetStatic.ReadQueryString("isDocUpload", "");
string user = GetStatic.GetUser();
if (flags == "complain-wise")
{
fieldFormat = "||||N";
fieldAlignment = "||||R";
}
else if (flags == "reconcile-wise")
{
fieldAlignment = "||||||C|C|C|C|C|C|C|C|C|C|C|C|C|C|C";
totalFields = "6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24";
totalText = "Total";
totalTextCol = 1;
subTotalBy = 1;
subTotalFields = "6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24";
subTotalText = "Sub Total";
subTotalTextCol = 1;
}
else if (flags == "txn-wise" || flags == "s")
{
fieldAlignment = "||C|C|C|C|C|C|C|C|C|C|C|C|C|C";
totalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14";
totalText = "Total";
totalTextCol = 1;
}
else
{
fieldFormat = "|||N||||||";
fieldAlignment = "|||R||||||";
}
return (new TranReportDao().ReconcilationReport(user, flags, agentId, fromDate, todate, isDocUpload));
}
private ReportResult PrepareReport_20182200_recon2()
{
string user = GetStatic.GetUser();
string fromDate = GetStatic.ReadQueryString("fromDateS", "");
string toDate = GetStatic.ReadQueryString("toDateS", "");
string userName = GetStatic.ReadQueryString("userS", "");
string box = GetStatic.ReadQueryString("box", "");
return (new TranReportDao().ReconcilationReport2(user, fromDate, toDate, userName, box));
}
//private ReportResult PrepareReport_20167600()
//{
// string flag = GetStatic.ReadQueryString("flag", "s");
// string agentId = GetStatic.ReadQueryString("sendingAgent", "");
// string searchBy = GetStatic.ReadQueryString("searchBy", "");
// string searchText = GetStatic.ReadQueryString("searchText", "");
// string tranId = GetStatic.ReadQueryString("tranId", "");
// string user = GetStatic.GetUser();
// fieldFormat = "||||||||N";
// fieldAlignment = "||||||||R";
// return (new TranReportDao().QuickUnpaidReport(user, flag, agentId, searchBy, searchText, tranId));
//}
private ReportResult PrepareReport_20167700()
{
string flag = GetStatic.ReadQueryString("flag", "");
includeSerialNo = true;
mergeColumnHead = true;
if (flag == "d")
{
fieldFormat = "|N|N|N|N||N|N||N|N|N|N";
fieldAlignment = "|R|R|R|R|R|R|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6|7|8|9|10|11|12";
totalText = "<b>Total</b>";
}
else if (flag == "s")
{
fieldFormat = "||N|N|N|N|N";
fieldAlignment = "|R|R|R|R|R|R";
totalFields = "1|2|3|4|5|6";
totalText = "<b>Total</b>";
}
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string user = GetStatic.GetUser();
return (new TranReportDao().DomesticTxtreport(user, flag, fromDate, todate));
}
private ReportResult PrepareReport_20182200()
{
mergeColumnHead = true;
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string userName = GetStatic.ReadQueryString("userName", "");
string rptType = GetStatic.ReadQueryString("rptType", "");
string user = GetStatic.GetUser();
if (rptType == "user-wise")
{
fieldFormat = "||||||||";
fieldAlignment = "||C|C|C|C|C|C|C";
totalFields = "2|3|4|5|6|7|8";
totalText = "Total";
totalTextCol = 1;
}
else
{
fieldFormat = "|||||||||";
fieldAlignment = "|||C|C|C|C|C|C|C";
totalFields = "3|4|5|6|7|8|9";
totalText = "Total";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "Sub Total";
subTotalTextCol = 1;
}
return (new TranReportDao().ReconcileUserWiseReport(user, fromDate, todate, userName, rptType));
}
private ReportResult PrepareReport_customerptenrollment()
{
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var zone = GetStatic.ReadQueryString("sZone", "");
var agent = GetStatic.ReadQueryString("sAgent", "");
var ageGrp = GetStatic.ReadQueryString("ageGrp", "");
var agentGrp = GetStatic.ReadQueryString("agentGrp", "");
var membershipId = GetStatic.ReadQueryString(GetStatic.ReadQueryString("searchText", "") != "" ? "searchText" : "membershipId", "");
var user = GetStatic.GetUser();
if (searchBy == "sz" || searchBy == "age")
{
totalText = "<b>Total</b>";
fieldFormat = "||||||||";
fieldAlignment = "||C|C|C|C|C|C|C";
totalFields = "2|3|4|5|6|7|8";
}
else if (searchBy == "sa")
{
totalText = "<b>Total</b>";
fieldFormat = "|||||||||";
fieldAlignment = "|||C|C|C|C|C|C|C";
totalFields = "3|4|5|6|7|8|9";
}
else if (searchBy == "c")
{
totalText = "<b>Total</b>";
fieldFormat = "|||||";
fieldAlignment = "|||C|C|C";
totalFields = "3|4|5";
}
return (new TranReportDao().GetCustomerEnrollmentReport(user, searchBy, fromDate, toDate, zone, agent, membershipId, ageGrp, agentGrp));
}
private ReportResult PrepareReport_20161700()
{
string rptType = GetStatic.ReadQueryString("rtpType", "");
string tranDate = GetStatic.ReadQueryString("tranDate", "");
string mapCode = GetStatic.ReadQueryString("mapCode", "");
string branch = GetStatic.ReadQueryString("branch", "");
string agent = GetStatic.ReadQueryString("agent", "");
string FLAG2 = GetStatic.ReadQueryString("FLAG2", "");
fieldFormat = "||||||N|N|";
fieldAlignment = "C||||||R|R|";
totalFields = "6|7";
totalText = "<b>Grand Total</b>";
totalTextCol = 1;
subTotalBy = 1;
subTotalFields = "6|7";
subTotalText = "Sub Total";
subTotalTextCol = 1;
string user = GetStatic.GetUser();
return (new TranReportDao().SoaExportToExcel(user, rptType, tranDate, mapCode, branch, agent, FLAG2));
}
private ReportResult PrepareReport_20161200()
{
mergeColumnHead = true;
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string todate = GetStatic.ReadQueryString("toDate", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string rptType = GetStatic.ReadQueryString("rptType", "");
string user = GetStatic.GetUser();
if (rptType == "s")
{
fieldFormat = "||||N|N";
fieldAlignment = "|||C|R|R";
totalFields = "3|4|5";
totalText = "Total";
totalTextCol = 1;
}
else if (rptType == "d")
{
fieldFormat = "|||||||N|N";
fieldAlignment = "|||||||R|R";
totalFields = "7|8";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetPayableReport(user, fromDate, todate, sAgent, rptType));
}
private ReportResult PrepareReport_20167800()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var year = GetStatic.ReadQueryString("year", "");
var month = GetStatic.ReadQueryString("month", "");
var agentId = GetStatic.ReadQueryString("agent", "");
var mc = GetStatic.ReadQueryString("mc", "");
var user = GetStatic.GetUser();
return (new TranReportDao().GetSoaMonthlyLogs(user, fromDate, toDate, year, month, agentId, mc));
}
private ReportResult PrepareReport_20167900()
{
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var agentId = GetStatic.ReadQueryString("agent", "");
var user = GetStatic.GetUser();
return (new TranReportDao().GetCertificateExpiryReport(user, fromDate, toDate, agentId));
}
private ReportResult PrepareReport_20821700()
{
mergeColumnHead = true;
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var userName = GetStatic.ReadQueryString("userName", "");
var rptType = GetStatic.ReadQueryString("rptType", "");
var cardType = GetStatic.ReadQueryString("cardType", "");
var user = GetStatic.GetUser();
if (rptType == "summary")
{
fieldFormat = "||";
fieldAlignment = "C||C";
totalFields = "2";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetUserwiseCustomerApproval(user, fromDate, toDate, userName, rptType, cardType));
}
private ReportResult PrepareReport_20822100_txn()
{
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var zone = GetStatic.ReadQueryString("sZone", "");
var agent = GetStatic.ReadQueryString("sAgent", "");
var agentGrp = GetStatic.ReadQueryString("agentGrp", "");
var membershipId = GetStatic.ReadQueryString(GetStatic.ReadQueryString("searchText", "") != "" ? "searchText" : "membershipId", "");
var slab = GetStatic.ReadQueryString("slab", "");
var user = GetStatic.GetUser();
if (searchBy == "detail")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|";
totalFields = "3|4";
}
else if (searchBy == "c")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|||N";
fieldAlignment = "C||C|R|C|C|R|C";
totalFields = "2|3|4|5|6|7";
}
else if (searchBy == "sz")
{
fieldAlignment = "C|C|C";
totalFields = "2|3|4";
totalText = "Total";
totalTextCol = 1;
}
else if (searchBy == "sa")
{
fieldAlignment = "C|C|C|C|C|R";
totalFields = "2|3|4";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetCustomerTxnReport(user, searchBy, fromDate, toDate, zone, agent, membershipId, slab, agentGrp));
}
private ReportResult PrepareReport_20822100_bonus()
{
var searchBy = GetStatic.ReadQueryString("searchBy", "");
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var zone = GetStatic.ReadQueryString("sZone", "");
var agent = GetStatic.ReadQueryString("sAgent", "");
var membershipId = GetStatic.ReadQueryString(GetStatic.ReadQueryString("searchText", "") != "" ? "searchText" : "membershipId", "");
var slab = GetStatic.ReadQueryString("slab", "");
var user = GetStatic.GetUser();
if (searchBy == "detail")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|";
totalFields = "3|4";
}
else if (searchBy == "c")
{
totalText = "<b>Total</b>";
fieldFormat = "|||N|";
fieldAlignment = "C||C|R|C";
totalFields = "2|3|4";
}
else if (searchBy == "sz")
{
totalFields = "2";
totalText = "Total";
totalTextCol = 1;
}
else if (searchBy == "sa")
{
totalFields = "3";
totalText = "Total";
totalTextCol = 1;
}
else if (searchBy == "b")
{
totalFields = "2";
totalText = "Total";
totalTextCol = 1;
}
return (new TranReportDao().GetCustomerBonusReport(user, searchBy, fromDate, toDate, zone, agent, membershipId, slab));
}
private ReportResult PrepareReport_20821700_3()
{
mergeColumnHead = true;
var fromDate = GetStatic.ReadQueryString("fromDate", "");
var toDate = GetStatic.ReadQueryString("toDate", "");
var cardType = GetStatic.ReadQueryString("cardType", "");
var user = GetStatic.GetUser();
fieldAlignment = "C||||C";
totalFields = "4";
totalText = "Total";
totalTextCol = 1;
return (new TranReportDao().GetAgentwiseCustomerApproval(user, fromDate, toDate, cardType));
}
private ReportResult PrepareReport_20833500()
{
string user = GetStatic.GetUser();
string zone = GetStatic.ReadQueryString("zone", "");
string district = GetStatic.ReadQueryString("district", "");
string location = GetStatic.ReadQueryString("location", "");
string agent = GetStatic.ReadQueryString("agent", "");
string securitytype = GetStatic.ReadQueryString("securitytype", "");
string groupby = GetStatic.ReadQueryString("groupby", "");
string isexpiry = GetStatic.ReadQueryString("isexpiry", "");
string date = GetStatic.ReadQueryString("date", "");
if (securitytype == "" && groupby == "aw")
{
fieldFormat = "|||||N|N|N|N";
fieldAlignment = "|||||R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "5|6|7|8";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "5|6|7|8";
subTotalTextCol = 1;
}
if ((securitytype == "cs" || securitytype == "bg" || securitytype == "fd" | securitytype == "mo") && groupby == "aw")
{
fieldFormat = "||||||N||";
fieldAlignment = "||||||R||";
totalText = "<b>Total</b>";
totalFields = "6";
totalTextCol = 1;
subTotalBy = 1;
subTotalText = "<i>SubTotal</i>";
subTotalFields = "6";
subTotalTextCol = 1;
}
if (securitytype == "na" && groupby == "aw")
{
fieldFormat = "|||||";
fieldAlignment = "|||||";
}
if (groupby == "summary")
{
fieldFormat = "||";
fieldAlignment = "||C";
totalText = "<b>Total</b>";
totalFields = "2";
totalTextCol = 1;
}
return (new TranReportDao().GetCreditSecurityRptForRegional(user, zone, district, location, agent, securitytype, groupby, isexpiry, date));
}
#region Regional Overseas TXN Summary Rpt
private ReportResult Prepare40112500TxnSummary()
{
string pCountry = GetStatic.ReadQueryString("pCountry", "");
string sAgent = GetStatic.ReadQueryString("sAgent", "");
string sBranch = GetStatic.ReadQueryString("sBranch", "");
string pAgent = GetStatic.ReadQueryString("pAgent", "");
string status = GetStatic.ReadQueryString("status", "");
string dateType = GetStatic.ReadQueryString("dateType", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string reportType = GetStatic.ReadQueryString("rptType", "");
string countryBankId = GetStatic.ReadQueryString("countryBankId", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
return (new TranReportDao().GetOverseasTxnSummaryReport(GetStatic.GetUser(), sBranch, sAgent, pCountry, pAgent, status, dateType, fromDate, toDate,
reportType, countryBankId, pageNumber, GetStatic.GetReportPagesize()));
}
private void txnsummaryrpt()
{
string reportType = GetStatic.ReadQueryString("rptType", "");
switch (reportType)
{
case "Detail":
GetRSPTxnDetailReport();
break;
case "BranchWise":
GetTxnBranchwiseReport();
break;
case "ReceivingAgentWise":
GetRSPTxnSummaryReport("ReceivingAgentWise");
break;
case "ReceivingAgentDetail":
GetTxnRecAgentDetailReport();
break;
case "ReceivingDateWise":
GetRSPTxnSummaryReport("ReceivingDateWise");
break;
case "SettlementReport":
GetRSPSettlmentReport();
break;
case "ReceivingAgentCountryWise":
GetRSPTxnSummaryReport("ReceivingAgentCountryWise");
break;
}
}
private void GetRSPTxnDetailReport()
{
var html = new StringBuilder();
DataTable rpt;
string rptTest = "";
for (int i = 0; i < reportResult.Result.Tables.Count - 3; i++)
{
if (i == 0)
{
tblCaption = "Transaction Summary Report";
fieldFormat = "||";
fieldAlignment = "|R|R";
}
if (i == 1)
{
tblCaption = "Summary Report";
fieldFormat = "||||N|";
fieldAlignment = "|||R|R|R";
totalText = "<b>Total</b>";
totalFields = "3|4";
}
rpt = reportResult.Result.Tables[i];
rptTest = GenerateReport(ref rpt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(rptTest);
}
rptDiv.InnerHtml = html.ToString();
}
private void GetRSPSettlmentReport()
{
var html = new StringBuilder();
DataTable rpt;
string rptTest = "";
for (int i = 0; i < reportResult.Result.Tables.Count - 3; i++)
{
if (i == 0)
{
tblCaption = "Summary Report";
fieldFormat = "|||N|N|N|N|N||N";
fieldAlignment = "|||R|R|R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "3|4|5|6|7|8|9";
}
if (i == 1)
{
tblCaption = "Settlment Summary Report";
fieldFormat = "||N";
fieldAlignment = "|R|R";
totalText = "<b>Net Settlement</b>";
totalFields = "1|2";
}
rpt = reportResult.Result.Tables[i];
rptTest = GenerateReport(ref rpt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(rptTest);
}
rptDiv.InnerHtml = html.ToString();
}
private void GetTxnRecAgentDetailReport()
{
var rptName = GetStatic.ReadQueryString("reportName", "").ToLower();
var html = new StringBuilder();
DataTable rpt;
string rptTest = "";
if (rptName == "oldtxnsummaryrpt")
{
fieldFormat = "|||N|N|N||N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R|R|L|R";
totalText = "<b>Total</b>";
totalFields = "2|3|4|5|7";
}
else
{
fieldFormat = "|||N|N|N|N|N||N";
fieldAlignment = "||R|R|R|R|R|R|R|R|R|R|L|R";
totalText = "<b>Total</b>";
totalFields = "|2|3|4|5|7|9";
}
for (int i = 0; i < reportResult.Result.Tables.Count - 3; i++)
{
if (i == 1)
tblCaption = "Cancel Transaction Detail";
rpt = reportResult.Result.Tables[i];
rptTest = GenerateReport(ref rpt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(rptTest);
}
rptDiv.InnerHtml = html.ToString();
}
private void GetRSPTxnSummaryReport(string reportType)
{
var html = new StringBuilder();
DataTable rpt;
string rptTest = "";
if (reportType == "BankWise")
{
fieldFormat = "||||N|N";
fieldAlignment = "|R|R|R|R|R";
subTotalBy = 0;
subTotalFields = "2|3|4|5";
subTotalText = "<b >Total</b>";
totalText = "<b>Grand Total</b>";
totalFields = "2|3|4|5";
}
else if (reportType == "ReceivingAgentWise")
{
fieldFormat = "||N|N|N||N";
fieldAlignment = "|R|R|R|R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "1|2|3|4|6";
}
else if (reportType == "ReceivingAgentCountryWise")
{
fieldFormat = "|||N|N|||";
fieldAlignment = "|R|R|R|R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "1|2|3|4|6";
}
else if (reportType == "ReceivingDateWise")
{
fieldFormat = "|||||N|N|N|N|N";
fieldAlignment = "|||||R|R|R|R|R|R|R|";
totalText = "<b>Total</b>";
totalFields = "6|7|8|9";
}
else if (reportType == "CashCollectionDetails")
{
fieldFormat = "||||||N|";
fieldAlignment = "||||C|C|R|";
totalText = "<b>Total</b>";
totalFields = "6";
}
else if (reportType == "bankCollectionDetail")
{
fieldFormat = "||||||N|";
fieldAlignment = "||||C|C|R|";
totalText = "<b>Total</b>";
totalFields = "6";
}
rpt = reportResult.Result.Tables[0];
rptTest = GenerateReport(ref rpt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(rptTest);
rptDiv.InnerHtml = html.ToString();
}
private void GetTxnBranchwiseReport()
{
var html = new StringBuilder();
DataTable rpt;
string rptTest = "";
fieldFormat = "||||||||||";
fieldAlignment = "||R|R|R|R|R|R|R|R";
totalText = "<b>Total</b>";
totalFields = "2|3|4|5|6|7|8|9";
for (int i = 0; i < reportResult.Result.Tables.Count - 3; i++)
{
if (i == 1)
tblCaption = "Cancel Transaction Detail";
rpt = reportResult.Result.Tables[i];
rptTest = GenerateReport(ref rpt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(rptTest);
}
rptDiv.InnerHtml = html.ToString();
}
#endregion Regional Overseas TXN Summary Rpt
private int GetPageNumber()
{
return
Convert.ToInt32(GetStatic.ReadNumericDataFromQueryString("pageNumber") == 0
? 1
: GetStatic.ReadNumericDataFromQueryString("pageNumber"));
}
#region Generate Report
public String GenerateReport(ref DataTable dt)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-us");
var ExcludeFieldList = new ArrayList();
foreach (var col in excludeColumns.Split('|'))
{
ExcludeFieldList.Add(col.ToLower());
}
ExcludeFieldList.Add("rowcolor");
var html = new StringBuilder("");
html.AppendLine("<div>");
html.AppendLine("<table style='table' class=\"" + cssClass +
"\" ");
if (tblCaption != "")
html.AppendLine("<tr><td style='td' colspan=\"" + (dt.Columns.Count + extraCol).ToString() +
"\"><strong>" + tblCaption + "</strong></td></tr>");
html.AppendLine(CreateReportHead(ref dt, mergeColumnHead, ref ExcludeFieldList));
html.AppendLine(CreateReportBody(ref dt, subTotalFields, totalFields, ref ExcludeFieldList, totalTextCol,
subTotalTextCol));
if (GetStatic.ReadQueryString("mode", "").ToLower() != "download")
{
html.AppendLine("<tr><td style='td' colspan=\"" + (dt.Columns.Count + extraCol) + "\" align=\"center\">");
if (totalPage == 0)
totalPage = 1;
html.AppendLine("<strong>Page " + (GetPageNumber() == 0 ? 1 : GetPageNumber()) + " of " + totalPage +
"</strong>");
html.AppendLine("</td></tr>");
}
html.AppendLine("</table>");
html.AppendLine("</div>");
return html.ToString();
}
private int SerialNo = 0;
private String CreateReportBody(ref DataTable dt, string subTotalFieldList, string totalFieldList,
ref ArrayList ExcludeFieldList, int totalTextCol, int subTotalTextCol)
{
int cnt = 0;
var body = new StringBuilder("");
var SerialNoColumnValue = "";
bool doSubTotal = subTotalBy > -1 ? true : false;
bool doTotal = totalFieldList != "" ? true : false;
string[] totalFieldsArray = totalFieldList.Replace(" ", "").Split('|');
var totalValues = new double[totalFieldsArray.Length];
string[] subTotalFieldsArray = subTotalFieldList.Replace(" ", "").Split('|');
var subTotalValues = new double[subTotalFieldsArray.Length];
string[] fieldFormatList = fieldFormat.Replace(" ", "").Split('|');
string tmpSubTotalText = "||";
var hasRowColorCol = dt.Columns.Contains("rowColor");
foreach (DataRow row in dt.Rows)
{
if (includeSerialNo)
{
SerialNo++;
SerialNoColumnValue = "<td style='td' align=\"right\">" + SerialNo.ToString() + "</td>";
}
else
{
SerialNoColumnValue = "";
}
if (doSubTotal)
{
if (tmpSubTotalText == "||")
tmpSubTotalText = row[subTotalBy].ToString();
if (tmpSubTotalText != row[subTotalBy].ToString())
{
body.AppendLine(CreateTotalRow(ref dt, subTotalText, subTotalBy, subTotalFieldsArray,
subTotalValues, fieldFormatList, fieldAlignment, fieldWrap,
ref ExcludeFieldList, subTotalTextCol, includeSerialNo));
tmpSubTotalText = row[subTotalBy].ToString();
for (int i = 0; i < subTotalValues.Length; i++)
{
subTotalValues[i] = 0;
}
}
}
if (useDBRowColorCode && hasRowColorCol)
{
body.AppendLine("<tr style=\"background:" + row["rowColor"].ToString() + ";\">");
}
else
{
body.AppendLine(++cnt % 2 == 1 ? "<tr>" : "<tr style=\"background: #F0F0F0;\">");
}
body.AppendLine(SerialNoColumnValue);
for (int i = 0; i < dt.Columns.Count; i++)
{
if (ExcludeFieldList.IndexOf(dt.Columns[i].ColumnName.ToLower()) > -1)
{
continue;
}
string format = GetFormat(fieldFormatList, i);
string data = row[i].ToString();
if (format != "")
{
double dataParse;
double.TryParse(row[i].ToString(), out dataParse);
data = dataParse < 0 ? GetStatic.ParseMinusValue(dataParse) : dataParse.ToString(format);
//Parse Minus Value
}
if (AllowDrillDown)
{
data = CreateLink(data);
}
string alignment = GetAlignment(fieldAlignment, i);
string noWrapProperty = GetNoWrapping(fieldWrap, i);
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
body.AppendLine("<td style='td; border: 1px solid;' " + alignment + noWrapProperty + ">" + data + "</td>");
else
body.AppendLine("<td style='td;' " + alignment + noWrapProperty + ">" + data + "</td>");
var data2 = row[i].ToString();
if (doTotal)
{
int pos = Array.IndexOf(totalFieldsArray, i.ToString());
if (pos >= 0)
{
double value;
double.TryParse(GetStatic.RemoveHtmlTagsRegex(data2), out value);
totalValues[pos] = totalValues[pos] + value;
}
}
if (doSubTotal)
{
int pos = Array.IndexOf(subTotalFieldsArray, i.ToString());
if (pos >= 0)
{
if (data2.IndexOf('<') > -1)
{
data2 = GetStatic.RemoveAllTags(data2);
}
double value;
double.TryParse(GetStatic.RemoveHtmlTagsRegex(data2), out value);
subTotalValues[pos] = subTotalValues[pos] + value;
}
}
}
body.AppendLine("</tr>");
}
if (doSubTotal)
{
body.AppendLine(CreateTotalRow(ref dt, subTotalText, subTotalBy, subTotalFieldsArray, subTotalValues,
fieldFormatList, fieldAlignment, fieldWrap, ref ExcludeFieldList,
totalTextCol, includeSerialNo));
}
if (doTotal)
{
if (grandTotal != 0.00)
{
if (totalPage == GetPageNumber())
body.AppendLine(CreatGrandTotalRow(ref dt, totalText, 0, totalFieldsArray, grandTotal,
fieldFormatList,
fieldAlignment, fieldWrap, grandTotal, grandTotalUsd,
grandTotal_1, ref ExcludeFieldList, includeSerialNo));
}
else
{
body.AppendLine(CreateTotalRow(ref dt, totalText, 0, totalFieldsArray, totalValues, fieldFormatList,
fieldAlignment, fieldWrap, ref ExcludeFieldList, totalTextCol, includeSerialNo));
}
}
return body.ToString();
}
private static String CreateTotalRow(ref DataTable dt, string totalText, int totalFieldIndex,
string[] totalFields, Double[] totalValues, string[] fieldFormatList,
string fieldAlignmentList, string fieldWrapList,
ref ArrayList ExcludeFieldList, int totalTextCol, bool includeSerialNo)
{
var rowText = new StringBuilder("");
rowText.AppendLine("<tr>");
if (includeSerialNo)
{
if (totalText.IndexOf("<td>") == -1)
rowText.AppendLine("<td></td>");
}
for (int i = 0; i < dt.Columns.Count; i++)
{
if (ExcludeFieldList.IndexOf(dt.Columns[i].ColumnName.ToLower()) > -1)
{
continue;
}
int pos = Array.IndexOf(totalFields, i.ToString());
string data = "";
string alignment = "";
string nowrapProperty = "";
if (pos >= 0)
{
string format = GetFormat(fieldFormatList, i);
data = totalValues[pos] < 0
? GetStatic.ParseMinusValue(totalValues[pos])
: totalValues[pos].ToString(format.ToUpper());
alignment = GetAlignment(fieldAlignmentList, i);
nowrapProperty = GetNoWrapping(fieldWrapList, i);
}
if (totalTextCol > -1)
{
totalFieldIndex = totalTextCol;
}
if (i == totalFieldIndex) data = totalText;
rowText.AppendLine("<td style='td' " + alignment + nowrapProperty + "><b>" + data + "</b></td>");
}
rowText.AppendLine("</tr>");
return rowText.ToString();
}
private static String CreatGrandTotalRow(ref DataTable dt, string totalText, int totalFieldIndex,
string[] totalFields, Double totalValues, string[] fieldFormatList,
string fieldAlignmentList, string fieldWrapList, Double grandTotal,
Double grandTotalUsd, Double grandTotal_1,
ref ArrayList ExcludeFieldList, bool includeSerialNo)
{
var rowText = new StringBuilder("");
rowText.AppendLine("<tr>");
if (includeSerialNo)
{
if (totalText.IndexOf("<td>") == -1)
rowText.AppendLine("<td></td>");
}
for (int i = 0; i < dt.Columns.Count; i++)
{
if (ExcludeFieldList.IndexOf(dt.Columns[i].ColumnName.ToLower()) > -1)
{
continue;
}
int pos = Array.IndexOf(totalFields, i.ToString());
string data = "";
string alignment = "";
string nowrapProperty = "";
if (pos >= 0)
{
data = GetStatic.ParseMinusValue(grandTotal.ToString());
alignment = GetAlignment(fieldAlignmentList, i);
nowrapProperty = GetNoWrapping(fieldWrapList, i);
}
if (i == totalFieldIndex)
data = totalText;
if (i == 9 && grandTotal != 0.00)
{
rowText.AppendLine("<td style='td' align=\"right\"><b>" + GetStatic.ParseMinusValue(grandTotal) +
"</b></td>");
}
else if (i == 11 && grandTotalUsd != 0.00)
{
rowText.AppendLine("<td style='td' align=\"right\"><b>" + GetStatic.ParseMinusValue(grandTotalUsd) +
"</b></td>");
}
else if (i == 13 && grandTotal_1 != 0.00)
{
rowText.AppendLine("<td style='td' align=\"right\"><b>" + GetStatic.ParseMinusValue(grandTotal_1) +
"</b></td>");
}
else
{
rowText.AppendLine("<td style='td' " + alignment + nowrapProperty + "><b>" + data + "</b></td>");
}
}
rowText.AppendLine("</tr>");
return rowText.ToString();
}
private static string GetFormat(string[] fieldFormatList, int currFieldIndex)
{
return fieldFormatList.Length > currFieldIndex ? fieldFormatList[currFieldIndex] : "";
//return ( pos == -1 ? "": fieldFormatList[pos]);
}
private static string GetNoWrapping(string fieldWrapList, int currFieldIndex)
{
if (fieldWrapList == "")
return "";
string[] wrapListArray = fieldWrapList.Split('|');
string isWrap = wrapListArray.Length > currFieldIndex ? wrapListArray[currFieldIndex] : "";
string noWrapValue = "";
if (isWrap == "Y")
noWrapValue = " nowrap = \"nowrap\"";
return noWrapValue;
}
private static string GetAlignment(string fieldAlignmentList, int currFieldIndex)
{
if (fieldAlignmentList == "")
return "";
string[] alignListArray = fieldAlignmentList.Split('|');
string alignName = alignListArray.Length > currFieldIndex ? alignListArray[currFieldIndex] : "";
string align = "";
switch (alignName.ToUpper())
{
case "R":
align = " align=\"right\"";
break;
case "L":
align = " align=\"left\"";
break;
case "C":
align = " align=\"center\"";
break;
default:
break;
}
return align;
}
private static string CreateLink(string data)
{
return "";
}
private String CreateReportHead(ref DataTable dt, Boolean merge, ref ArrayList ExcludeFieldList)
{
var head = new StringBuilder("");
var SerialNoColumnHead = "";
if (includeSerialNo)
{
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
SerialNoColumnHead = "<th style='th; border: 1px solid;'>SN.</th>";
else
SerialNoColumnHead = "<th style='th'>SN.</th>";
extraCol = 1;
}
if (!merge)
{
head.AppendLine("<tr>");
head.AppendLine(SerialNoColumnHead);
foreach (DataColumn col in dt.Columns)
{
if (ExcludeFieldList.IndexOf(col.ColumnName.ToLower()) > -1)
{
extraCol--;
continue;
}
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
head.AppendLine("<th style='th; border: 1px solid;'>" + col.ColumnName + "</th>");
else
head.AppendLine("<th style='th'>" + col.ColumnName + "</th>");
}
head.AppendLine("</tr>");
}
else
{
var columns = new Dictionary<string, string>();
foreach (DataColumn col in dt.Columns)
{
if (ExcludeFieldList.IndexOf(col.ColumnName.ToLower()) > -1)
{
extraCol--;
continue;
}
var splitPos = col.ColumnName.IndexOf('_');
if (splitPos == -1)
{
columns.Add(col.ColumnName, col.ColumnName);
}
else
{
var key = col.ColumnName.Substring(0, splitPos);
var value = col.ColumnName.Substring(splitPos + 1, col.ColumnName.Length - splitPos - 1);
if (!columns.ContainsKey(key))
{
columns.Add(key, value);
}
else
{
columns[key] = columns[key] + "|" + value;
}
}
}
var row1 = "";
var row2 = "";
foreach (var kvp in columns)
{
string[] values = kvp.Value.Split('|');
if (values.Length == 1)
{
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
row1 = row1 + "<th style='th; border: 1px solid;' rowspan=\"2\">" + kvp.Key + "</th>";
else
row1 = row1 + "<th style='th' rowspan=\"2\">" + kvp.Key + "</th>";
}
else
{
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
row1 = row1 + "<th style='th; border: 1px solid;' align=\"center\" colspan=\"" + values.Length + "\">" + kvp.Key +
"</th>";
else
row1 = row1 + "<th style='th' align=\"center\" colspan=\"" + values.Length + "\">" + kvp.Key +
"</th>";
foreach (string value in values)
{
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
row2 = row2 + "<th style='th; border: 1px solid;'>" + value + "</th>";
else
row2 = row2 + "<th style='th'>" + value + "</th>";
}
}
}
if (includeSerialNo)
{
if (GetStatic.ReadQueryString("mode", "").ToLower() == "download")
SerialNoColumnHead = "<th style='th; border: 1px solid;' rowspan=\"2\">SN.</th>";
else
SerialNoColumnHead = "<th style='th' rowspan=\"2\">SN.</th>";
}
head.AppendLine("<tr>" + SerialNoColumnHead + row1 + "</tr>");
head.AppendLine("<tr>" + row2 + "</tr>");
}
return head.ToString();
}
#endregion Generate Report
#region Prepare Agent SOA report
private ReportResult PrepareAgentSOA()
{
string reportType = GetStatic.ReadQueryString("reportType", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
switch (reportType)
{
case "d":
fieldAlignment = "C|C|L|R|R|R|R|R||";
fieldFormat = "|||N|N|N|N|N|";
fieldWrap = "||Y";
break;
case "s":
fieldAlignment = "L|R|R|R|R|R|R|";
fieldFormat = "||N|N|N|N|N|";
fieldWrap = "Y";
break;
case "ds":
fieldAlignment = "L|L|R|R|R|R|R|R|";
fieldFormat = "|||N|N|N|N|N|";
fieldWrap = "|Y";
break;
}
mergeColumnHead = true;
string agentId = GetStatic.ReadQueryString("agentId", "-1");
string fromdate = GetStatic.ReadQueryString("fromdate", "");
string todate = GetStatic.ReadQueryString("todate", "");
return
(new TranReportDao().GetAgentSOAReport(GetStatic.GetUser(), reportType, fromdate, todate, agentId,
(pageNumber == "" ? "1" : pageNumber),
GetStatic.GetReportPagesize(), GetStatic.GetSessionId()));
}
private ReportResult PrepareAgentSoaDrilldown()
{
string reportType = GetStatic.ReadQueryString("reportType", "");
string voucherType = GetStatic.ReadQueryString("voucherType", "");
string pageNumber = GetStatic.ReadQueryString("pageNumber", "");
// totalText = "<b>Total</b>";
//totalFields = "7";
//fieldFormat = "|||N|N|N|N|N";
//fieldAlignment = "L|L|L|R|R|R|R|R";
switch (reportType)
{
case "d":
fieldAlignment = "C|C|L|R|R|R|R|R||";
fieldFormat = "|||N|N|N|N|N|";
fieldWrap = "||Y";
break;
case "s":
fieldAlignment = "L|R|R|R|R|R|R|";
fieldFormat = "||N|N|N|N|N|";
fieldWrap = "Y";
break;
case "ds":
fieldAlignment = "L|L|R|R|R|R|R|R|";
fieldFormat = "|||N|N|N|N|N|";
fieldWrap = "|Y";
break;
}
mergeColumnHead = true;
string agentId = GetStatic.ReadQueryString("agentId", "-1");
string fromdate = GetStatic.ReadQueryString("fromdate", "");
string todate = GetStatic.ReadQueryString("todate", "");
return
(new TranReportDao().GetAgentSoaDrilldownReport(GetStatic.GetUser(), reportType, fromdate, todate,
agentId, voucherType,
(pageNumber == "" ? "1" : pageNumber),
GetStatic.GetReportPagesize()));
}
#endregion Prepare Agent SOA report
#region prepare agent statement report
private ReportResult PrepareAgentStmtReport()
{
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
//mergeColumnHead = true;
//subTotalBy = 0;
//subTotalText = "<b><i> SubTotal </i></b>";
//subTotalFields = "1";
totalText = "<b>Total</b>";
totalFields = "3|4";
fieldFormat = "|||N|N|N";
fieldAlignment = "|L|L|R|R|R";
string agentId = GetStatic.ReadQueryString("agentId", "");
if (agentId == "")
{
reportResult.Msg = "Please pick a agent..";
PrintError();
return reportResult;
}
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
return
(new TranReportDao().GetAgentStmtResult(agentId, fromDate, toDate, GetStatic.GetReportPagesize(),
pageNumber, GetStatic.GetUser()));
}
#endregion prepare agent statement report
#region prepare agent balance report
private ReportResult PrepareAgentBalReport()
{
mergeColumnHead = true;
//subTotalBy = 0;
//subTotalText = "<b><i> SubTotal </i></b>";
//subTotalFields = "1";
totalText = "<b>Total</b>";
totalFields = "1|3|4|6|7|9|10|12|14|16";
fieldFormat = "|N||N|N||N|N||N|N||N||N||N|";
fieldAlignment = "L|R|L|R|R|R|R|R|R|R|R|R|R|R|R|R|R|L";
fieldWrap = "Y";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string agentId = GetStatic.ReadQueryString("agentId", "");
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
return
(new TranReportDao().GetAgentBalResult(agentId, fromDate, toDate, GetStatic.GetReportPagesize(),
pageNumber, GetStatic.GetUser()));
}
private ReportResult PrepareExchangeRateReport()
{
mergeColumnHead = true;
fieldAlignment = "C|L|L|L|L|L|L|L|L|R|R|R|R|R|L|R|R|R|R|R|R|R|L";
fieldWrap = "||||||||||||||||||||||Y";
string pageNumber = GetStatic.ReadQueryString("pageNumber", "1");
string cCountry = GetStatic.ReadQueryString("cCountry", "");
string pCountry = GetStatic.ReadQueryString("pCountry", "");
string cAgent = GetStatic.ReadQueryString("cAgent", "");
string pAgent = GetStatic.ReadQueryString("pAgent", "");
string cAgentGroup = GetStatic.ReadQueryString("cAgentGroup", "");
string pAgentGroup = GetStatic.ReadQueryString("pAgentGroup", "");
string cBranch = GetStatic.ReadQueryString("cBranch", "");
string pBranch = GetStatic.ReadQueryString("pCountpBranchry", "");
string cBranchGroup = GetStatic.ReadQueryString("cBranchGroup", "");
string pBranchGroup = GetStatic.ReadQueryString("pBranchGroup", "");
return
(new ExRateReportDao().GetExRateReport(cCountry, pCountry, cAgent, pAgent, cAgentGroup, pAgentGroup,
cBranch,
pBranch, cBranchGroup, pBranchGroup,
GetStatic.GetReportPagesize(), pageNumber, GetStatic.GetUser()));
}
private ReportResult PrepareTranAccessReport()
{
fieldFormat = "|||||";
fieldAlignment = "C|L|L|L|L|C";
string fromDate = GetStatic.ReadQueryString("fromDate", "");
string toDate = GetStatic.ReadQueryString("toDate", "");
string reportType = GetStatic.ReadQueryString("reportType", "");
string user = GetStatic.GetUser();
return (new TranReportDao().GetTranAccessReport(user, fromDate, toDate, reportType));
}
#endregion prepare agent balance report
#region prepare agent balance drill down report
private ReportResult PrepareAgentBalDrillDownReport()
{
//mergeColumnHead = true;
//subTotalBy = 0;
//subTotalText = "<b><i> SubTotal </i></b>";
//subTotalFields = "1";
totalText = "<b>Total</b>";
totalFields = "2|3";
fieldFormat = "||N|N";
fieldAlignment = "L|R|R|R|L|L|L|R";
string agentId = GetStatic.ReadQueryString("agentId", "");
string tranId = GetStatic.ReadQueryString("tranId", "");
string fromdate = GetStatic.ReadQueryString("fromdate", "");
string flag = GetStatic.ReadQueryString("flag", "");
return (new TranReportDao().GetAgentBalDrillDownResult(agentId, fromdate, tranId, flag));
}
#endregion prepare agent balance drill down report
#region Print Report
private void PrintEmployeeStatementReport()
{
//totalText = "<b>Total</b>";
//totalFields = "2|3|4|5|6|7|8";
//fieldFormat = "||N|N|N|N|N|N|N";
//fieldAlignment = "L|L|R|R|R|R|R|R|R";
const string pStart = "<p style=\"page-break-after: always\">";
const string pEnd = "</p>";
var html = new StringBuilder();
for (int i = 0; i < reportResult.Result.Tables.Count - 4; i++)
{
string employeeCode = reportResult.Result.Tables[i].Rows[0]["employeeCode1"].ToString();
string employeeName = reportResult.Result.Tables[i].Rows[0]["employeeName"].ToString();
string companyName = reportResult.Result.Tables[i].Rows[0]["companyName"].ToString();
string fromDate = reportResult.Result.Tables[i].Rows[0]["fromDate"].ToString();
string toDate = reportResult.Result.Tables[i].Rows[0]["toDate"].ToString();
i++;
DataTable rptDt = reportResult.Result.Tables[i];
string reportText = GenerateReport(ref rptDt);
html.AppendLine(pStart);
html.AppendLine("<div class = \"employee-div\">");
html.AppendLine("Company: " + companyName);
html.AppendLine("<br />");
html.AppendLine("Account No: " + employeeCode);
html.AppendLine("<br />");
html.AppendLine(employeeName);
html.AppendLine("<br />");
html.AppendLine("Statement As Of: " + fromDate);
html.AppendLine(" To " + toDate);
html.AppendLine("</div>");
html.AppendLine(reportText);
html.AppendLine(pEnd);
}
rptDiv.InnerHtml = html.ToString();
head.Visible = false;
filters.Visible = false;
hr2.Visible = false;
}
private void PrintUserMatrixReport()
{
const string pStart = "<p style=\"page-break-after: always\">";
const string pEnd = "</p>";
var html = new StringBuilder();
cssClass = "table table-responsive table-bordered table-striped";
int employeeTable = 0;
if (reportResult.Result.Tables[0].Rows == null || reportResult.Result.Tables[0].Rows.Count == 0)
{
// GetStatic.AlertMessage(this, "Sorry ! User is not Active ");
PrintError();
}
foreach (DataRow dr in reportResult.Result.Tables[0].Rows)
{
string name = dr["Name"].ToString();
string department = dr["department"].ToString();
string branch = dr["branch"].ToString();
string supervisor = dr["supervisor"].ToString();
DataTable rptDt = reportResult.Result.Tables[++employeeTable];
string reportText = GenerateReport(ref rptDt).Replace("<td", "<td nowrap = \"nowrap\"");
html.AppendLine(pStart);
html.AppendLine("<div class = \"welcome-div\">");
html.AppendLine("User Name: <b>" + name + "</b>");
html.AppendLine("<br />");
//html.AppendLine("Department: <b>" + department + "</b>");
//html.AppendLine("<br />");
html.AppendLine("Agent/Branch Name: <b>" + branch + "</b>");
//html.AppendLine("<br />");
//html.AppendLine("Supervisor: <b>" + supervisor + "</b>");
html.AppendLine("</div>");
html.AppendLine(reportText);
html.AppendLine(pEnd);
}
rptDiv.InnerHtml = html.ToString();
head.Visible = true;
filters.Visible = false;
hr2.Visible = false;
}
#endregion Print Report
// Customer Report By Introducer
private ReportResult CustomerByIntroducerReport()
{
string fDate = GetStatic.ReadQueryString("from", "");
string tDate = GetStatic.ReadQueryString("to", "");
string rtype = GetStatic.ReadQueryString("rptType", "");
//string customerType = GetStatic.ReadQueryString("searchType", "");
string customerId = GetStatic.ReadQueryString("customerId", "");
string flag = GetStatic.ReadQueryString("flag", "");
string istranmobile = GetStatic.ReadQueryString("imobile", "");
//mergeColumnHead = true;
//fieldFormat = "|||N|N|N|N|N|N|N|N|N|N|N|N";
//fieldAlignment = "|C|C||R|R|R|R|R|R|R|R|R|R";
//totalText = "<b>Grand Total</b>";
//totalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14|15";
//subTotalBy = 0;
//subTotalFields = "2|3|4|5|6|7|8|9|10|11|12|13|14|15";
//subTotalText = "<b>Sub Total</b>";
return (new IntroducerCommissionSetupDao().GetCustomerByIntroducerReport(GetStatic.GetUser(), flag, fDate, tDate, rtype, customerId, istranmobile));
}
private ColDefinatoin GetColumnNameToIndex(DataTable dt, string totalFieldNameList, string subTotalFieldNameList)
{
var r = new ColDefinatoin();
var fList = new ArrayList();
r.Alignment = "";
r.Format = " ";
r.SubTotalFields = " ";
r.TotalFields = " ";
for (var i = 0; i < dt.Columns.Count; i++)
{
var cp = new ColProperties(i);
fList.Add(cp);
}
var cList = totalFieldNameList.Split('|');
foreach (var colName in cList)
{
var pos = dt.Columns.IndexOf(colName);
if (pos >= 0)
{
var cp = (ColProperties)fList[pos];
cp.IsTotal = true;
fList[pos] = cp;
}
}
foreach (var colName in cList)
{
var pos = dt.Columns.IndexOf(colName);
pos = pos - 1;
if (pos >= 0)
{
var cp = (ColProperties)fList[pos];
cp.IsNumeric = true;
fList[pos] = cp;
}
}
cList = subTotalFieldNameList.Split('|');
foreach (var colName in cList)
{
var pos = dt.Columns.IndexOf(colName);
if (pos >= 0)
{
var cp = (ColProperties)fList[pos];
cp.IsSubTotal = true;
fList[pos] = cp;
}
}
foreach (ColProperties itm in fList)
{
r.Alignment = r.Alignment + (r.Alignment.Length > 0 ? "|" : "") +
((itm.IsSubTotal || itm.IsTotal) ? "R" : "L");
r.Format = r.Format + (r.Format.Length > 0 ? "|" : "") + ((itm.IsNumeric) ? "N" : "");
r.SubTotalFields = r.SubTotalFields + (r.SubTotalFields.Length > 0 ? "|" : "") +
(itm.IsSubTotal ? itm.Index.ToString() : "");
r.TotalFields = r.TotalFields + (r.TotalFields.Length > 0 ? "|" : "") +
(itm.IsTotal ? itm.Index.ToString() : "");
}
return r;
}
public class ColDefinatoin
{
public string TotalFields { get; set; }
public string SubTotalFields { get; set; }
public string Alignment { get; set; }
public string Format { get; set; }
}
public class ColProperties
{
public int Index { get; set; }
public bool IsTotal { get; set; }
public bool IsNumeric { get; set; }
public bool IsSubTotal { get; set; }
public ColProperties()
{
}
public ColProperties(int index)
{
Index = index;
IsTotal = false;
IsSubTotal = false;
IsNumeric = false;
}
}
}
}