918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/a99112df/ca2a8923/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/a99112df/ca2a8923/App_Web_wh-_kcfk.25.cs
?#pragma checksum "D:\wwwroot\ldxynb\wwwroot\Back\info\wenzhangmima.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "35A58CC2D374CB606A7B660499E44C5E"

#line 1 "D:\wwwroot\ldxynb\wwwroot\Back\info\wenzhangmima.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.IO;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.OleDb;
using CoreClass;
using System.Data.SqlClient;

public partial class Back_Info_wenzhangmima : System.Web.UI.Page
{
    #region 域界说

    CoreClass.DBCommon dbc = new DBCommon();
    CoreClass.PublicFunction pubfun = new PublicFunction();
    Zhongbiao bs = new Zhongbiao();
    public int adminid;
    public int channelid;
    public string col = "info";
    #endregion

    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            dlBind();
        }
    }
     
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            ((LinkButton)(e.Row.Cells[4].Controls[0])).Attributes.Add("onclick", "return confirm('确定要删除吗?')");


            e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='LightSkyBlue'");//鼠标移入显示的色彩
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='FFFFFF'");//鼠标移出显示的色彩 



            if (e.Row.Cells[1].Text.Length > 30)
            {

                e.Row.Cells[1].Text = e.Row.Cells[1].Text.Substring(0, 30) + "...";

            }


        }
    }
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());//删除数据字段; <%# pubfun.SubStringByByte(Eval("title").ToString(),26) %>
       
        DataSet dt_zhianss = bs.chaxun("select top 1 * from Info  where Infoid=" + id );
        if (dt_zhianss.Tables[0].Rows.Count>0)
        {
            if (Session["AdminPassport"] != null && Session["AdminPassport"].ToString() != "")
            {
                bs.user("insert into rizhi(rz_bt,rz_nr,rz_czr,rz_time) values('删除信息','" + dt_zhianss.Tables[0].Rows[0]["title"].ToString() + "','" + Session["AdminPassport"].ToString() + "','" + System.DateTime.Now.ToString() + "' )");

            }
        }
       
        bs.user("delete from Info where Infoid=" + id);
        dlBind();
        
    }
   
    public void dlBind()
    {
        bs.bind("select * from Info where econtent<>'' and econtent<>'&nbsp;' order by Infoid desc", GridView1);

        
        //this.GridView1.DataSource = ps;
        //this.GridView1.DataBind();
        
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        dlBind();
    }

   
}



#line default
#line hidden