日期:2014-05-17 浏览次数:20438 次
protected void GridViewD_RowCommand(object sender, GridViewCommandEventArgs e) { if ("EditRow".Equals(e.CommandName)) { string id = e.CommandArgument.ToString(); this.ModalPopupExtender1.Show(); } }
protected void Page_Load(object sender, EventArgs e) { if (getuser.Strcomid == null) Response.Redirect("index.aspx"); if (!Page.IsPostBack) { System.Data.SqlClient.SqlConnection sqlConn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbsysConnectionString"].ConnectionString.ToString()); sqlConn.Open(); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter("SELECT ents_sid,ents_pid,ents_comid, ents_code,ents_type, ents_mid, pro_ape, pro_spe, ents_qty, ents_wid,ents_price,ents_amount, ents_discount, ents_disrate,ents_gamount,ents_present,ents_oth1,ents_rem FROM dbo.GetEntryDinfo where ents_mid='" + get_value.Getcontrolstr + "' and ents_type=11 and ents_comid='" + getuser.Strcomid + "'", sqlConn); da.Fill(dt); da.Dispose(); sqlConn.Close(); GridViewD.DataSource = dt; //this.GridViewD.DataKeyNames = new string[] { "ents_sid" }; GridViewD.DataBind(); } }