public static dtoExportConfigurationSetting GetDefaultSetting(StatisticsPageType pagetype, ConfigurationType configurationType, StatisticType statisticType) { dtoExportConfigurationSetting result = new dtoExportConfigurationSetting(); result.PageType = pagetype; result.ConfigType = configurationType; result.StatisticType = statisticType; result.Fields = ExportConfigurationSetting.GetDefaultDtoFields(pagetype); return(result); }
public static List <dtoExportField> GetDefaultDtoFields(StatisticsPageType type) { List <dtoExportField> fields = new List <dtoExportField>(); switch (type) { case StatisticsPageType.AdvancedCommunity: break; case StatisticsPageType.AdvancedPath: break; case StatisticsPageType.AdvancedUser: fields.Add(new dtoExportField() { Type = ExportFieldType.IdUser, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdCommunity, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdPath, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.TaxCodeInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.AgencyInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireCertificationInfo, Availability = ExportFieldTypeAvailability.Certification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAdvancedInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAttempts, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.FirstActionOn, Availability = ExportFieldTypeAvailability.Always }); break; case StatisticsPageType.MyPathStatistic: break; case StatisticsPageType.PathStatistic: break; case StatisticsPageType.PathSummary: break; case StatisticsPageType.UsersStatistics: fields.Add(new dtoExportField() { Type = ExportFieldType.IdUser, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdCommunity, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdPath, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.TaxCodeInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.AgencyInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireCertificationInfo, Availability = ExportFieldTypeAvailability.Certification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAdvancedInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAttempts, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.RoleInfo, Availability = ExportFieldTypeAvailability.Always }); fields.Add(new dtoExportField() { Type = ExportFieldType.FirstActionOn, Availability = ExportFieldTypeAvailability.Always }); break; case StatisticsPageType.UserStatistic: fields.Add(new dtoExportField() { Type = ExportFieldType.IdUser, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdCommunity, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.IdPath, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.TaxCodeInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.AgencyInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireCertificationInfo, Availability = ExportFieldTypeAvailability.Certification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAdvancedInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.QuestionnaireAttempts, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.RoleInfo, Availability = ExportFieldTypeAvailability.Always }); fields.Add(new dtoExportField() { Type = ExportFieldType.FirstActionOn, Availability = ExportFieldTypeAvailability.Always }); break; case StatisticsPageType.FullPathStatistics: fields.Add(new dtoExportField() { Type = ExportFieldType.IdUser, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.TaxCodeInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.AgencyInfo, Availability = ExportFieldTypeAvailability.FullAndCertification }); fields.Add(new dtoExportField() { Type = ExportFieldType.RoleInfo, Availability = ExportFieldTypeAvailability.Always }); fields.Add(new dtoExportField() { Type = ExportFieldType.FirstActionOn, Availability = ExportFieldTypeAvailability.Always }); break; } return(fields); }