Exemple #1
0
        private void btn_alterar_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            Form_confirma entrada = new Form_confirma("CPF do Cliente", "Digite o CPF do Cliente:");

            entrada.ShowDialog();

            if (entrada.Valor != null)
            {
                // abrindo a janela de alunos no modo 3 (alterar)
                Form_cadastroCliente janelaCliente = new Form_cadastroCliente(3);
                janelaCliente.CpfCliente = entrada.Valor;
                if (janelaCliente.exibirCliente())
                {
                    janelaCliente.StartPosition = FormStartPosition.CenterParent;
                    janelaCliente.ShowDialog();
                }
            }
            this.Visible = true;

            /*Form_cadastroCliente form = new Form_cadastroCliente(2);
             * form.StartPosition = FormStartPosition.CenterParent;
             * form.ShowDialog(this);
             * ClienteDAO clientedao = new ClienteDAO();
             * dataGridView_cliente.DataSource = clientedao.ListAll();*/
        }
Exemple #2
0
        private void btn_nao_cadastrado_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            Form_cadastroCliente form = new Form_cadastroCliente(1);

            form.StartPosition = FormStartPosition.CenterParent;
            form.ShowDialog(this);
            this.Visible = true;
        }
Exemple #3
0
        private void btn_adicionar_Click(object sender, EventArgs e)
        {
            this.Visible = false;
            Form_cadastroCliente form = new Form_cadastroCliente(1);

            form.StartPosition = FormStartPosition.CenterParent;
            form.ShowDialog(this);

            ClienteDAO clientedao = new ClienteDAO();

            dataGridView_cliente.DataSource = clientedao.ListAll();
            this.Visible = true;
        }