ipmanage.aspx.cs
来自「动易SiteFactory™ 网上商店系统1.0源代码」· CS 代码 · 共 67 行
CS
67 行
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 + =
减小字号Ctrl + -
显示快捷键?