示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            HttpRequest Request = context.Request;
            string      func    = RequestHelper.string_transfer(Request, "func");

            try
            {
                //全局初始化
                Constant.Fill_All_Data(context);
                //当前用户ID
                string guid = RequestHelper.string_transfer(Request, "guid");

                if (Data_check_helper.check_Self(handertype, guid))
                {
                    switch (func)
                    {
                    case "get_cust_linkman_list":
                        get_cust_linkman_list(context, guid);
                        break;

                    case "get_cust_linkman_info":
                        get_cust_linkman_info(context, guid);
                        break;

                    case "edit_cust_linkman":
                        edit_cust_linkman(context, guid);
                        break;

                    case "get_cust_linkman_detail":
                        get_cust_linkman_detail(context, guid);
                        break;

                    case "update_cust_linkman_isdelete":
                        update_cust_linkman_isdelete(context, guid);
                        break;

                    case "get_cust_linkman_list_ALL":
                        get_cust_linkman_list_ALL(context, guid);
                        break;

                    default:
                        jsonModel = Constant.get_jsonmodel(5, "没有此方法", "");
                        context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
                        break;
                    }
                }
                else if (Constant.Chek_Someone_Is_Valied(guid))
                {
                    switch (func)
                    {
                    case "get_cust_linkman_list_ALL":
                        get_cust_linkman_list_ALL(context, guid);
                        break;

                    default:
                        jsonModel = Constant.get_jsonmodel(5, "没有此方法", "");
                        context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
                        break;
                    }
                }
                else
                {
                    jsonModel = Constant.get_jsonmodel(5, "请到首页进行刷新", "");
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
                jsonModel = Constant.ErrorGetData(ex);
                context.Response.Write("{\"result\":" + Constant.jss.Serialize(jsonModel) + "}");
            }
        }