Beispiel #1
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "AgentAudit");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                AgentBLL bll = new AgentBLL(context, loginUser);
                if (context.Request["action"] == "gridLoad")
                {
                    //加载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"];
                    bll.LoadGrid(page, rows, agentName, agentId, "", ((int)AuditStauts.NotAudit).ToString());
                }
                else if (context.Request["action"] == "areaListLoad")
                {
                    //加载区域列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AreaCombobox();
                }
                else if (context.Request["action"] == "auditListLoad")
                {
                    //加载审核状态列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AuditCombobox();
                }
                else if (context.Request["action"] == "load")
                {
                    //加载信息
                    bll.Load(context.Request["agentId"]);
                }
                else if (context.Request["action"] == "audit")
                {
                    //审核
                    TBAgent agent = new TBAgent();
                    agent.agentId     = context.Request["agentId"];
                    agent.auditStatus = context.Request["auditStatus"];
                    agent.status      = "0";
                    if (agent.auditStatus == ((int)AuditStauts.AuditSucces).ToString())
                    {
                        agent.status = "1";
                    }
                    agent.remark = context.Request["remark"];
                    bll.Audit(agent);
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Beispiel #2
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "AgentAdd");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                AgentBLL bll = new AgentBLL(context, loginUser);
                if (context.Request["action"] == "gridLoad")
                {
                    //加载DataGrid
                    int    page        = int.Parse(context.Request["page"]);
                    int    rows        = int.Parse(context.Request["rows"]);
                    string agentName   = context.Request["agentName"];
                    string agentId     = context.Request["agentId"];
                    string auditStatus = context.Request["auditStatus"];
                    bll.LoadGrid(page, rows, agentName, agentId, "", auditStatus);
                }
                else if (context.Request["action"] == "areaListLoad")
                {
                    //加载区域列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AreaCombobox();
                }
                else if (context.Request["action"] == "auditListLoad")
                {
                    //加载审核状态列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AuditCombobox();
                }
                else if (context.Request["action"] == "load")
                {
                    //加载信息
                    bll.Load(context.Request["agentId"]);
                }
                else if (context.Request["action"] == "add")
                {
                    //增加
                    TBAgent     agent       = new TBAgent();
                    TSAgentUser tsAgentUser = new TSAgentUser();
                    agent.agentId        = context.Request["agentId"];
                    agent.agentName      = context.Request["agentName"];
                    agent.rebate         = double.Parse(context.Request["rebate"]);
                    agent.warnValue      = double.Parse(context.Request["warnValue"]);
                    agent.contact        = context.Request["contact"];
                    agent.telephone      = context.Request["telephone"];
                    agent.areaId         = context.Request["areaId"];
                    agent.address        = context.Request["address"];
                    agent.IDNumber       = context.Request["IDNumber"];
                    agent.bankCardId     = context.Request["bankCardId"];
                    agent.bankName       = context.Request["bankName"];
                    agent.status         = "0";
                    agent.fixedLine      = context.Request["fixedLine"];
                    agent.remark         = context.Request["remark"];
                    tsAgentUser.roleId   = "001";
                    tsAgentUser.userCode = context.Request["agentUserCode"];
                    tsAgentUser.userPwd  = tsAgentUser.userCode;
                    bll.Add(agent, tsAgentUser);
                }
                else if (context.Request["action"] == "edit")
                {
                    //修改
                    TBAgent agent = new TBAgent();
                    agent.agentId     = context.Request["agentId"];
                    agent.agentName   = context.Request["agentName"];
                    agent.rebate      = double.Parse(context.Request["rebate"]);
                    agent.contact     = context.Request["contact"];
                    agent.telephone   = context.Request["telephone"];
                    agent.areaId      = context.Request["areaId"];
                    agent.address     = context.Request["address"];
                    agent.IDNumber    = context.Request["IDNumber"];
                    agent.bankCardId  = context.Request["bankCardId"];
                    agent.bankName    = context.Request["bankName"];
                    agent.status      = context.Request["status"];
                    agent.warnValue   = double.Parse(context.Request["warnValue"]);
                    agent.auditStatus = "0";
                    agent.fixedLine   = context.Request["fixedLine"];
                    agent.remark      = context.Request["remark"];
                    bll.Edit(agent);
                }
                else if (context.Request["action"] == "delete")
                {
                    //删除
                    string agentId = context.Request["agentId"];
                    bll.Delete(agentId);
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Beispiel #3
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "AgentOam");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                AgentBLL bll = new AgentBLL(context, loginUser);
                if (context.Request["action"] == "gridLoad")
                {
                    //加载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"];
                    bll.LoadGrid(page, rows, agentName, agentId, "", ((int)AuditStauts.AuditSucces).ToString());
                }
                else if (context.Request["action"] == "areaListLoad")
                {
                    //加载区域列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AreaCombobox();
                }
                else if (context.Request["action"] == "auditListLoad")
                {
                    //加载审核状态列表
                    Combobox com = new Combobox(context, loginUser);
                    com.AuditCombobox();
                }
                else if (context.Request["action"] == "load")
                {
                    //加载信息
                    bll.Load(context.Request["agentId"]);
                }
                else if (context.Request["action"] == "edit")
                {
                    //修改
                    TBAgent agent = new TBAgent();
                    agent.agentId     = context.Request["agentId"];
                    agent.agentName   = context.Request["agentName"];
                    agent.rebate      = double.Parse(context.Request["rebate"]);
                    agent.contact     = context.Request["contact"];
                    agent.telephone   = context.Request["telephone"];
                    agent.areaId      = context.Request["areaId"];
                    agent.address     = context.Request["address"];
                    agent.IDNumber    = context.Request["IDNumber"];
                    agent.bankCardId  = context.Request["bankCardId"];
                    agent.bankName    = context.Request["bankName"];
                    agent.status      = context.Request["status"];
                    agent.auditStatus = ((int)AuditStauts.AuditSucces).ToString();
                    agent.fixedLine   = context.Request["fixedLine"];
                    agent.remark      = context.Request["remark"];
                    agent.warnValue   = double.Parse(context.Request["warnValue"]);
                    bll.Edit(agent);
                }
                //密码重置
                if (context.Request["action"] == "pwdReset")
                {
                    string staffId = context.Request["agentId"];//员工编号
                    bll.PawReset(staffId, "0");
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }