Exemple #1
0
        private CustomerAnswerReportDto ReadCustomerAnswerReport(IDataReader reader, ref bool alreadyRead)
        {
            CustomerAnswerReportDto retval = null;
            /*
 * int rt.questionnaire_FK, 
 * long rt.response_id,
 * datetime rt.visit_time,
 * int rq.choice_FK,
 * string c.choice_label,
 * string rq.choice_text,
 * int? dbo.ISNOTNULL(rq.lov_FK, (SELECT lov_local_name FROM lov_locals WHERE lov_fk = rq.lov_FK AND in_country_FK = @cc AND in_language_FK = @ll)) AS lov_FK,
 * int c.questionelement_FK,
 * string q.element_type_FK
 * */
            
            int questionnaire_FK = reader.GetInt32(0);
            long response_id = reader.GetInt64(1);
            DateTime visit_time = reader.GetDateTime(2);

            int? choice_FK = GetInt32(reader, 3);
            string choice_label = GetString(reader, 4);
            string choice_text = GetString(reader, 5);
            string lov_FK_value = GetString(reader, 6);
            int? questionelement_FK = GetInt32(reader, 7);
            string element_type_FK = GetString(reader, 8);

            int? lov_FK = GetInt32(reader, 9);

            //int? lov_FK = GetInt32(reader, 6);

            //retval == null choice_fk, questionelement_FK ?

            if (choice_FK == null || questionelement_FK == null)
            {
                retval = null;
            }
            else
            {
                retval = new CustomerAnswerReportDto(questionnaire_FK, response_id, visit_time, choice_FK, choice_label, choice_text, lov_FK, questionelement_FK, element_type_FK, lov_FK_value);
            }
            return retval;
        }
Exemple #2
0
 public ReportRowDto(BaseDataReportDto baseData, CustomerAnswerReportDto[] dynamicQuestions, ShippingAddressReportDto shippingAddress, QuestionReportDto[] questions)
 {
     DynamicQuestions = dynamicQuestions;
     _shippingAddress = shippingAddress;
     BaseData = baseData;
     Questions = questions;
 }