Hidistro.UI.SaleSystem.CodeBehind/VResourceNotFound.cs

(完整代码) 1KB

namespace Hidistro.UI.SaleSystem.CodeBehind
{
    using Hidistro.Entities.VShop;
    using Hidistro.UI.Common.Controls;
    using System;

    public class VResourceNotFound : VshopTemplatedWebControl
    {
        private HiLiteral litDescription;
        private HiLiteral litImgIndex;

        protected override void AttachChildControls()
        {
            string str = this.Page.Request.QueryString["type"];
            ErrorType type = ErrorType.前台404;
            if (!string.IsNullOrWhiteSpace(str))
            {
                try
                {
                    type = (ErrorType) Enum.Parse(typeof(ErrorType), str);
                }
                catch (Exception)
                {
                    type = ErrorType.前台其它错误;
                }
            }
            this.litImgIndex = (HiLiteral) this.FindControl("litImgIndex");
            this.litDescription = (HiLiteral) this.FindControl("litDescription");
            switch (type)
            {
                case ErrorType.前台404:
                    this.litDescription.Text = "糟糕...这个页面打不开了";
                    this.litImgIndex.Text = "1";
                    break;

                case ErrorType.前台商品下架:
                    this.litDescription.Text = "哎呀...这个商品已经下架了";
                    this.litImgIndex.Text = "2";
                    break;

                default:
                    this.litDescription.Text = "很抱歉!我们正在修复中……";
                    this.litImgIndex.Text = "1";
                    break;
            }
            PageTitle.AddTitle("出错了");
        }

        protected override void OnInit(EventArgs e)
        {
            if (this.SkinName == null)
            {
                this.SkinName = "Skin-VResourceNotFound.html";
            }
            base.OnInit(e);
        }
    }
}

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

AI 解读 AI

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

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