private void chartMHIVRapidTest_Load(object sender, EventArgs e) { _h = DataRepository.GetHIVRapidNumberofTestSummary(_ForecastId); double total=_h.Screening+_h.Confirmatory+_h.TieBreaker; //double[] yval1 = string[] xval = { "Screening", "Confirmatory", "Tie-Breaker" }; if (total > 0) { double[] yval = { (_h.Screening / total), (_h.Confirmatory / total), (_h.TieBreaker / total) }; chart1.Series["Series2"].Points.DataBindXY(xval, yval); } else { chart1.Series["Series2"].Points.DataBindXY(xval, new double[]{ 0, 0, 0}); } }
public HIVRapidNumberofTest RapidNumberofTest() { if (_rapidNumaberOfTest == null) { _rapidNumaberOfTest = new HIVRapidNumberofTest(); _rapidNumaberOfTest.ForecastId = Forecast.Id; _rapidNumaberOfTest.SiteId = ArtSite.Site.Id; _rapidNumaberOfTest.Screening = _s1 + _s2 + _s3; _rapidNumaberOfTest.Confirmatory = _c1 + _c2 + _c3; _rapidNumaberOfTest.TieBreaker = _t1 + _t2 + _t3; } return _rapidNumaberOfTest; }