Esempio n. 1
0
        public ActionResult DiseaseBarChartReport(DiseaseDate diseaseDate)
        {
            if (!ModelState.IsValid)
            {
                return(View(diseaseDate));
            }
            var districtWiseReport = headManager.GetPatientOfDiseaseIndisease(diseaseDate.DiseaseId, diseaseDate.BeginDateTime, diseaseDate.EndDateTime);
            var districtList       = headManager.GetDistrictList();

            ViewBag.DistrictList = new SelectList(districtList, "Id", "Name");
            ArrayList headerData = new ArrayList {
                "Disease Name", "No of Patient"
            };
            ArrayList data = new ArrayList();

            data.Add(headerData);
            foreach (var d in districtWiseReport)
            {
                ArrayList data1 = new ArrayList {
                    d.DiseaseName, d.Patient
                };
                data.Add(data1);
            }
            string datastr = JsonConvert.SerializeObject(data, Formatting.None);

            ViewBag.Data = new HtmlString(datastr);
            return(View());
        }