TZ.Web/ticket/detail.aspx.cs

(开头部分) 4KB

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

using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Text;
using TZ.Common;

public partial class ticket_detail : System.Web.UI.Page
{
    protected int id;
    protected string strDateItem = "";
    protected string strPriceItem = "";
    protected DataTable dtHotTicket = new DataTable();
    protected TZ.Model.Article model = new TZ.Model.Article();
    protected void Page_Load(object sender, EventArgs e)
    {
        id = TZRequest.GetQueryInt("id");
        if (!IsPostBack)
        {
            dtHotTicket = new TZ.BLL.Article().GetList(5, "[status]=0 and channel_id=10 and is_hot=1", "sort_id asc,start_time asc").Tables[0];
            if (id > 0)
            {
                model = new TZ.BLL.Article().GetModel(id);
                if (model != null)
                {
                    PriceItemInit(model);
                    new TZ.BLL.Article().UpdateClick(model.Id, 1);
                }
            }
        }
    }
    //演出日期
    protected void PriceItemInit(TZ.Model.Article model)
    {
        StringBuilder strDate = new StringBuilder();
        DataTable dtDate = new TZ.BLL.Article_Date().GetList(0, "article_id=" + model.Id + "", "ticket_date asc").Tables[0];
        if (dtDate.Rows.Count > 0)
        {
            int num = 0;
            foreach (DataRow rows in dtDate.Rows)
            {
                num++;
                string strPrice = "";
                List<TZ.Model.PriceItem> item = Newtonsoft.Json.JsonConvert.DeserializeObject<List<TZ.Model.PriceItem>>(rows["ticket_text"].ToString());
                if (item.Count > 0)
                {
                    foreach (TZ.Model.PriceItem price in item)
                    {
                        if (price.Status == "0")
                        {
                            if (price.Remark != "")
                                strPrice += "<a class='on' data-price='" + price.Price + "' href='javascript:void(0)'><em>" + price.Price + "元(" + price.Remark + ")</em></a>";
                            else
后面还有 48 行代码,购买后查看完整代码

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

AI 解读

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

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