boguCms/App_Admin/product/midList.aspx.cs

(开头部分) 3KB

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

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using AccessDal;
using Model;
using System.IO;

public partial class App_Admin_product_midList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            GetPage();
        }
    }

    private void GetPage()
    {
        int bid = Convert.ToInt32(Request.QueryString["p"]);
        AspNetPager1.RecordCount = ProMidOpe.GetCount(Convert.ToInt32(Request.QueryString["p"]));
        int StartRecord = AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1);
        int MaxRecord = AspNetPager1.PageSize;
        gridIma.DataSource = ProMidOpe.GetList(Convert.ToInt32(Request.QueryString["p"]),StartRecord,MaxRecord);
        gridIma.DataBind();

        lblbname.Text = ProBigOpe.GetOneBig(bid).BName.ToString();

        for (int i = 0; i < gridIma.Rows.Count; i++)
        {
            Label lblcount=(Label)gridIma.Rows[i].FindControl("lblcount");
            int id = Convert.ToInt32(gridIma.DataKeys[i].Value);
            lblcount.Text = Product.GetCountMid(id).ToString();
        }
        hypInsert.NavigateUrl = "AEmid.aspx?c="+Request.QueryString["p"];
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        GetPage();
    }
    protected void gridIma_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int i = e.RowIndex;
        int id = Convert.ToInt32(gridIma.DataKeys[i].Value);
        if (ProMidOpe.GetCount(id) != 0)
        {
            Page.RegisterStartupScript("<script>", "<script>alert('内有商品,不能删除!');location.href='biglist.aspx';</script>");
        }
        else
        {
            ProMidOpe.Delete(id);
        }
        GetPage();
    }
    protected void lbdelete_Click(object sender, EventArgs e)
    {
后面还有 39 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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