Hidistro.UI.Web/Admin/Shop/ImageType.cs

(开头部分) 4KB

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

namespace Hidistro.UI.Web.Admin.Shop
{
    using ASPNET.WebControls;
    using Hidistro.ControlPanel.Store;
    using Hidistro.Core;
    using Hidistro.UI.ControlPanel.Utility;
    using System;
    using System.Collections.Generic;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class ImageType : AdminPage
    {
        protected Button btn_AddImageType;
        protected Button ImageTypeEdit;
        protected Grid ImageTypeList;
        protected HtmlForm thisForm;
        protected TextBox txt_AddImageTypeName;

        protected ImageType() : base("m01", "dpp09")
        {
        }

        private void btn_AddImageType_Click(object sender, EventArgs e)
        {
            string text = this.txt_AddImageTypeName.Text;
            if (text.Length == 0)
            {
                this.ShowMsg("分类名称不能为空", false);
            }
            else if (text.Length > 20)
            {
                this.ShowMsg("分类名称长度限在20个字符以内", false);
            }
            else if (GalleryHelper.AddPhotoCategory(Globals.HtmlEncode(text)))
            {
                this.txt_AddImageTypeName.Text = "";
                this.ShowMsg("添加成功!", true);
                this.GetImageType();
            }
            else
            {
                this.ShowMsg("添加失败", false);
            }
        }

        private void GetImageType()
        {
            this.ImageTypeList.DataSource = GalleryHelper.GetPhotoCategories();
            this.ImageTypeList.DataBind();
        }

        private void ImageTypeEdit_Click(object sender, EventArgs e)
        {
            Dictionary<int, string> photoCategorys = new Dictionary<int, string>();
            for (int i = 0; i < this.ImageTypeList.Rows.Count; i++)
            {
                GridViewRow row = this.ImageTypeList.Rows[i];
                string text = ((TextBox) row.Cells[1].FindControl("ImageTypeName")).Text;
后面还有 76 行代码,购买后查看完整代码

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

AI 解读 AI

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

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