Beispiel #1
0
        // Botão cadastrar Pedido
        private void btnPedido_Click(object sender, EventArgs e)
        {
            if (comboBoxVenda.Text != "Selecione")
            {
                if (comboBox_FormaPgt.Text != "Selecione")
                {
                    string mensagem = controle.CadastrarPedidoCliente(comboBox_Produto.Text, txb_QntEstoque.Text, txbQnt.Text, txbValorPorUnidade.Text, comboBox_Cliente.Text, comboBoxVenda.Text, comboBox_FormaPgt.Text, txbDesconto.Text, txbValorTotal.Text, comboBoxPlataformaVirtual.Text);
                    if (controle.verificacao)
                    {
                        MessageBox.Show("Cadastrado com sucesso!");
                    }

                    else
                    {
                        MessageBox.Show("Erro ao realizar o cadastro!");
                    }
                }
                else
                {
                    MessageBox.Show("Selecione o meio do pagamento!");
                }
            }
            else
            {
                MessageBox.Show("Selecione o tipo da venda!");
            }
        }