chargetype.aspx.cs

来自「物业管理系统」· CS 代码 · 共 64 行

CS
64
字号
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;

public partial class admin_fixrepair : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (Convert.ToString(Session["code"]) == "")
        {
            Response.Redirect("../login.aspx");

        }
        if (!IsPostBack)
        {
            this.bind();
        }

    }


    public void bind()
    {
        BaseClass bc = new BaseClass();

        string strsql = "SELECT * from chargeFeeType";

        bc.ExecGridView(GridView1, strsql);//绑定数据



    }
protected void  GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
         this.GridView1.PageIndex = e.NewPageIndex;
        this.bind();
}

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
         if (e.Row.RowType == DataControlRowType.DataRow)
    {


       
        e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#22dd22';this.Style.color='buttontext';this.Style.cursor='default';");
        e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='';this.style.color='';");
    }
    }
}





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?