private void btnEnter_Click(object sender, EventArgs e) { string search = inputSpecies.Text; userData data = new userData(); if (data.Verification(search, ref animalNum)) { panelContent.Show(); } else { noExistAnimal.Show(); } }
private void btnEnter_Click(object sender, EventArgs e) { string add = inputAddNew.Text; userData data = new userData(); int animalNum = 0; if (!data.Verification(add, ref animalNum)) { panelAdd.Show(); nameAnimal.Text = add; } else { existAnimal.Show(); } }
private void btnRemove_Click(object sender, EventArgs e) { string search = inputSpecies.Text; userData data = new userData(); if (data.Verification(search, ref animalNum)) { numberDeleteMale.Text = "0"; numberDeleteFemale.Text = "0"; textSuccesDeleted.Hide(); textSuccesAdded.Hide(); panelDelete.Show(); } else { noExistAnimal.Show(); } }
private void btnSearch_Click(object sender, EventArgs e) { string search = inputSearch.Text; userData data = new userData(); int animalNum = 0; if (data.Verification(search, ref animalNum)) { panelContent.Show(); nameAnimal.Text = data.Animals[animalNum]; quantityMale.Text = data.Quantity[animalNum, 0].ToString(); quantityFemale.Text = data.Quantity[animalNum, 1].ToString(); priceAnimal.Text = data.Price[animalNum].ToString() + "$"; } else { noExistAnimal.Show(); } }