BookShop.Web/Member/DeliveryList.aspx.cs

(开头部分) 1KB

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

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


using CTL.Common;

namespace BookShop.Web.Member
{
    public partial class DeliveryList : System.Web.UI.Page
    {
        /// <summary>
        /// 页面加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
        }


        /// <summary>
        /// 绑定数据
        /// </summary>
        private void BindData()
        {
            repeater.DataSource = DeliveryBLL.GetDeliveryList();
            repeater.DataBind();
        }


        /// <summary>
        /// 事件操作
        /// </summary>
        /// <param name="source"></param>
        /// <param name="e"></param>
        protected void repeater_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            int deliveryID = Utils.StrToInt(e.CommandArgument);

            if (e.CommandName == "del")
            {
                if (DeliveryBLL.DeleteDelivery(deliveryID))
                {
                    WebUtility.Alert("删除成功!");
                }
                else
                {
                    WebUtility.Alert("删除失败!");
                }
            }

            if (e.CommandName == "setDefault")
后面还有 8 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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