Exemple #1
0
 public void ProcessRequest(HttpContext context)
 {
     try
     {
         LoginUser loginUser = new LoginUser(context, "AgentRechargeDetail");
         if (!loginUser.Pass)//权限验证
         {
             return;
         }
         //加载DataGrid
         if (context.Request["action"] == "gridLoad")
         {
             AgentRechargeBLL bll = new AgentRechargeBLL(context, loginUser);
             int    page          = int.Parse(context.Request["page"]);
             int    rows          = int.Parse(context.Request["rows"]);
             string agentId       = context.Request["agentId"];
             string agentName     = context.Request["agentName"];
             string startDate     = context.Request["startDate"];
             string endDate       = context.Request["endDate"];
             bll.LoadGrid(page, rows, agentId, agentName, startDate, endDate);
             return;
         }
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Exemple #2
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "AgentRecharge");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    AgentBLL bll = new AgentBLL(context, loginUser);
                    //加载DataGrid
                    int    page       = int.Parse(context.Request["page"]);
                    int    rows       = int.Parse(context.Request["rows"]);
                    string agentId    = context.Request["agentId"];
                    string agentName  = context.Request["agentName"];
                    string bankCardId = context.Request["bankCardId"];
                    bll.LoadGrid(page, rows, agentName, agentId, bankCardId, ((int)AuditStauts.AuditSucces).ToString());
                    return;
                }
                if (context.Request["action"] == "load")
                {
                    AgentBLL bll = new AgentBLL(context, loginUser);
                    //加载信息
                    bll.Load(context.Request["agentId"]);
                }
                if (context.Request["action"] == "handleModeListLoad")
                {
                    AgentRechargeBLL bll = new AgentRechargeBLL(context, loginUser);
                    bll.HandleModeCombobox();
                }

                //增加
                if (context.Request["action"] == "add")
                {
                    AgentRechargeBLL bll             = new AgentRechargeBLL(context, loginUser);
                    TTAgentRecharge  ttAgentRecharge = new TTAgentRecharge();
                    ttAgentRecharge.agentId       = context.Request["agentId"];                   //代理商编号
                    ttAgentRecharge.fee           = double.Parse(context.Request["fee"]);         //发生金额
                    ttAgentRecharge.operatorId    = loginUser.UserId;;                            //操作人编号
                    ttAgentRecharge.operatorName  = loginUser.UserName;                           //操作人名称
                    ttAgentRecharge.createTime    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); //创建时间
                    ttAgentRecharge.handleMode    = context.Request["handleMode"];                //充值方式
                    ttAgentRecharge.bankAccountId = context.Request["bankCardId"];                //银行账号
                    ttAgentRecharge.bankFlowId    = context.Request["bankFlowId"];                //银行流水号
                    ttAgentRecharge.description   = context.Request["description"];               //说明
                    bll.Add(ttAgentRecharge);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Exemple #3
0
        private void BandingReports(string agentName, string startDate, string endDate)
        {
            ReportParameter[] parameters = new ReportParameter[2];
            parameters[0] = new ReportParameter("startDate", startDate);
            parameters[1] = new ReportParameter("endDate", endDate);
            AgentRechargeBLL bll = new AgentRechargeBLL(context, loginSession);

            System.Data.DataSet ds = new DataSet();
            ds = bll.GetDataSet(agentName, startDate, endDate);
            this.ReportViewer1.Reset();
            this.ReportViewer1.LocalReport.ReportPath  = @"Reports\AgentRecharge.rdlc";
            this.ReportViewer1.LocalReport.DisplayName = "代理商充值";
            this.ReportViewer1.LocalReport.SetParameters(parameters);

            ReportDataSource rds = new ReportDataSource("AgentRechargeDataSet", ds.Tables[0]);

            this.ReportViewer1.LocalReport.DataSources.Add(rds);
            this.ReportViewer1.LocalReport.Refresh();
        }
Exemple #4
0
 public void ProcessRequest(HttpContext context)
 {
     try
     {
         LoginAgentUser loginAgentUser = new LoginAgentUser(context, "AgentRecharge");
         AgentRoleBLL   agentRoleBLL   = new AgentRoleBLL(context, loginAgentUser);
         StaffBLL       staffBll       = new StaffBLL(context, loginAgentUser);
         if (!loginAgentUser.Pass)//权限验证
         {
             return;
         }
         //获取用户登录的角色类型 0为 代理商 1 为员工
         string roleType = agentRoleBLL.GetRoleType(loginAgentUser.RoleIds);
         string agentId  = "";
         if (roleType == "0")
         {
             agentId = loginAgentUser.UserId;
         }
         else
         {
             agentId = staffBll.Get(loginAgentUser.UserId).agentId;
         }
         //加载DataGrid
         if (context.Request["action"] == "gridLoad")
         {
             AgentRechargeBLL bll = new AgentRechargeBLL(context, loginAgentUser);
             int    page          = int.Parse(context.Request["page"]);
             int    rows          = int.Parse(context.Request["rows"]);
             string startDate     = context.Request["startDate"];
             string endDate       = context.Request["endDate"];
             bll.LoadGrid(page, rows, agentId, "", startDate, endDate);
             return;
         }
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Exemple #5
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser        loginUser = new LoginUser(context, "AgentRecharge");
                AgentPreRechgBLL bll       = new AgentPreRechgBLL(context, loginUser);
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    int    page        = int.Parse(context.Request["page"]);
                    int    rows        = int.Parse(context.Request["rows"]);
                    string agentId     = context.Request["agentId"];
                    string auditStatus = context.Request["auditStatus"];
                    string startDate   = context.Request["startDate"];
                    string endDate     = context.Request["endDate"];
                    bll.LoadGrid(page, rows, agentId, auditStatus, startDate, endDate);
                    return;
                }
                if (context.Request["action"] == "load")
                {
                    //加载信息
                    bll.Load(long.Parse(context.Request["flowId"]));
                }
                if (context.Request["action"] == "handleModeListLoad")
                {
                    Combobox com = new Combobox(context, loginUser);
                    com.HandleModeCombobox();
                }

                //审核
                if (context.Request["action"] == "audit")
                {
                    AgentRechargeBLL agentRechargeBLL = new AgentRechargeBLL(context, loginUser);
                    long             flowId           = long.Parse(context.Request["flowId"]);
                    string           remark           = context.Request["remark"];
                    TTAgentPreRechg  ttAgentPreRechg  = bll.Get(flowId);//预审
                    ttAgentPreRechg.auditStatus = context.Request["auditStatus"];
                    if (ttAgentPreRechg.auditStatus == "1")
                    {
                        TTAgentRecharge ttAgentRecharge = new TTAgentRecharge();       //充值明细
                        ttAgentRecharge.agentId       = ttAgentPreRechg.agentId;       //代理商编号
                        ttAgentRecharge.fee           = ttAgentPreRechg.fee;           //发生金额
                        ttAgentRecharge.operatorId    = loginUser.UserId;              //操作人编号
                        ttAgentRecharge.operatorName  = loginUser.UserName;            //操作人名称
                        ttAgentRecharge.handleMode    = ttAgentPreRechg.handleMode;    //充值方式
                        ttAgentRecharge.bankAccountId = ttAgentPreRechg.bankAccountId; //银行账号
                        ttAgentRecharge.bankFlowId    = ttAgentPreRechg.bankFlowId;    //银行流水号
                        if (remark.Trim() == "")
                        {
                            ttAgentRecharge.description = ttAgentPreRechg.description;//说明
                        }
                        else
                        {
                            ttAgentRecharge.description = remark;
                        }
                        agentRechargeBLL.Add(ttAgentRecharge, ttAgentPreRechg, ttAgentPreRechg.fee);
                    }
                    else
                    {
                        bll.Edit(ttAgentPreRechg);
                    }
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }