private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "") { client_name = textBox1.Text; client_add = textBox2.Text; email = textBox3.Text; book = (ShopService.Title)comboBox1.SelectedValue; quantity = Convert.ToInt32(textBox4.Text); DialogResult = DialogResult.OK; } }
private void button1_Click(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { string[] item = ((string)listBox1.SelectedItem).Split(':'); ShopService.Title t = (ShopService.Title)Enum.Parse(typeof(ShopService.Title), item[0]); WarehouseService.Title t2 = (WarehouseService.Title)Enum.Parse(typeof(WarehouseService.Title), item[0]); int quant = int.Parse(item[1]); proxyShop.warehouseDispatch(t, quant); proxyWH.deliverRequest(t2); actualizar(); } }