예제 #1
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            //try
            // {
            ClienteTableAdapter taPessoa = new ClienteTableAdapter();

            taPessoa.Insert(txtNome.Text, txtSobrenome.Text, dtpDataNasc.Value, cbxSex.Text, txtEnd.Text, int.Parse(txtNumer.Text), txtBairro.Text, txtCidade.Text, cbxUF.Text, txtTel.Text, txtCel.Text, txtFoto.Text);
            MessageBox.Show("Cliente Cadastrada com sucesso!");
            Limpar_Caixa();
            txtCod.Text = taPessoa.UltimoCOD().ToString();
            this.Close();
            //}
            //catch(Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}
        }