private void button3_Click(object sender, EventArgs e)
        {
            EstacionamentoService.EstacionamentoServiceClient client = new EstacionamentoService.EstacionamentoServiceClient();
            var valor = client.VagasRestantes();

            MessageBox.Show(String.Format("Vagas restantes '{0}'", valor));
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                EstacionamentoService.EstacionamentoServiceClient client = new EstacionamentoService.EstacionamentoServiceClient();
                var valor = client.VagasRestantes();
                client.Close();

                MessageBox.Show(String.Format("Numero de vagas restantes: {0}.", valor));
                textBox1.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string placa = textBox1.Text;

            try
            {
                EstacionamentoService.EstacionamentoServiceClient client = new EstacionamentoService.EstacionamentoServiceClient();
                client.Checkin(placa);
                client.Close();
                MessageBox.Show(String.Format("Placa '{0}' adicionada.", placa));
                textBox1.Text = string.Empty;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            string placa = textBox1.Text;

            try
            {
                EstacionamentoService.EstacionamentoServiceClient client = new EstacionamentoService.EstacionamentoServiceClient();
                var valor = client.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);
            }
        }