private void button2_Click(object sender, EventArgs e) { string placa = textBox1.Text; try { Estacionamento.Service.EstacionamentoService proxy = new Estacionamento.Service.EstacionamentoService(); var valor = proxy.Checkout(placa); MessageBox.Show(String.Format("Placa '{0}' valor de R${1}.", placa, valor)); textBox1.Text = string.Empty; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { string placa = textBox1.Text; try { Estacionamento.Service.EstacionamentoService proxy = new Estacionamento.Service.EstacionamentoService(); proxy.Checkin(placa); MessageBox.Show(String.Format("Placa '{0}' adicionada.", placa)); textBox1.Text = string.Empty; } catch (Exception ex) { MessageBox.Show(ex.Message); } }