Exemplo n.º 1
0
        public static PetVaccination fillVaccination(DataRow row)
        {
            PetVaccination petVacc = new PetVaccination();

            petVacc.vaccination.vaccinationNumber = Convert.ToInt32(row["vaccination_number"].ToString());
            petVacc.vaccination.name = row["vaccination_name"].ToString();
            string expireDate = row["VACCINATION_EXPIRY_DATE"].ToString();

            petVacc.expirationDate = (expireDate.Length > 0) ? Convert.ToDateTime(expireDate) : DateTime.MinValue;
            //petVacc.expirationDate = Convert.ToDateTime(row["VACCINATION_EXPIRY_DATE"].ToString());
            string valid = row["VACCINATION_CHECKED_STATUS"].ToString();

            petVacc.isValidated = (valid.Length > 0) ? Convert.ToChar(valid) : 'N';
            //petVacc.isValidated = Convert.ToChar(row["VACCINATION_CHECKED_STATUS"].ToString());
            return(petVacc);
        }
Exemplo n.º 2
0
 public bool removeVaccination(PetVaccination petVaccination)
 {
     return(this.vaccinationList.Remove(petVaccination));
 }
Exemplo n.º 3
0
 public bool addVaccination(PetVaccination petVaccination)
 {
     this.vaccinationList.Add(petVaccination);
     return(true);
 }