Beispiel #1
0
        private void deleteOrderFile(HttpContext context)
        {
            //检查是否允许匿名上传
            if (!new ManagePage().IsAdminLogin())
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"禁止匿名非法删除!\"}");
                return;
            }
            BLL.Order     bll     = new BLL.Order();
            Model.manager manager = new ManagePage().GetAdminInfo();//获得当前登录管理员信息
            int           id      = DTRequest.GetQueryInt("id");

            Model.Files file  = bll.GetFileModel(id);
            Model.Order order = bll.GetModel(file.f_oid);
            if (order.o_lockStatus == 1)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"订单已锁定,不能再删除!\"}");
                context.Response.End();
            }
            if (bll.deleteOrderFile(file, manager))
            {
                context.Response.Write("{\"status\": 1, \"msg\": \"删除成功!\"}");
                context.Response.End();
            }
            context.Response.Write("{\"status\": 0, \"msg\": \"删除失败!\"}");
            context.Response.End();
        }