private void Button2_Click(object sender, System.EventArgs e) { //生产产品入库 DataTable dtProductSerial = GetProduct(); ArrayList alProductSerial = new ArrayList(); if (dtProductSerial.Rows.Count > 0) { foreach (DataRow dr in dtProductSerial.Rows) { ProductSerial ps = new ProductSerial(dr); ps.cndCreateDate = Convert.ToDateTime(TextBox1.Text); ps.cnvcOperID = oper.strLoginID; ps.cnvcDeptID = ddlDept.SelectedValue; alProductSerial.Add(ps); } OperLog ol = new OperLog(); ol.cnvcDeptID = oper.strDeptID; ol.cnvcOperID = oper.strLoginID; ol.cnvcOperType = "生产产品入库"; ProductFacade pf = new ProductFacade(); pf.AddProductSerial(alProductSerial, ol); this.Popup("生产产品入库成功!"); //清理数据 Session.Remove("tbProductSerial"); BindGrid(); } }