Web/kzcms/admin/Server/AttributeValue.ashx.cs

(完整代码) 1KB

using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;
namespace Web.admin.Server
{
    /// <summary>
    /// AttributeValue 的摘要说明
    /// </summary>
    public class AttributeValue : IHttpHandler, IRequiresSessionState
    {
        private string Act = Kscor.Common.DNTRequest.GetString("Act");
        private string html = string.Empty;
        private Kscor.BLL.AttributeValue BLLAttributeValue = new Kscor.BLL.AttributeValue();
        private Kscor.BLL.Model BLLModel = new Kscor.BLL.Model();
        public void ProcessRequest(HttpContext context)
        {
            if (Kscor.BLL.Session.IsLogin())
            {
                switch (Act)
                {
                    case "GetList":
                        html = GetList();
                        break;

                    default:
                        html = Kscor.Common.JsonHelper.ToJson("0", "参数错误");
                        break;
                }
            }
            else
            {
                html = Kscor.Common.JsonHelper.ToJson("0", "没有权限访问");
            }
            context.Response.Write(html);
            context.Response.End();
        }

        private string GetList()
        {
            int ArticleID = Kscor.Common.DNTRequest.GetInt("ArticleID", 0);
            bool GetChild = Kscor.Common.DNTRequest.GetInt("GetChild", 0) == 1;
            List<Kscor.Model.AttributeValue> list = BLLAttributeValue.GetList(p => p.Articleid == ArticleID);
            return Kscor.Common.JsonHelper.ObjectToJson(list, GetChild);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。