Beispiel #1
0
        public SymptomsOrDiseaseDO GetSymptomsOrDiseaseDetails(string symptoms)
        {
            /*SymptomsOrDiseaseDO symptomsOrDiseaseDO = new SymptomsOrDiseaseDO();
             * SymptomsOrDisease symptomsOrDisease = healthAndFitnessDBEntities.SymptomsOrDiseases.FirstOrDefault(x => x.SymptomsOrDiseaseName.Equals(symptoms));
             * if (symptomsOrDisease != null)
             * {
             *  symptomsOrDiseaseDO.SymptomsOrDiseaseName = symptomsOrDisease.SymptomsOrDiseaseName;
             *  symptomsOrDiseaseDO.Medication = symptomsOrDisease.Medication;
             *  symptomsOrDiseaseDO.Tests = symptomsOrDisease.Tests;
             *  symptomsOrDiseaseDO.Cure = symptomsOrDisease.Cure;
             * }
             * return symptomsOrDiseaseDO;*/
            SymptomsOrDiseaseDO symptomsOrDiseaseDO = this.CSVHelper.Read <SymptomsOrDiseaseDO, SymptomsOrDiseaseMap>().FirstOrDefault(x => x.SymptomsOrDiseaseName.Equals(symptoms));

            return(symptomsOrDiseaseDO);
        }
Beispiel #2
0
        public ActionResult SearchSymptom(FormCollection formCollection)
        {
            string              symptom             = formCollection["Symptoms"];
            UserInfoDO          userInfo            = Session["UserInfo"] as UserInfoDO;
            SymptomsOrDiseaseBL symptomsOrDisease   = new SymptomsOrDiseaseBL();
            SymptomsOrDiseaseDO symptomsOrDiseaseDO = symptomsOrDisease.GetSymptomsOrDiseaseDetails(symptom);

            if (symptomsOrDiseaseDO != null && symptomsOrDiseaseDO.SymptomsOrDiseaseName != null)
            {
                Session["MedicalDetails"] = symptomsOrDiseaseDO.SymptomsOrDiseaseName + "," + symptomsOrDiseaseDO.Medication + "," + symptomsOrDiseaseDO.Tests + "," + symptomsOrDiseaseDO.Cure;
            }
            else
            {
                Session["MedicalDetails"] = "None";
            }
            return(RedirectToAction("DashBoard"));
        }