⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipmanage.aspx.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Analytics
{
    using PowerEasy.Analytics;
    using PowerEasy.Common;
    using PowerEasy.Controls;
    using PowerEasy.Model.Analytics;
    using PowerEasy.Web.UI;
    using System;
    using System.Web.UI.WebControls;

    public class IPManage : AdminPage
    {
        protected Button BtnSearch;
        protected ExtendedGridView ExtendedGridView1;
        protected Label LblCount;
        protected ObjectDataSource OdsStatIPInfo;
        protected ExtendedSiteMapPath SmpNavigator;
        protected TextBox TxtSearchAddress;
        protected TextBox TxtSearchIP;
        protected RegularExpressionValidator ValeStartIP;

        protected void ExtendedGridView1_DataBound(object sender, EventArgs e)
        {
            this.LblCount.Text = IPStorage.GetTotal().ToString();
        }

        protected void ExtendedGridView1_RowCommand(object sender, CommandEventArgs e)
        {
            if ((e.CommandName == "EditIP") || (e.CommandName == "DelIP"))
            {
                GridViewRow row = ((GridView) sender).Rows[Convert.ToInt32(e.CommandArgument)];
                string commandName = e.CommandName;
                if (commandName != null)
                {
                    if (!(commandName == "EditIP"))
                    {
                        if (!(commandName == "DelIP"))
                        {
                            return;
                        }
                    }
                    else
                    {
                        this.Context.Items.Add("startIP", ((Label) row.FindControl("LblStartIP")).Text);
                        this.Context.Items.Add("endIP", ((Label) row.FindControl("LblEndIP")).Text);
                        this.Context.Items.Add("address", row.Cells[2].Text);
                        base.Server.Transfer("IPAdd.aspx?Action=Edit");
                        return;
                    }
                    StatIPInfo info = new StatIPInfo();
                    info.StartIP = StringHelper.EncodeIP(((Label) row.FindControl("LblStartIP")).Text);
                    info.EndIP = StringHelper.EncodeIP(((Label) row.FindControl("LblEndIP")).Text);
                    if (IPStorage.Delete(info))
                    {
                        this.ExtendedGridView1.DataBind();
                    }
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -