Ejemplo n.º 1
0
 public void ProcessRequest(HttpContext context)
 {
     try
     {
         LoginAgentUser loginAgentUser = new LoginAgentUser(context, "ClientPoint");
         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")
         {
             ClientPointBLL bll        = new ClientPointBLL(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"] == "siteListLoad")
         {
             ClientBLL bll = new ClientBLL(context, loginAgentUser);
             bll.SiteCombobox(loginAgentUser.UserId, roleType);
         }
         //加载信息
         if (context.Request["action"] == "load")
         {
             ClientPointBLL bll    = new ClientPointBLL(context, loginAgentUser);
             long           flowId = long.Parse(context.Request["flowId"]);//编号
             bll.Load(flowId);
             return;
         }
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "ClientPoint");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    ClientPointBLL bll = new ClientPointBLL(context, loginUser);
                    int page = int.Parse(context.Request["page"]);
                    int rows = int.Parse(context.Request["rows"]);
                    string clientId = context.Request["clientId"];
                    string agentId = context.Request["agentId"];
                    string siteId = context.Request["siteId"];
                    string cardId = context.Request["cardId"];
                    string clientName = context.Request["clientName"];
                    bll.LoadGrid(page, rows, clientId, agentId, siteId, cardId, clientName);
                    return;
                }
                if (context.Request["action"] == "agentListLoad")
                {
                    ClientBLL bll = new ClientBLL(context, loginUser);
                    bll.AgentCombobox();
                }
                if (context.Request["action"] == "siteListLoad")
                {
                    ClientBLL bll = new ClientBLL(context, loginUser);
                    string agentId = context.Request["agentId"];
                    bll.SiteCombobox(agentId);
                }
                //加载信息
                if (context.Request["action"] == "load")
                {
                    ClientPointBLL bll = new ClientPointBLL(context, loginUser);
                    long flowId = long.Parse(context.Request["flowId"]);//编号
                    bll.Load(flowId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }
Ejemplo n.º 3
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                LoginUser loginUser = new LoginUser(context, "ClientPoint");
                if (!loginUser.Pass)//权限验证
                {
                    return;
                }

                //加载DataGrid
                if (context.Request["action"] == "gridLoad")
                {
                    ClientPointBLL bll             = new ClientPointBLL(context, loginUser);
                    int            page            = int.Parse(context.Request["page"]);
                    int            rows            = int.Parse(context.Request["rows"]);
                    string         agentId         = context.Request["agentId"];
                    string         siteId          = context.Request["siteId"];
                    string         clientQuery     = context.Request["clientQuery"];
                    string         clientQueryText = context.Request["clientQueryText"];
                    string         startDate       = context.Request["startDate"];
                    string         endDate         = context.Request["endDate"];
                    string         sroState        = context.Request["sroState"];
                    bll.LoadGridCopy(page, rows, agentId, siteId, clientQuery, clientQueryText, startDate, endDate, sroState);
                    return;
                }
                //用户查找分类
                if (context.Request["action"] == "clientQueryListLoad")
                {
                    Combobox com = new Combobox(context, loginUser);
                    com.ClientQueryCombobox();
                }
                if (context.Request["action"] == "agentListLoad")
                {
                    Combobox com = new Combobox(context, loginUser);
                    com.AgentCombobox();
                }
                if (context.Request["action"] == "sroStateLoad")
                {
                    Combobox com = new Combobox(context, loginUser);
                    com.ScoreStaCombobox();
                }
                if (context.Request["action"] == "siteListLoad")
                {
                    Combobox com     = new Combobox(context, loginUser);
                    string   agentId = context.Request["agentId"];
                    com.SiteByAgentCombobox(agentId);
                }
                //加载信息
                if (context.Request["action"] == "load")
                {
                    ClientPointBLL bll    = new ClientPointBLL(context, loginUser);
                    long           flowId = long.Parse(context.Request["flowId"]);//编号
                    bll.Load(flowId);
                    return;
                }
            }
            catch (Exception e)
            {
                Message.error(context, e.Message);
            }
        }