private void BtnAtualizar_Click(object sender, EventArgs e) { if (codAnimalselecionado > 0) { animalServico.Atualizar( new Modelo.Animal() { AnimalID = codAnimalselecionado, ClienteID = Codcliente, Nome = txtNome.Text, Idade = Convert.ToInt16(txtIdade.Text), Tipo = cbxTipo.Text, Sub_tipo = cbxSubtipo.Text, Raca = txtRaca.Text, Date = DateTime.Now }); txtNome.Clear(); txtIdade.Clear(); txtRaca.Clear(); RefreshDataGridView(); } else { MessageBox.Show("selecione um animal"); } }