NongJiaLe.Web/Ajax/Ajax_Detail.aspx.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

using Shopping;
using Shopping.Model;

using Shopping.Common;


namespace Shopping.Web.Ajax
{
    public partial class Ajax_Detail : System.Web.UI.Page
    {
        /// <summary>
        /// 载入输入事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {

            this.Response.Expires = 0;//清除缓存
            string action = Requests.All("action");
            int CommodityId = Utils.StrToInt(Requests.All("Commodityid"));
            string result = "";
            switch (action)
            {
                case "getconsult":
                    result = GetConsultList(CommodityId);
                    break;
                case "addfav":
                    result = AddFav(CommodityId);
                    break;
                case "getrate":
                    result = GetRate(CommodityId);
                    break;
            }

            Response.Write(result);
            Response.End();
        }

        /// <summary>
        /// 加入收藏
        /// </summary>
        /// <param name="CommodityId"></param>
        /// <returns></returns>
        private string AddFav(int CommodityId)
        {
            string result = "-1";
            Model.Commodity CommodityInfo = Shopping.BLL.CommodityBLL.GetCommodityInfo(CommodityId);
            Shopping.Model.OnLineUserInfo onlineUserInfo = Shopping.OnLineUser.GetOnLineUserInfo(true);
            if (CommodityInfo != null && onlineUserInfo != null)
            {

后面还有 113 行代码,购买后查看完整代码

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

AI 解读

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

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