您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->无忧劳保库存系统源码>>SuppliersIDSelect.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:无忧劳保库存系统源码
当前文件:文件类型 Labor/SuppliersIDSelect.aspx.cs打开代码结构图
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using SqlHelper; 12public partial class SuppliersIDSelect : System.Web.UI.Page 13{ 14 Helper he = new Helper(); 15 16 static int i = 1;//页数 17 18 static int index;//员工编码号 19 20 static string DNo;//部门编号 21 22 static String DName;//部门名字 23 24 static String fm;//隐藏域 25 26 protected void Page_Load(object sender, EventArgs e) 27 { 28 GridView1.DataSource = he.BindSuppliersInfo(); 29 30 31 if (!IsPostBack) 32 { 33 this.hiddenfm.Value = (string)Request["name"]; 34 35 Label1.Text = "当前页码是" + Convert.ToString(GridView1.PageIndex + i); 36 37 GridView1.DataBind(); 38 } 39 } 40 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) 41 { 42 if (e.CommandName == "select") 43 { 44 if (this.hiddenfm.Value == "select") 45 { 46 //获取员工的编号 47 index = Convert.ToInt32(e.CommandArgument); 48 //根据行编号,获取选择的整行 49 GridViewRow selectedRowu = this.GridView1.Rows[index]; 50 //获取学生编号 51 DNo = selectedRowu.Cells[0].Text; 52 53 Response.Write("<script language='javascript'>opener.document.all.TxtCode.value='" + DNo + "';window.close();</script>"); 54 } 55 56 } 57 } 58 protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) 59 { 60 GridView1.PageIndex = e.NewPageIndex; 61 62 Label1.Text = "当前页码是" + Convert.ToString(GridView1.PageIndex + i); 63 64 GridView1.DataBind(); 65 } 66} 67
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:无忧劳保库存系统源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号