Web8/Admin/zidian/list.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Tc.Web.Admin.zidian
{
    public partial class list : AdminBase
    {
        protected string types = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            types = Request.QueryString["types"].GetString().FilterSql();
            if (!IsPostBack)
            {
                BindGridView();
            }
        }

        private void BindGridView()
        {
            gvqy.DataSource = BLL.TcZidian.Instance.GetList("types='" + types + "'").Tables[0].OrderBy("paixu");
            gvqy.DataBind();

            LibCache.remove(LibCache.tc_zidian);
        }

        //处于编辑状态
        protected void gvqy_RowEditing(object sender, GridViewEditEventArgs e)
        {
            gvqy.EditIndex = e.NewEditIndex;
            BindGridView();
        }

        //取消编辑
        protected void gvqy_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
        {
            gvqy.EditIndex = -1;
            BindGridView();
        }

        //执行编辑
        protected void gvqy_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            int qyid = gvqy.DataKeys[e.RowIndex][0].GetString().GetInt();
            TextBox txtqymc = gvqy.Rows[e.RowIndex].FindControl("txtqymc") as TextBox;
            TextBox txtqypx = gvqy.Rows[e.RowIndex].FindControl("txtqypx") as TextBox;

            BLL.TcZidian bbk = new BLL.TcZidian();
            Model.TcZidian mbk = new Model.TcZidian();
            mbk = bbk.GetModel(qyid);
            mbk.Name = txtqymc.Text;
            mbk.Paixu = txtqypx.Text.GetInt();
            mbk.Types = types;
            bbk.Update(mbk);
            gvqy.EditIndex = -1;
            BindGridView();
后面还有 32 行代码,购买后查看完整代码

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

AI 解读 AI

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

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