//List<Animal> animalList; //Although we need to work for Cattle in the project, but polymorphism will allow animalList to contain Cattle objects. 02-Jan public AnimalEntryView() { InitializeComponent(); //Added - 2 Jan, 2015 animalHandler = new AnimalsHandler(); //animalList = new List<Animal>(); comboBoxAnimalType.ItemsSource = animalHandler.GetAnimalTypes(); comboBoxBreed.ItemsSource = animalHandler.GetAnimalBreeds(); comboBoxSource.ItemsSource = animalHandler.GetAnimalSources(); //Commented on April-01 //Statuses should be on the basis of the gender //comboBoxStatus.ItemsSource = animalHandler.GetAnimalStatuses(); List <string> genderList = new List <string>(); genderList.Add("Male"); genderList.Add("Female"); comboBoxGender.ItemsSource = genderList; //Commented on 31-March. Now Gender will not be FK anymore //comboBoxGender.ItemsSource = animalHandler.GetGenders(); }
//List<Animal> animalList; //Although we need to work for Cattle in the project, but polymorphism will allow animalList to contain Cattle objects. 02-Jan public CalfEntryView() { InitializeComponent(); //Added - 2 Jan, 2015 animalHandler = new AnimalsHandler(); //animalList = new List<Animal>(); comboBoxAnimalType.ItemsSource = animalHandler.GetAnimalTypes(); comboBoxBreed.ItemsSource = animalHandler.GetAnimalBreeds(); comboBoxSource.ItemsSource = animalHandler.GetAnimalSources(); //Commented on 01-Apr. No Status required for Calf //comboBoxStatus.ItemsSource = animalHandler.GetAnimalStatuses(); comboBoxGender.ItemsSource = animalHandler.GetGenders(); //Added on 01-April - Add Artificial Insemination in Fathers Tab List <Cattle> maleCattleList = new List <Cattle>(); maleCattleList = animalHandler.GetCattlesMale(); Cattle artificialInsemnation = new Cattle(); artificialInsemnation.TagNo = "Artificial Insemnation"; maleCattleList.Add(artificialInsemnation); comboBoxFather.ItemsSource = maleCattleList; //Added on 02-April - Add Artificial Insemination in Fathers Tab List <Cattle> femaleCattleList = new List <Cattle>(); femaleCattleList = animalHandler.GetCattlesFemale(); Cattle otherFarm = new Cattle(); otherFarm.TagNo = "Other Farm"; femaleCattleList.Add(otherFarm); comboBoxMother.ItemsSource = femaleCattleList; }