Beispiel #1
0
        public List<string> CheckDB_AfterGet(PatientDto patient)
        {
            var errorList = new List<string>();
            CommonFun f = new CommonFun();
            errorList.AddRange(f.Check_MainDataInDB(patient.IdGlobal, patient));
            if (patient.Job != null)
                errorList.AddRange(f.Check_JobInDB(patient.IdGlobal, patient.Job));
            if (patient.BirthPlace != null)
                errorList.AddRange(f.Check_BirthPlaceInDB(patient.IdGlobal, patient.BirthPlace));
            if (patient.Contacts != null)
            {
                foreach (ContactDto contact in patient.Contacts)
                    errorList.AddRange(f.Check_ContactInDB(patient.IdGlobal, contact));
            }
            if (patient.Documents != null)
            {
                foreach (DocumentDto document in patient.Documents)
                    errorList.AddRange(f.Check_DocumentInDB(patient.IdGlobal, document));
            }
            if (patient.Addresses != null)
            {
                foreach (AddressDto address in patient.Addresses)
                    errorList.AddRange(f.Check_AddressInDB(patient.IdGlobal, address));
            }
            if (patient.Privilege != null)
                errorList.AddRange(f.Check_PrivilegeInDB(patient.IdGlobal, patient.Privilege));

            return errorList;
        }