/// <summary> /// 提交排托单 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnCommit_Click(object sender, EventArgs e) { BArriveDetailBB bb = new BArriveDetailBB(); try { //获取选中的数据Id foreach (GridViewRow gvrow in this.grid.Rows) { CheckBox chkId = (CheckBox)gvrow.FindControl("chkId"); if (chkId.Checked == true) { string strBillNo = ""; DataSet ds = new DataSet(); strBillNo = chkId.ValidationGroup; if (bb.ModifyRecordSC(strBillNo)) { this.BindGrid();//重新绑定到货单列表 return; } else { this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"更改生产到货单状态失败!\");", true); return; } } } this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert(\"请选择一条记录!\");", true); return; } finally { bb.Dispose(); } }