Example #1
0
        public List <AdminCommissionReportCommon> GetAdminCommissionDetailList(string ProductId, string CurrentDate)
        {
            string sql = "exec sproc_admin_Commission ";

            sql += " @flag='dt'";
            sql += ", @product_id=" + dao.FilterString(ProductId);
            sql += ", @currentDate=" + dao.FilterString(CurrentDate);
            var dt = dao.ExecuteDataTable(sql);
            List <AdminCommissionReportCommon> list = new List <AdminCommissionReportCommon>();

            if (dt != null)
            {
                foreach (DataRow item in dt.Rows)
                {
                    var common = new AdminCommissionReportCommon
                    {
                        TransactionId   = item["TxnId"].ToString(),
                        Service         = item["Services"].ToString(),
                        SubscriberNo    = item["SubscriberNo"].ToString(),
                        TotalAmount     = item["amount"].ToString(),
                        TransactionDate = item["CreatedDate"].ToString(),
                        TransactionType = item["txn_type"].ToString(),
                        GatewayTxnId    = item["GatewayTxnId"].ToString(),
                        CreatedBy       = item["created_by"].ToString(),
                        AdminCommission = item["admin_commission"].ToString()
                    };
                    list.Add(common);
                }
            }
            return(list);
        }
Example #2
0
        public List <AdminCommissionReportCommon> GetAdminCommissionReport(string FromDate = "", string ToDate = "")
        {
            string sql = "exec sproc_admin_Commission ";

            sql += " @flag='s'";
            sql += ", @from_Date=" + dao.FilterString(FromDate);
            sql += ", @to_Date=" + dao.FilterString(ToDate);
            var dt = dao.ExecuteDataTable(sql);
            List <AdminCommissionReportCommon> list = new List <AdminCommissionReportCommon>();

            if (dt != null)
            {
                foreach (DataRow item in dt.Rows)
                {
                    var common = new AdminCommissionReportCommon
                    {
                        TransactionDate  = item["Transaction_date"].ToString(),
                        Service          = item["Service"].ToString(),
                        ProductId        = item["product_id"].ToString(),
                        TransactionType  = item["TransactionType"].ToString(),
                        TotalTransaction = item["TotalTransaction"].ToString(),
                        TotalAmount      = item["TotalAmount"].ToString(),
                        CommissionEarned = item["CommissionEarned"].ToString()
                    };
                    list.Add(common);
                }
            }
            return(list);
        }
Example #3
0
        public List <AdminCommissionReportCommon> GetAdminCommissionDetail(string TransactionId)
        {
            string sql = "exec sproc_admin_Commission ";

            sql += " @flag='dd'";
            sql += ", @txn_id=" + dao.FilterString(TransactionId);
            var dt = dao.ExecuteDataTable(sql);
            List <AdminCommissionReportCommon> list = new List <AdminCommissionReportCommon>();

            if (dt != null)
            {
                foreach (DataRow item in dt.Rows)
                {
                    var common = new AdminCommissionReportCommon
                    {
                        TransactionId   = item["TxnId"].ToString(),
                        Service         = item["Services"].ToString(),
                        SubscriberNo    = item["SubscriberNo"].ToString(),
                        TotalAmount     = item["amount"].ToString(),
                        CreatedDate     = item["CreatedDate"].ToString(),
                        GatewayTxnId    = item["GatewayTxnId"].ToString(),
                        CreatedBy       = item["created_by"].ToString(),
                        AdminCommission = item["adminCommission"].ToString(),
                        AdminCostAmount = item["AdminCostAmount"].ToString(),
                        AdminRemark     = item["admin_remarks"].ToString(),
                        AgentRemark     = item["agent_remarks"].ToString(),
                        GatewayName     = item["gateway_name"].ToString(),
                        TransactionType = item["txn_type"].ToString(),
                        AgentName       = item["agent_name"].ToString(),
                        Status          = item["status"].ToString(),
                        ServiceCharge   = item["ServiceCharge"].ToString(),
                        BonusAmount     = item["BonusAmount"].ToString(),
                        Company         = item["company"].ToString()
                    };
                    list.Add(common);
                }
            }
            return(list);
        }
        public JsonResult ViewReportDetail(string TxnId)
        {
            AdminCommissionReportCommon common = new AdminCommissionReportCommon();
            var list = ACom.GetAdminCommissionDetail(TxnId.DecryptParameter());

            if (list != null)
            {
                foreach (var item in list)
                {
                    common.TransactionId   = item.TransactionId.ToString();
                    common.Service         = item.Service.ToString();
                    common.SubscriberNo    = item.SubscriberNo.ToString();
                    common.TotalAmount     = item.TotalAmount.ToString();
                    common.CreatedDate     = item.CreatedDate.ToString();
                    common.GatewayTxnId    = item.GatewayTxnId.ToString();
                    common.CreatedBy       = item.CreatedBy.ToString();
                    common.AdminCommission = item.AdminCommission.ToString();
                    common.AdminCostAmount = item.AdminCostAmount.ToString();
                    common.AdminRemark     = item.AdminRemark.ToString();
                    common.AgentRemark     = item.AgentRemark.ToString();
                    common.GatewayName     = item.GatewayName.ToString();
                    common.TransactionType = item.TransactionType.ToString();
                    common.AgentName       = item.AgentName.ToString();
                    common.Status          = item.Status.ToString();
                    common.ServiceCharge   = item.ServiceCharge.ToString();
                    common.BonusAmount     = item.BonusAmount.ToString();
                    common.Company         = item.Company.ToString();
                }
            }


            //var jsonResponse = JsonConvert.SerializeObject(list);


            return(Json(common));
        }