예제 #1
0
파일: Ajax.ashx.cs 프로젝트: plz821/entCMS
        private void DoLinkActions(string action)
        {
            LinkService ls = LinkService.GetInstance();

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

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