/// <summary> /// 绑定列表 /// </summary> private void BindList() { using (PurProvider purProvider = new PurProvider()) { string shipNo = ShipNo.Text.Trim(); if (shipNo.Length > 0) { DataTable table = purProvider.GetShipList(shipNo); if (table != null && table.Rows.Count > 0) { ORDNO.Text = table.Rows[0]["shipsono"].ToString(); CustNo.Text = table.Rows[0]["shipcustno"].ToString(); CustName.Text = table.Rows[0]["shipcustname"].ToString(); RDate.Text = table.Rows[0]["deliverydate"].ToString(); } List.DataSource = table; List.DataBind(); } else { Initialize(); List.DataSource = null; List.DataBind(); } } }