private void DBBind(string strstate) { string strPoID = this.txtPoID.Text.Trim(); string strProvider = this.ddlProvider.SelectedValue; string strCycle = this.txtCycle.Text.Trim(); string strPoState = this.ddlPoState.SelectedValue; if (strstate == "") { if (strPoState == "全部") { strPoState = ""; } } else { strPoState = strstate; } if (strProvider == "全部") { strProvider = ""; } Hashtable htPara = new Hashtable(); htPara.Add("strPoID", strPoID); htPara.Add("strProvider", strProvider); htPara.Add("strCycle", strCycle); htPara.Add("strPoState", strPoState); Hashtable htapp = (Hashtable)Application["appconf"]; string strcons = (string)htapp["cons"]; StoBusi = new BusiComm.StorageBusi(strcons); try { DataTable dtout = StoBusi.GetPoStockMain(htPara); if (dtout == null) { this.SetErrorMsgPageBydir("查询出错,请重试!"); return; } else { this.TableConvert(dtout, "供应商编码", "Provider"); this.TableConvert(dtout, "订单状态", "tbNameCodeToStorage", "vcCommSign='PoState'"); dtout.TableName = "订单列表"; DataTable dtexcel = dtout.Copy(); Session["QUERY"] = dtout; } UcPageView1.MyDataGrid.PageSize = 20; DataView dvOut = new DataView(dtout); this.UcPageView1.MyDataSource = dvOut; this.UcPageView1.BindGrid(); } catch (Exception er) { this.clog.WriteLine(er); this.SetErrorMsgPageBydir("查询错误,请重试!"); return; } }