Ejemplo n.º 1
0
 public SurveyBase CreateCopy(int newTypeId, int roundsId, int surveyTimingId, string roundsName, string timingName)
 {
     SurveyRepository repo = new SurveyRepository();
     SurveyBase copy = new SurveyBase();
     copy.TypeOfSurvey = repo.GetSurveyType(newTypeId);
     copy.AdminLevels = AdminLevels;
     copy.StartDate = StartDate;
     copy.EndDate = EndDate;
     copy.SiteType = Translations.Sentinel;
     copy.SiteTypeId = SiteTypeId.Sentinel;
     copy.Notes = Notes;
     copy.HasSentinelSite = true;
     copy.IndicatorValues.Add(new IndicatorValue { DynamicValue = "0", IndicatorId = roundsId, Indicator = copy.TypeOfSurvey.Indicators[roundsName] });
     copy.IndicatorValues.Add(new IndicatorValue { DynamicValue = Translations.Baseline, IndicatorId = surveyTimingId, Indicator = copy.TypeOfSurvey.Indicators[timingName] });
     return copy;
 }
Ejemplo n.º 2
0
 //Worksheet 4: Mapping Survey
 //no aggregation - list all
 //all Oncho Mapping indicators
 private void Add4(excel.Worksheet xlsWorksheet, excel.Range rng, List<AdminLevel> districts, DateTime start, DateTime end, int month)
 {
     ReportOptions options = new ReportOptions { MonthYearStarts = month, StartDate = start, EndDate = end, IsCountryAggregation = false, IsByLevelAggregation = false, IsAllLocations = true, IsNoAggregation = true };
     SurveyRepository repo = new SurveyRepository();
     SurveyType survey = repo.GetSurveyType((int)StaticSurveyType.OnchoMapping);
     SurveyReportGenerator gen = new SurveyReportGenerator();
     AddReportToSheet(xlsWorksheet, survey.Indicators, options, gen, (int)StaticSurveyType.OnchoMapping, survey.SurveyTypeName, rng);
 }