예제 #1
0
        private void lblCadastreSe_Click(object sender, EventArgs e)
        {
            frmCadastrar tela = new frmCadastrar();

            tela.Show();
            Hide();
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Model.Entities.tb_cliente cli    = new Model.Entities.tb_cliente();
            Business.ClienteBusiness  buscli = new Business.ClienteBusiness();
            cli.ds_cel      = txtCel.Text;
            cli.ds_cep      = txtCep.Text;
            cli.ds_cpf      = txtCpf.Text;
            cli.ds_email    = txtEmail.Text;
            cli.ds_rg       = txtRg.Text;
            cli.ds_tel      = txtTel.Text;
            cli.dt_nasc     = dtpNasc.Value;
            cli.end_cliente = txtEnd.Text;
            cli.uf_estado   = cboUf.Text;
            cli.nm_cliente  = txtNome.Text;
            cli.nu_cliente  = txtNu.Text;
            if (rdnF.Checked == true)
            {
                cli.ds_genero = "F";
            }
            else
            {
                cli.ds_genero = "M";
            }

            buscli.Inserir(cli);

            MessageBox.Show("Cadastro efetuado com sucesso", "Fast Care", MessageBoxButtons.OK, MessageBoxIcon.Information);

            frmCadastrar tela = new frmCadastrar();

            tela.Show();
            Hide();
        }