private void attribute_field_validate(HttpContext context)
 {
     string column_name = MXRequest.GetString("param");
     if (string.IsNullOrEmpty(column_name))
     {
         context.Response.Write("{ \"info\":\"名称不可为空\", \"status\":\"n\" }");
         return;
     }
     BLL.article_attribute_field bll = new BLL.article_attribute_field();
     if (bll.Exists(column_name))
     {
         context.Response.Write("{ \"info\":\"该名称已被占用,请更换!\", \"status\":\"n\" }");
         return;
     }
     context.Response.Write("{ \"info\":\"该名称可使用\", \"status\":\"y\" }");
     return;
 }
Example #2
0
        private void attribute_field_validate(HttpContext context)
        {
            string column_name = DTRequest.GetString("param");

            if (string.IsNullOrEmpty(column_name))
            {
                context.Response.Write("{ \"info\":\"名称不可为空\", \"status\":\"n\" }");
                return;
            }
            BLL.article_attribute_field bll = new BLL.article_attribute_field();
            if (bll.Exists(column_name))
            {
                context.Response.Write("{ \"info\":\"该名称已被占用,请更换!\", \"status\":\"n\" }");
                return;
            }
            context.Response.Write("{ \"info\":\"该名称可使用\", \"status\":\"y\" }");
            return;
        }