Web/Manage/category/Manage_category.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SL.BLL;
using SL.Common;
public partial class Manage_category : System.Web.UI.Page
{
private SL.BLL.category bll = new SL.BLL.category();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
((Label)Master.FindControl("titleMsg")).Text = "管理商品类别";
ShowAll();
}
}
/// <summary>
/// 显示全部数据
/// </summary>
private void ShowAll()
{
int count = 0;
DataSet ds = bll.GetAll(AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize, out count);
AspNetPager1.RecordCount = count;
categoryGrid.DataSource = ds.Tables[0].DefaultView;
categoryGrid.DataKeyNames = new string[] { "cid" };
categoryGrid.DataBind();
}
/// <summary>
/// Grid删除按钮
/// </summary>
protected void categoryGrid_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
bool isDelete = bll.Delete(int.Parse(categoryGrid.DataKeys[e.RowIndex].Value.ToString()));
ShowAll();
if (isDelete)
{
Msg.Show("删除记录成功!");
}
else
{
Msg.Show("删除记录失败!");
}
}
/// <summary>
/// 删除所有选中按钮
/// </summary>
protected void DeleteAll_Click(object sender, EventArgs e)
{
后面还有 39 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
