コード例 #1
0
        public void addDiseaseDetails(DiseaseModel diseaseModel)

        {
            Disease disease = new Disease();

            disease.DiseaseName                = diseaseModel.DiseaseName;
            disease.DiseaseSeverity            = new Severity();
            disease.DiseaseSeverity.SeverityId = diseaseModel.DiseaseSeverity.SeverityId;
            disease.DiseaseCause               = new Cause();
            disease.DiseaseCause.CauseId       = diseaseModel.DiseaseCause.CauseId;
            disease.DiseaseDescription         = diseaseModel.DiseaseDescription;
            Business business = new Business();

            business.addDiseaseDetails(disease);
        }
コード例 #2
0
        public List <DiseaseModel> displayDisease()
        {
            List <Disease> diseases = new List <Disease>();
            Business       business = new Business();

            diseases = business.displayDisease();
            List <DiseaseModel> diseaseModels = new List <DiseaseModel>();

            foreach (var disease in diseases)
            {
                DiseaseModel diseaseModel = new DiseaseModel();
                diseaseModel.DiseaseId   = disease.DiseaseId;
                diseaseModel.DiseaseName = disease.DiseaseName;
                diseaseModels.Add(diseaseModel);
            }

            return(diseaseModels);
        }