|
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/ |
?#pragma checksum "D:\wwwroot\ldxynb\wwwroot\Back\info\zbxx.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "F16E5E32C6CC805939684BCB80F73991"
#line 1 "D:\wwwroot\ldxynb\wwwroot\Back\info\zbxx.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_zbxx : 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[15].Controls[0])).Attributes.Add("onclick", "return confirm('确定要删除吗?')");
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#f6f6f6'");//鼠标移入显示的色彩
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#FFFFFF'");//鼠标移出显示的色彩
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int id = int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString());//删除数据字段;
DataSet dt_zhianss = bs.chaxun("select top 1 * from zhiban1 where zb_id=" + 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]["zb_lingdao"].ToString() + dt_zhianss.Tables[0].Rows[0]["zb_mingjing"].ToString() + "','" + Session["AdminPassport"].ToString() + "','" + System.DateTime.Now.ToString() + "' )");
}
}
bs.user("delete from zhiban1 where zb_id=" + id);
dlBind();
}
public void dlBind()
{
bs.bind("select * from zhiban1 order by zb_id ", GridView1);
//this.GridView1.DataSource = ps;
//this.GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
dlBind();
}
//字体色彩
public string bangfahuo(string strss)
{
if (strss=="未发货")
{
strss = "<font color='red'>未发货</font>";
}
if (strss == "已发货")
{
strss = "<font color='green'>已发货</font>";
}
return strss;
}
//截取字符串 显示新闻标题前30字
public string bangjiequ(string strss, int id)
{
if (strss.IndexOf("|") > -1)
{
string[] stsszu = strss.Split('|');
strss = stsszu[0].ToString();
}
if (strss.Length > id)
{
strss = strss.Substring(0, id);
}
return strss;
}
}
#line default
#line hidden