Exemple #1
0
        private void DoLinkTypeActions(string action)
        {
            LinkGroupService lts = LinkGroupService.GetInstance();

            if (action.Equals("LinkGroupOrder"))
            {
                string id    = Request["Id"];
                string order = Request["Order"];

                int r = lts.ChangeOrder(id, int.Parse(order));
                if (r > 0)
                {
                    json = "{\"result\":1}";
                }
                else
                {
                    json = "{\"result\":0, \"msg\":\"服务器发生错误,排序失败!\"}";
                }
            }
            else if (action.Equals("LinkGroupEnable"))
            {
                string id = Request["Id"];

                int r = lts.Enable(id);
                if (r > 0)
                {
                    json = "{\"result\":1}";
                }
                else
                {
                    json = "{\"result\":0, \"msg\":\"服务器发生错误,状态改变失败!\"}";
                }
            }
            else if (action.Equals("LinkGroupDelete"))
            {
                string id = Request["Id"];
                int    r  = lts.Delete(id);
                if (r > 0)
                {
                    json = "{\"result\":1}";
                }
                else
                {
                    json = "{\"result\":0, \"msg\":\"服务器发生错误,删除失败!\"}";
                }
            }
        }