public void listAddClick(int index) { Internet.send(new ExecutiveToServer() { requestType = RequestType.GetThird, searchString = textBox2.Text, equipmentId = list[index].id }); ServerToExecutive response = Internet.receive(); result = response.equipments[0]; DialogResult = DialogResult.OK; Close(); }
private void button2_Click(object sender, EventArgs e) { try { Internet.send(new ExecutiveToServer() { requestType = RequestType.GetFirst, searchString = textBox2.Text }); ServerToExecutive response = Internet.receive(); if (response.success) { list = response.equipments; Searcher_Resize(null, null); } }catch (Exception ex) { } }