private void btnValidEnter_Click(object sender, System.EventArgs e) { if (this.lblAssignID.Text.Trim() == "") { this.SetErrorMsgPageBydir("生产序号错误,请重新查询!"); return; } DataTable dtIn = (DataTable)Session["QUERY"]; if (dtIn == null || dtIn.Rows.Count == 0) { this.SetErrorMsgPageBydirHistory("没有任何需要验收的分货单内容,请检查生产序号是否正确!"); return; } string strDeptID = this.ddlValidDept.SelectedValue; string strAssignID = this.lblAssignID.Text.Trim(); string strReceiveOper = this.txtReceiveOper.Text.Trim(); string strValidDate = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString(); CMSMStruct.LoginStruct ls1 = (CMSMStruct.LoginStruct)Session["Login"]; Hashtable htPara = new Hashtable(); htPara.Add("strDeptID", strDeptID); htPara.Add("strAssignID", strAssignID); htPara.Add("strReceiveOper", strReceiveOper); htPara.Add("strValidDate", strValidDate); htPara.Add("strOperID", ls1.strOperName); Hashtable htapp = (Hashtable)Application["appconf"]; string strcons = (string)htapp["cons"]; StoBusi = new BusiComm.StorageBusi(strcons); try { if (StoBusi.AssignToValidEnterFinal(htPara, dtIn)) { this.SetSuccMsgPageBydir("订单验收入库成功!", "Storage/wfmBillValidEnter.aspx"); return; } else { this.SetErrorMsgPageBydir("订单验收入库时发生错误,请重试!"); return; } } catch (Exception er) { this.clog.WriteLine(er); this.SetErrorMsgPageBydir("查询错误,请重试!"); return; } }