/// <summary> /// 绑定列表 /// </summary> private void BindList() { /* 查找可出货工令 * SELECT m.* FROM( * select b.*,rcnam,(select sum(shipqact) rqty from shiping where shipsono=a.ordno and shipseq=b.seq) rqty * FROM contract a,contratdetail b,salrcm * WHERE a.ordno=b.ordno and a.custno=rccust * )m WHERE m.ordqty-m.rqty>0 */ using (PurProvider purProvider = new PurProvider()) { string orNo = ORDNO.Text.Trim(); if (orNo.Length > 0) { DataTable table = purProvider.GetShipNoticeList(orNo); if (table != null && table.Rows.Count > 0) { CustNo.Text = table.Rows[0]["custno"].ToString(); CustName.Text = table.Rows[0]["rcnam"].ToString(); RDate.Text = table.Rows[0]["deliverydate"].ToString(); } List.DataSource = table; List.DataBind(); } else { Initialize(); List.DataSource = null; List.DataBind(); } } }