コード例 #1
0
        public List <DynamicReportCommon> GetManualCommissionReport(string Userid)
        {
            var    DynamicReportCommons = new List <DynamicReportCommon>();
            string sql = "sproc_commission_report @flag = 'a'";

            sql += ", @user_id =" + DAO.FilterString(Userid);
            var dbres = DAO.ExecuteDataTable(sql);

            if (dbres != null)
            {
                foreach (DataRow dr in dbres.Rows)
                {
                    DynamicReportCommon dynamicReport = new DynamicReportCommon();
                    dynamicReport.TxnDate          = dr["Txn_Date"].ToString();
                    dynamicReport.TxnType          = dr["Txn_Type"].ToString();
                    dynamicReport.Remarks          = dr["Remarks"].ToString();
                    dynamicReport.ProductName      = dr["product_label"].ToString();
                    dynamicReport.Amount           = dr["amount"].ToString();
                    dynamicReport.CommissionEarned = dr["Commissionearned"].ToString();

                    DynamicReportCommons.Add(dynamicReport);
                }
            }
            return(DynamicReportCommons);
        }
コード例 #2
0
        public List <DynamicReportCommon> GetPendingReport()
        {
            var    DynamicReportCommons = new List <DynamicReportCommon>();
            string sql = "sproc_topup_report @flag = 'p'";
            //sql += (string.IsNullOrEmpty(AgentId) ? "" : ", @agent_id =" + DAO.FilterString(AgentId));
            var dbres = DAO.ExecuteDataTable(sql);

            if (dbres != null)
            {
                foreach (DataRow dr in dbres.Rows)
                {
                    DynamicReportCommon dynamicReport = new DynamicReportCommon();
                    dynamicReport.TxnId         = dr["txnid"].ToString();
                    dynamicReport.ProductName   = dr["product_label"].ToString();
                    dynamicReport.GrandparentId = dr["grand_parent_id"].ToString();
                    dynamicReport.ParentId      = dr["parent_id"].ToString();
                    dynamicReport.AgentId       = dr["agent_id"].ToString();
                    dynamicReport.SubscriberNo  = dr["subscriber_no"].ToString();
                    dynamicReport.Amount        = dr["amount"].ToString();
                    dynamicReport.TxnStatus     = dr["txnstatus"].ToString();
                    dynamicReport.UserId        = dr["user_id"].ToString();
                    dynamicReport.TxnDate       = dr["txndate"].ToString();
                    dynamicReport.Remarks       = dr["agent_remarks"].ToString();

                    DynamicReportCommons.Add(dynamicReport);
                }
            }
            return(DynamicReportCommons);
        }
コード例 #3
0
        public ActionResult PendingTransactionDetail(string ID = "", string TxnId = "")
        {
            DynamicReportModel  dynamicReportModel   = new DynamicReportModel();
            DynamicReportCommon dynamicReportCommons = new DynamicReportCommon();
            string id    = ID.DecryptParameter();
            string txnId = TxnId;

            if (!String.IsNullOrEmpty(id))
            {
                dynamicReportCommons = _dynamicReport.GetTransactionReportDetail(txnId, id);
            }
            dynamicReportModel = dynamicReportCommons.MapObject <DynamicReportModel>();
            return(View(dynamicReportModel));
        }
コード例 #4
0
        public DynamicReportCommon GetTransactionReportDetail(string TxnId, string AgentId = "")
        {
            DynamicReportCommon dynamicReport = new DynamicReportCommon();
            string sql = "sproc_topup_report @flag = 'rct', @txn_id =" + DAO.FilterString(TxnId);

            sql += (string.IsNullOrEmpty(AgentId) ? "" : ", @agent_id =" + DAO.FilterString(AgentId));
            var dr = DAO.ExecuteDataRow(sql);

            if (dr != null)
            {
                dynamicReport.TxnId                 = dr["txnid"].ToString();
                dynamicReport.ProductName           = dr["product_label"].ToString();
                dynamicReport.CompanyId             = dr["company_id"].ToString();
                dynamicReport.Company               = dr["company"].ToString();
                dynamicReport.TxnType               = dr["txn_type"].ToString();
                dynamicReport.AgentId               = dr["agent_id"].ToString();
                dynamicReport.SubscriberNo          = dr["subscriber_no"].ToString();
                dynamicReport.Amount                = dr["amount"].ToString();
                dynamicReport.ServiceCharge         = dr["service_charge"].ToString();
                dynamicReport.BonusAmount           = dr["bonus_amt"].ToString();
                dynamicReport.Status                = dr["status"].ToString();
                dynamicReport.StatusCode            = dr["status_code"].ToString();
                dynamicReport.UserId                = dr["user_id"].ToString();
                dynamicReport.CreatedLocalDate      = dr["created_local_date"].ToString();
                dynamicReport.CreatedBy             = dr["created_by"].ToString();
                dynamicReport.CreatedPlatform       = dr["created_platform"].ToString();
                dynamicReport.AdminCommission       = dr["admin_commission"].ToString();
                dynamicReport.AgentCommission       = dr["agent_commission"].ToString();
                dynamicReport.ParentCommission      = dr["parent_commission"].ToString();
                dynamicReport.GrandParentCommission = dr["grand_parent_commission"].ToString();
                dynamicReport.TxnRewardPoint        = dr["txn_reward_point"].ToString();
                dynamicReport.CustomerId            = dr["customer_id"].ToString();
                dynamicReport.CustomerName          = dr["customer_name"].ToString();
                dynamicReport.PlanId                = dr["plan_id"].ToString();
                dynamicReport.PlanName              = dr["plan_name"].ToString();
                dynamicReport.ExtraField1           = dr["extra_field1"].ToString();
                dynamicReport.ExtraField2           = dr["extra_field2"].ToString();
                dynamicReport.ExtraField3           = dr["extra_field3"].ToString();
                dynamicReport.ExtraField4           = dr["extra_field4"].ToString();
                dynamicReport.AdminRemarks          = dr["admin_remarks"].ToString();
                dynamicReport.GatewayName           = dr["gatewayname"].ToString();
            }
            return(dynamicReport);
        }
コード例 #5
0
        public List <DynamicReportCommon> GetSettlementReport(DynamicReportFilter model)
        {
            var    DynamicReportCommons = new List <DynamicReportCommon>();
            string sql = "sproc_admin_settlement_report  @flag = 'a'";

            sql += ", @user_id =" + DAO.FilterString(model.UserId);
            sql += (string.IsNullOrEmpty(model.FromDate) ? "" : ", @from_Date =" + DAO.FilterString(model.FromDate));
            sql += (string.IsNullOrEmpty(model.ToDate) ? "" : ", @to_Date =" + DAO.FilterString(model.ToDate));
            //sql += (string.IsNullOrEmpty(DRW.ProductName) ? "" : ", @service =" + DAO.FilterString(DRW.ProductName));
            //sql += (string.IsNullOrEmpty(DRW.TxnStatus) ? "" : ", @txnStatus =" + DAO.FilterString(DRW.TxnStatus));
            //sql += (string.IsNullOrEmpty(DRW.TxnType) ? "" : ", @txnType =" + DAO.FilterString(DRW.TxnType));
            //sql += (string.IsNullOrEmpty(DRW.CustomerName) ? "" : ", @username ="******"txn_id"].ToString();// dr["Txn_Dates"].ToString();
                    dynamicReport.TxnDate = dr["Txn_Date"].ToString();
                    dynamicReport.TxnType = dr["Txn_Type"].ToString();
                    //dynamicReport.TxnMode = dr["txn_mode"].ToString();
                    //dynamicReport.CreatedLocalDate = dr["CreatedDate"].ToString();
                    dynamicReport.Remarks = dr["Remarks"].ToString();
                    //dynamicReport.TxnTitle = dr["txn_title"].ToString();
                    dynamicReport.Debit  = dr["DR"].ToString();
                    dynamicReport.Credit = dr["Cr"].ToString();
                    dynamicReport.Amount = dr["Balance"].ToString();
                    //dynamicReport.Amount = dr["Settlement_Amount"].ToString();
                    dynamicReport.Currency = dr["CCY"].ToString();

                    DynamicReportCommons.Add(dynamicReport);
                }
            }
            return(DynamicReportCommons);
        }
コード例 #6
0
        public List <DynamicReportCommon> GetTransactionReport(DynamicReportFilter model)
        {
            var    DynamicReportCommons = new List <DynamicReportCommon>();
            string sql = "sproc_topup_report @flag = 's'";

            sql += (string.IsNullOrEmpty(model.AgentId) ? "" : ", @agent_id =" + DAO.FilterString(model.AgentId));
            sql += (string.IsNullOrEmpty(model.TxnId) ? "" : ", @txn_id =" + DAO.FilterString(model.TxnId));
            sql += (string.IsNullOrEmpty(model.ProductId) ? "" : ", @product_id =" + DAO.FilterString(model.ProductId));
            sql += (string.IsNullOrEmpty(model.GatewayId) ? "" : ", @gateway_id =" + DAO.FilterString(model.GatewayId));
            sql += (string.IsNullOrEmpty(model.TxnStatus) ? "" : ", @status =" + DAO.FilterString(model.TxnStatus));
            sql += (string.IsNullOrEmpty(model.FromDate) ? "" : ", @from_date =" + DAO.FilterString(model.FromDate));
            sql += (string.IsNullOrEmpty(model.ToDate) ? "" : ", @to_date =" + DAO.FilterString(model.ToDate));
            var dbres = DAO.ExecuteDataTable(sql);

            if (dbres != null)
            {
                foreach (DataRow dr in dbres.Rows)
                {
                    DynamicReportCommon dynamicReport = new DynamicReportCommon();
                    dynamicReport.TxnId         = dr["txnid"].ToString();
                    dynamicReport.ProductName   = dr["product_label"].ToString();
                    dynamicReport.GrandparentId = dr["grand_parent_id"].ToString();
                    dynamicReport.ParentId      = dr["parent_id"].ToString();
                    dynamicReport.AgentId       = dr["agent_id"].ToString();
                    dynamicReport.SubscriberNo  = dr["subscriber_no"].ToString();
                    dynamicReport.Amount        = dr["amount"].ToString();
                    dynamicReport.TxnStatus     = dr["txnstatus"].ToString();
                    dynamicReport.UserId        = dr["user_id"].ToString();
                    dynamicReport.TxnDate       = dr["txndate"].ToString();
                    dynamicReport.Remarks       = dr["agent_remarks"].ToString();

                    DynamicReportCommons.Add(dynamicReport);
                }
            }
            return(DynamicReportCommons);
        }
コード例 #7
0
        public DynamicReportCommon GetActivityDetail(string txnid, string flag)
        {
            var    report = new DynamicReportCommon();
            string sql    = "sproc_settlement_report_2  @flag =" + DAO.FilterString(flag);

            sql += ", @txn_id =" + DAO.FilterString(txnid);
            var dr = DAO.ExecuteDataRow(sql);

            if (dr != null)
            {
                if (flag.ToUpper() == "T")
                {
                    report.TxnType          = dr["txntype"].ToString();
                    report.CustomerName     = dr["agent_name"].ToString();
                    report.Amount           = dr["Amount"].ToString();
                    report.Currency         = dr["currency_code"].ToString();
                    report.Remarks          = dr["agent_remarks"].ToString();
                    report.BankName         = dr["bank_name"].ToString();
                    report.CreatedLocalDate = dr["created_local_date"].ToString();
                    // report.CreatedBy = dr["created_by"].ToString();
                    report.CreatedPlatform = dr["created_platform"].ToString();
                }
                else if (flag.ToUpper() == "M")
                {
                    report.TxnId                 = dr["txnid"].ToString();
                    report.ProductName           = dr["product_label"].ToString();
                    report.CompanyId             = dr["company_id"].ToString();
                    report.Company               = dr["company"].ToString();
                    report.TxnType               = dr["txn_type"].ToString();
                    report.AgentId               = dr["agent_id"].ToString();
                    report.SubscriberNo          = dr["subscriber_no"].ToString();
                    report.Amount                = dr["amount"].ToString();
                    report.ServiceCharge         = dr["service_charge"].ToString();
                    report.BonusAmount           = dr["bonus_amt"].ToString();
                    report.Status                = dr["status"].ToString();
                    report.StatusCode            = dr["status_code"].ToString();
                    report.UserId                = dr["user_id"].ToString();
                    report.CreatedLocalDate      = dr["created_local_date"].ToString();
                    report.CreatedBy             = dr["created_by"].ToString();
                    report.CreatedPlatform       = dr["created_platform"].ToString();
                    report.AdminCommission       = dr["admin_commission"].ToString();
                    report.AgentCommission       = dr["agent_commission"].ToString();
                    report.ParentCommission      = dr["parent_commission"].ToString();
                    report.GrandParentCommission = dr["grand_parent_commission"].ToString();
                    report.TxnRewardPoint        = dr["txn_reward_point"].ToString();
                    report.CustomerId            = dr["customer_id"].ToString();
                    report.CustomerName          = dr["customer_name"].ToString();
                    report.PlanId                = dr["plan_id"].ToString();
                    report.PlanName              = dr["plan_name"].ToString();
                    report.ExtraField1           = dr["extra_field1"].ToString();
                    report.ExtraField2           = dr["extra_field2"].ToString();
                    report.ExtraField3           = dr["extra_field3"].ToString();
                    report.ExtraField4           = dr["extra_field4"].ToString();
                    report.AdminRemarks          = dr["admin_remarks"].ToString();
                    report.GatewayName           = dr["gatewayname"].ToString();
                }
                else if (flag.ToUpper() == "F")
                {
                    report.TxnType          = dr["txntype"].ToString();
                    report.CustomerName     = dr["agent_name"].ToString();
                    report.Amount           = dr["Amount"].ToString();
                    report.Currency         = dr["currency_code"].ToString();
                    report.Remarks          = dr["agent_remarks"].ToString();
                    report.BankName         = dr["bank_name"].ToString();
                    report.ServiceCharge    = dr["service_charge"].ToString();
                    report.CreatedLocalDate = dr["created_local_date"].ToString();
                    // report.CreatedBy = dr["created_by"].ToString();
                    report.CreatedPlatform = dr["created_platform"].ToString();
                }
            }
            return(report);
        }