Ejemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "");
                MainAgentBll   bll            = new MainAgentBll(context, loginAgentUser);
                if (!loginAgentUser.Pass)//权限验证
                {
                    return;
                }

                if (context.Request["action"] == "load")
                {//加载主界面
                    bll.LoadMain();
                }
                if (context.Request["action"] == "check")
                {//刷新主界面
                    Message.success(context, "系统正常");
                }
                else if (context.Request["action"] == "changePwd")
                {//修改密码
                    string oldPwd = context.Request.Form["oldPwd"];
                    string newPwd = context.Request.Form["newPwd"];
                    bll.ChangePwd(oldPwd, newPwd);
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "UKeyActivation");
                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  = "";
                string siteId   = context.Request["siteId"];
                if (roleType == "0")
                {
                    agentId = loginAgentUser.UserId;
                }
                if (roleType != "0")
                {
                    siteId = staffBll.Get(loginAgentUser.UserId).siteId;
                }

                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    UKeyBLL bll    = new UKeyBLL(context, loginAgentUser);
                    int     page   = int.Parse(context.Request["page"]);
                    int     rows   = int.Parse(context.Request["rows"]);
                    string  uKeyId = context.Request["uKeyId"];
                    string  status = context.Request["status"];
                    bll.LoadGrid(page, rows, uKeyId, status, siteId, "", agentId);
                    return;
                }
                //加载快开厅
                if (context.Request["action"] == "ddlStatusListLoad")
                {
                    UKeyBLL bll = new UKeyBLL(context, loginAgentUser);
                    bll.AgentUKeyStatusCombobox();
                    return;
                }

                //激活
                if (context.Request["action"] == "activation")
                {
                    UKeyBLL bll    = new UKeyBLL(context, loginAgentUser);
                    string  ukeyId = context.Request["ukeyId"];//加密狗编号
                    bll.Activation(ukeyId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 3
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "ClientAccDetail");
                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  = "";
                string siteId   = context.Request["siteId"];
                if (roleType == "0")
                {
                    agentId = loginAgentUser.UserId;
                }
                if (roleType != "0")
                {
                    siteId = staffBll.Get(loginAgentUser.UserId).siteId;
                }
                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    ClientAccDetailBLL bll = new ClientAccDetailBLL(context, loginAgentUser);
                    int    page            = int.Parse(context.Request["page"]);
                    int    rows            = int.Parse(context.Request["rows"]);
                    string clientId        = context.Request["clientId"];
                    string cardId          = context.Request["cardId"];
                    string clientName      = context.Request["clientName"];
                    bll.LoadGrid(page, rows, clientId, agentId, siteId, cardId, clientName);
                    return;
                }

                //加载信息
                if (context.Request["action"] == "load")
                {
                    ClientAccDetailBLL bll = new ClientAccDetailBLL(context, loginAgentUser);
                    long flowId            = long.Parse(context.Request["flowId"]);//编号
                    bll.Load(flowId);
                    return;
                }
                if (context.Request["action"] == "siteListLoad")
                {
                    ClientBLL bll = new ClientBLL(context, loginAgentUser);
                    bll.SiteCombobox(loginAgentUser.UserId, roleType);
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 4
0
 public void ProcessRequest(HttpContext context)
 {
     try
     {
         LoginAgentUser loginUser = new LoginAgentUser();
         if (context.Request["action"] == "login")
         {
             string userCode = context.Request.Form["userCode"].Trim();
             string userPwd  = context.Request.Form["userPwd"];
             loginUser.Login(context, userCode, userPwd);
         }
         else if (context.Request["action"] == "logout")
         {
             loginUser.Remove(context);
         }
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Ejemplo n.º 5
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")
                {
                    AgentTakeCashBLL bll = new AgentTakeCashBLL(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);
            }
        }
Ejemplo n.º 6
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "Staff");
                StaffBLL       bll            = new StaffBLL(context, loginAgentUser);
                AgentRoleBLL   agentRoleBLL   = new AgentRoleBLL(context, loginAgentUser);
                if (!loginAgentUser.Pass)//权限验证
                {
                    return;
                }
                string roleType = agentRoleBLL.GetRoleType(loginAgentUser.RoleIds);
                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    int page = int.Parse(context.Request["page"]);
                    int rows = int.Parse(context.Request["rows"]);
                    if (roleType == "0")
                    {
                        bll.LoadGrid(page, rows, roleType, loginAgentUser.UserId);
                    }
                    else
                    {
                        bll.LoadGrid(page, rows, roleType, bll.Get(loginAgentUser.UserId).siteId);
                    }
                    return;
                }
                //加载门店
                if (context.Request["action"] == "siteListLoad")
                {
                    bll.SiteCombobox(loginAgentUser.UserId, roleType);
                    return;
                }
                //加载角色
                if (context.Request["action"] == "roleListLoad")
                {
                    bll.RoleCombobox();
                    return;
                }
                //加载信息
                if (context.Request["action"] == "load")
                {
                    string staffId = context.Request["staffId"];//员工编号
                    bll.Load(staffId);
                    return;
                }

                //增加
                if (context.Request["action"] == "add")
                {
                    TBStaff     tbStaff     = new TBStaff();
                    TSAgentUser tsAgentUser = new TSAgentUser();
                    tbStaff.staffId   = context.Request["staffId"];   //员工编号
                    tbStaff.siteId    = context.Request["siteId"];    //门店编号
                    tbStaff.staffName = context.Request["staffName"]; //员工姓名
                    tbStaff.status    = context.Request["status"];    //使用状态
                    tbStaff.telephone = context.Request["telephone"]; //手机号码
                    tbStaff.IDNumber  = context.Request["IDNumber"];  //身份证号
                    if (roleType == "0")                              //角色类型0:代理商 1:门店员工
                    {
                        tbStaff.agentId = loginAgentUser.UserId;
                    }
                    else
                    {
                        tbStaff.agentId = bll.Get(loginAgentUser.UserId).agentId;
                    }
                    tbStaff.address = context.Request["address"];        //住址
                    tbStaff.remark  = context.Request["remark"];         //备注
                    //添加到代理门店用户表
                    tsAgentUser.roleId   = context.Request["roleId"];    //角色;
                    tsAgentUser.userCode = context.Request["staffCode"]; //员工帐号
                    tsAgentUser.userPwd  = tsAgentUser.userCode;         //帐号密码 默认和帐号一致
                    bll.Add(tbStaff, tsAgentUser);
                    return;
                }

                //修改
                if (context.Request["action"] == "edit")
                {
                    TBStaff     tbStaff     = new TBStaff();
                    TSAgentUser tsAgentUser = new TSAgentUser();
                    tbStaff.staffId   = context.Request["staffId"];   //员工编号
                    tbStaff.siteId    = context.Request["siteId"];    //门店编号
                    tbStaff.staffName = context.Request["staffName"]; //员工姓名
                    tbStaff.status    = context.Request["status"];    //使用状态
                    tbStaff.telephone = context.Request["telephone"]; //手机号码
                    tbStaff.IDNumber  = context.Request["IDNumber"];  //身份证号
                    if (roleType == "0")                              //角色类型0:代理商 1:门店员工
                    {
                        tbStaff.agentId = loginAgentUser.UserId;
                    }
                    else
                    {
                        tbStaff.agentId = bll.Get(loginAgentUser.UserId).agentId;
                    }
                    tbStaff.address = context.Request["address"];        //住址
                    tbStaff.remark  = context.Request["remark"];         //备注
                    //添加到代理门店用户表
                    tsAgentUser.roleId   = context.Request["roleId"];    //角色;
                    tsAgentUser.userCode = context.Request["staffCode"]; //员工帐号
                    bll.Edit(tbStaff, tsAgentUser);
                    return;
                }

                //删除
                if (context.Request["action"] == "delete")
                {
                    string staffId = context.Request["staffId"];//员工编号
                    bll.Delete(staffId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 7
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "AgentRechargeNotice");
                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")
                {
                    AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(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;
                }

                //加载信息
                if (context.Request["action"] == "load")
                {
                    AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser);
                    long flowId = long.Parse(context.Request["flowId"]);//流水号
                    bll.Load(flowId);
                    return;
                }

                //增加
                if (context.Request["action"] == "add")
                {
                    AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser);
                    TTAgentRechargeNotice  ttAgentRechargeNotice = new TTAgentRechargeNotice();
                    ttAgentRechargeNotice.agentId         = loginAgentUser.UserId;                                                              //代理商编号
                    ttAgentRechargeNotice.agentName       = loginAgentUser.GetUserName();                                                       //代理商名称
                    ttAgentRechargeNotice.fee             = double.Parse(context.Request["fee"]);                                               //充值金额
                    ttAgentRechargeNotice.bankAccountId   = context.Request["bankAccountId"];                                                   //银行账号
                    ttAgentRechargeNotice.transferAccDate = DateTime.Parse(context.Request["transferAccDate"]).ToString("yyyy-MM-dd HH:mm:ss"); //转账日期
                    ttAgentRechargeNotice.remark          = context.Request["remark"];                                                          //充值说明
                    ttAgentRechargeNotice.dealWithStatus  = "0";
                    bll.Add(ttAgentRechargeNotice);
                    return;
                }

                //修改
                if (context.Request["action"] == "edit")
                {
                    AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser);
                    TTAgentRechargeNotice  ttAgentRechargeNotice = new TTAgentRechargeNotice();
                    ttAgentRechargeNotice.flowId          = long.Parse(context.Request["flowId"]); //流水号
                    ttAgentRechargeNotice.agentId         = context.Request["agentId"];            //代理商编号
                    ttAgentRechargeNotice.agentName       = context.Request["agentName"];          //代理商名称
                    ttAgentRechargeNotice.fee             = double.Parse(context.Request["fee"]);  //充值金额
                    ttAgentRechargeNotice.bankAccountId   = context.Request["bankAccountId"];      //银行账号
                    ttAgentRechargeNotice.transferAccDate = context.Request["transferAccDate"];    //转账日期
                    ttAgentRechargeNotice.remark          = context.Request["remark"];             //充值说明
                    ttAgentRechargeNotice.createTime      = context.Request["createTime"];         //创建时间
                    ttAgentRechargeNotice.dealWithStatus  = context.Request["dealWithStatus"];     //办理状态
                    ttAgentRechargeNotice.operatorId      = context.Request["operatorId"];         //办理人编号
                    ttAgentRechargeNotice.operatorName    = context.Request["operatorName"];       //办理人名称
                    ttAgentRechargeNotice.dealWithTime    = context.Request["dealWithTime"];       //办理时间
                    ttAgentRechargeNotice.opinion         = context.Request["opinion"];            //办理意见
                    bll.Edit(ttAgentRechargeNotice);
                    return;
                }

                //删除
                if (context.Request["action"] == "delete")
                {
                    AgentRechargeNoticeBLL bll = new AgentRechargeNoticeBLL(context, loginAgentUser);
                    long flowId = long.Parse(context.Request["flowId"]);//流水号
                    bll.Delete(flowId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 8
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginAgentUser loginAgentUser = new LoginAgentUser(context, "AgentTakeCashApply");
                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")
                {
                    AgentTakeCashApplyBLL bll = new AgentTakeCashApplyBLL(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;
                }

                //加载信息
                if (context.Request["action"] == "load")
                {
                    AgentTakeCashApplyBLL bll = new AgentTakeCashApplyBLL(context, loginAgentUser);
                    long flowId = long.Parse(context.Request["flowId"]);//流水号
                    bll.Load(flowId);
                    return;
                }

                //增加
                if (context.Request["action"] == "add")
                {
                    AgentTakeCashApplyBLL bll = new AgentTakeCashApplyBLL(context, loginAgentUser);
                    TTAgentTakeCashApply  ttAgentTakeCashApply = new TTAgentTakeCashApply();
                    ttAgentTakeCashApply.agentId        = loginAgentUser.UserId;                //代理商编号
                    ttAgentTakeCashApply.agentName      = loginAgentUser.GetUserName();         //代理商名称
                    ttAgentTakeCashApply.fee            = double.Parse(context.Request["fee"]); //提现金额
                    ttAgentTakeCashApply.bankAccountId  = context.Request["bankAccountId"];     //银行账号
                    ttAgentTakeCashApply.remark         = context.Request["remark"];            //提现说明
                    ttAgentTakeCashApply.createTime     = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                    ttAgentTakeCashApply.dealWithStatus = "0";
                    bll.Add(ttAgentTakeCashApply);
                    return;
                }
                //删除
                if (context.Request["action"] == "delete")
                {
                    AgentTakeCashApplyBLL bll = new AgentTakeCashApplyBLL(context, loginAgentUser);
                    long flowId = long.Parse(context.Request["flowId"]);//流水号
                    bll.Delete(flowId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }