// Works private static void AddHCVPatientToDAL() { bool retCode = false; HCVDAL HCVDal = new HCVDAL(); HCV HCVObject = new HCV(HCVDal); HCVPatient newHCVPatient = new HCVPatient(); newHCVPatient = HCVObject.CreateHCVPatient("1231231231", "AZ", "N2H4J1"); retCode = HCVObject.AddHCVPatient(newHCVPatient); Console.WriteLine(retCode); }
// Works private static void UpdateHCVPatientInDAL() { bool retCode = false; HCVDAL HCVDal = new HCVDAL(); HCV HCVObject = new HCV(HCVDal); HCVPatient newHCVPatient = new HCVPatient(); newHCVPatient = HCVObject.CreateHCVPatient("1231321321", "AZ", "N1N1N1"); retCode = HCVObject.UpdateHCVPatient("9999999999", newHCVPatient); Console.WriteLine(retCode); }
// Works private static void GetHCVPatientFromDAL() { HCVDAL HCVDal = new HCVDAL(); HCV HCVObject = new HCV(HCVDal); List <HCVPatient> HCVpatient = new List <HCVPatient>(); string[] sendingString = { "1234567981" }; HCVpatient = HCVObject.GetHCVPatient(sendingString); foreach (HCVPatient x in HCVpatient) { Console.WriteLine("HCN: " + x.HealthCardNumber); Console.WriteLine("VCode: " + x.VCode); Console.WriteLine("Postal: " + x.PostalCode); Console.WriteLine(""); } }