public Operations_SupplierSearch(string VendID) { InitializeComponent(); bool morePages; int absolutePage = 0; idnum_txt.Text = VendID; int lines = Properties.Settings.Default.linelimit; string whereClause = Construct_whereClause(); VendorPPSearch VendPP = new VendorPPSearch(DataList.EpicConn); try { VendorPPListDataSet VPPDS = VendPP.GetList(whereClause, lines, absolutePage, out morePages); SupplyGrid.DataSource = VPPDS.Tables[0]; } catch { } ReturnID = SupplyGrid["VendorNumVendorID", 0].Value.ToString(); ReturnAddress = SupplyGrid["Address1", 0].Value.ToString() + SupplyGrid["Address2", 0].Value.ToString() + SupplyGrid["Address3", 0].Value.ToString(); ReturnCity = SupplyGrid["City", 0].Value.ToString(); ReturnState = SupplyGrid["State", 0].Value.ToString(); ReturnZip = SupplyGrid["ZIP", 0].Value.ToString(); ReturnName = SupplyGrid["VName", 0].Value.ToString(); ReturnCountry = SupplyGrid["Country", 0].Value.ToString(); ReturnVendID = SupplyGrid["VendorNum", 0].Value.ToString(); ReturnDdsBillAddr = ReturnName + " " + ReturnAddress + " " + ReturnCity + " " + ReturnState + " " + ReturnZip + " " + ReturnCountry; this.DialogResult = DialogResult.OK; this.Close(); }
private void search_btn_Click(object sender, EventArgs e) { VendorPPSearch VendPP = new VendorPPSearch(DataList.EpicConn); string whereClause = Construct_whereClause(); int absolutePage = 0; bool morePages; VendorPPListDataSet VPPDS = VendPP.GetList(whereClause, Properties.Settings.Default.linelimit, absolutePage, out morePages); SupplyGrid.DataSource = VPPDS.Tables[0]; }