protected void btnOK_Click(object sender, System.EventArgs e) { try { DataTable dtOrderAdd = (DataTable)Session["ProductList"]; OrderFacade order = new OrderFacade(); string strOrderSerialNo = txtOrderSerialNo.Text; OperLog operLog = new OperLog(); operLog.cnvcOperID = oper.strLoginID; operLog.cnvcDeptID = oper.strDeptID; operLog.cnvcOperType = "加单"; order.OrderAdd(strOrderSerialNo, ddlAddType.SelectedValue, txtAddComments.Text, dtOrderAdd, operLog); Session["ProductList"] = null; btnCancel_Click(null, null); btnOK.Visible = false; Popup("加单成功"); DataTable dtOrderBookDetail = (DataTable)Session["ProductList"]; this.DataGrid2.DataSource = dtOrderBookDetail; this.DataGrid2.DataBind(); } catch (Exception ex) { Popup(ex.Message); } }