Plan/List.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 System.Collections.Generic;

public partial class Plan_List : PageBase
{
    Maticsoft.BLL.db_Plan db = new Maticsoft.BLL.db_Plan();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ViewState["cid"] = this.ext_string(Request.QueryString["cid"]);
            this.cid.Value = ViewState["cid"].ToString();
            Band();
        }
    }
    public void Band()
    {
        List<Maticsoft.Model.db_Plan> list = new List<Maticsoft.Model.db_Plan>();

        string sqlwhere = " 1=1 ";
        sqlwhere += this.txtstarttime.Value != "" ? " and AddTime>='" + this.txtstarttime.Value + "'" : "";
        sqlwhere += this.txtendtime.Value != "" ? " and AddTime<='" + this.txtendtime.Value + "'" : "";
        sqlwhere += " and Category='" + ViewState["cid"] + "'";
        list = db.GetModelList(sqlwhere);
        AspNetPager1.RecordCount = list.Count;
        PagedDataSource pdsList = new PagedDataSource();
        pdsList.DataSource = list;
        pdsList.AllowPaging = true;
        pdsList.PageSize = AspNetPager1.PageSize;
        pdsList.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
        this.repList.DataSource = pdsList;
        this.repList.DataBind();
    }
    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        Band();
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        string cmd = e.CommandName;
        string id = ext_string(e.CommandArgument);
        if (cmd == "del")
        {
            db.Delete(id);
            Band();
        }
        else if (cmd == "sel")
后面还有 10 行代码,购买后查看完整代码

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

AI 解读 AI

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

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