Exemplo n.º 1
0
        private BaseDataReportDto ReadBaseData(IDataReader reader, ref bool alreadyRead)
        {
            BaseDataReportDto retval = null;
            /*
            response_id, responser_id, visit_time, response_time, customer_FK, 
            rpe_personal_title, rpe_first_name, rpe_last_name, rpe_job_code_FK,
            ISNULL(dbo.ISNOTNULL(rpe_job_code_FK, job_description), rpe_job_siebel63) AS rpe_job_code,
            rpe_jobtitle, rpe_company_name, rpe_address1, rpe_address2, rpe_address3,
            rpe_town, rpe_county, rpe_postcode, rpe_country_FK, rpe_email_address,
            rpe_telephone, rpe_business_code_FK,
            ISNULL(dbo.ISNOTNULL(rpe_business_code_FK, business_name), rpe_business_siebel63) AS rpe_business_code,
            rpe_world_size_FK,
            ISNULL(dbo.ISNOTNULL(rpe_world_size_FK, number_of_employees),
            rpe_worldsize_siebel63) AS rpe_world_size, rpe_allowance_flag,
            rpe_flexfield1, rpe_flexfield2, rpe_flexfield3, rpe_flexfield4, rpe_flexfield5,
            rpe_flexfield6, rpe_flexfield7, rpe_flexfield8, rpe_flexfield9, rpe_flexfield10,
            rpe_flexfield11, rpe_flexfield12, rpe_flexfield13, rpe_flexfield14, rpe_flexfield15,
            rpe_pwd, country_FK, language_FK, email_address, first_name, last_name,
            address1, address2, address3, town, county, postcode, telephone,
            source_db_id, siebel_con_id, siebel_prosp_id, purl, source_db_name,
            company_id, company_name, world_size_FK,
            ISNULL(dbo.ISNOTNULL(world_size_FK, number_of_employees), worldsize_siebel63) AS world_size,
            job_code_FK,
            ISNULL(dbo.ISNOTNULL(job_code_FK, job_description), job_siebel63) AS job_code,
            jobtitle, business_code_FK,
            ISNULL(dbo.ISNOTNULL(business_code_FK, business_name), business_siebel63) AS business_code,
            greeting_string, edm_list_indicator,
            personal_title, allowance_flag, flexfield1, flexfield2, flexfield3, flexfield4, flexfield5,
            flexfield6, flexfield7, flexfield8, flexfield9, flexfield10, flexfield11, flexfield12,
            flexfield13, flexfield14, flexfield15, pwd, siebel_campaign_code, 
            ISNULL(contact_by_email, contact_by_email_o) AS contact_by_email,
            email_pref, contact_by_post, contact_by_phone, mailstop_flag,
            ISNULL(campaign_code_FK, (SELECT campaign_code_FK FROM questionnaires WHERE questionnaire_id = @questionnaire_id)) AS campaign_code_FK 
             */
            long responseId = reader.GetInt64(0);
            string responserId = reader.GetString(1);
            DateTime visitTime;
            DateTime.TryParse(reader.GetString(2), System.Globalization.CultureInfo.GetCultureInfo("de-DE"), System.Globalization.DateTimeStyles.None, out visitTime);
            DateTime? responseTime = null;
            string temp = GetString(reader, 3);// GetDateTime(reader, 3);
            DateTime temp2;
            if (DateTime.TryParse(temp, System.Globalization.CultureInfo.GetCultureInfo("de-DE"), System.Globalization.DateTimeStyles.None, out temp2))
            {
                responseTime = temp2;
            }

            string customerFK = GetString(reader, 4);
            string rpe_personal_title = GetString(reader, 5);
            string rpe_first_name = GetString(reader, 6);
            string rpe_last_name = GetString(reader, 7);
            string rpe_job_code_FK = GetString(reader, 8);
            string rpe_job_code = GetString(reader, 9); //rpe_job_code_FK job_description rpe_job_siebel63
            string rpe_jobtitle = GetString(reader, 10);
            string rpe_company_name = GetString(reader, 11);
            string rpe_address1 = GetString(reader, 12);
            string rpe_address2 = GetString(reader, 13);
            string rpe_address3 = GetString(reader, 14);
            string rpe_town = GetString(reader, 15);
            string rpe_county = GetString(reader, 16);
            string rpe_postcode = GetString(reader, 17);
            string rpe_country_FK = GetString(reader, 18);
            string rpe_email_address = GetString(reader, 19);
            string rpe_telephone = GetString(reader, 20);
            string rpe_business_code_FK = GetString(reader, 21);
            string rpe_business_code = GetString(reader, 22);//rpe_business_code_FK business_name rpe_business_siebel63
            string rpe_world_size_FK = GetString(reader, 23);
            string rpe_world_size = GetString(reader, 24);
            string rpe_allowance_flag = GetString(reader, 25);
            string rpe_flexfield1 = GetString(reader, 26);
            string rpe_flexfield2 = GetString(reader, 27);
            string rpe_flexfield3 = GetString(reader, 28);
            string rpe_flexfield4 = GetString(reader, 29);
            string rpe_flexfield5 = GetString(reader, 30);
            string rpe_flexfield6 = GetString(reader, 31);
            string rpe_flexfield7 = GetString(reader, 32);
            string rpe_flexfield8 = GetString(reader, 33);
            string rpe_flexfield9 = GetString(reader, 34);
            string rpe_flexfield10 = GetString(reader, 35);
            string rpe_flexfield11 = GetString(reader, 36);
            string rpe_flexfield12 = GetString(reader, 37);
            string rpe_flexfield13 = GetString(reader, 38);
            string rpe_flexfield14 = GetString(reader, 39);
            string rpe_flexfield15 = GetString(reader, 40);
            string rpe_pwd = GetString(reader, 41);
            string country_FK = GetString(reader, 42);
            string language_FK = GetString(reader, 43);
            string email_address = GetString(reader, 44);
            string first_name = GetString(reader, 45);
            string last_name = GetString(reader, 46);
            string address1 = GetString(reader, 47);
            string address2 = GetString(reader, 48);
            string address3 = GetString(reader, 49);
            string town = GetString(reader, 50);
            string county = GetString(reader, 51);
            string postcode = GetString(reader, 52);
            string telephone = GetString(reader, 53);
            string source_db_id = GetString(reader, 54);
            string siebel_con_id = GetString(reader, 55);
            string siebel_prosp_id = GetString(reader, 56);
            string purl = GetString(reader, 57);
            string source_db_name = GetString(reader, 58);
            string company_id = GetString(reader, 59);
            string company_name = GetString(reader, 60);
            string world_size_FK = GetString(reader, 61);
            string world_size = GetString(reader, 62);// world_size_FK number_of_employees worldsize_siebel63
            string job_code_FK = GetString(reader, 63);
            string job_code = GetString(reader, 64);// job_code_FK job_description job_siebel63
            string jobtitle = GetString(reader, 65);
            string business_code_FK = GetString(reader, 66);
            string business_code = GetString(reader, 67); // business_code_FK business_name business_siebel63
            string greeting_string = GetString(reader, 68);
            string edm_list_indicator = GetString(reader, 69);
            string personal_title = GetString(reader, 70);
            string allowance_flag = GetString(reader, 71);
            string flexfield1 = GetString(reader, 72);
            string flexfield2 = GetString(reader, 73);
            string flexfield3 = GetString(reader, 74);
            string flexfield4 = GetString(reader, 75);
            string flexfield5 = GetString(reader, 76);
            string flexfield6 = GetString(reader, 77);
            string flexfield7 = GetString(reader, 78);
            string flexfield8 = GetString(reader, 79);
            string flexfield9 = GetString(reader, 80);
            string flexfield10 = GetString(reader, 81);
            string flexfield11 = GetString(reader, 82);
            string flexfield12 = GetString(reader, 83);
            string flexfield13 = GetString(reader, 84);
            string flexfield14 = GetString(reader, 85);
            string flexfield15 = GetString(reader, 86);
            string pwd = GetString(reader, 87);
            string siebel_campaign_code = GetString(reader, 88);
            string contact_by_email = GetString(reader, 89); //contact_by_email contact_by_email_o
            string email_pref = GetString(reader, 90);
            string contact_by_post = GetString(reader, 91);
            string contact_by_phone = GetString(reader, 92);
            string mailstop_flag = GetString(reader, 93);
            string campaign_code = GetString(reader, 94);// campaign_code_FK (SELECT campaign_code_FK FROM questionnaires WHERE questionnaire_id = @questionnaire_id)) AS campaign_code_FK 
            string rpe_country_name = GetString(reader, 95);
            string country_name = GetString(reader, 96);

            string telephone_country = GetString(reader, 97);
            string telephone_area = GetString(reader, 98);
            string telephone_extn = GetString(reader, 99);
            string fax_country = GetString(reader, 100);
            string fax_area = GetString(reader, 101);
            string fax = GetString(reader, 102);
            string fax_extn = GetString(reader, 103);
            string mobile_country = GetString(reader, 104);
            string mobile = GetString(reader, 105);
            string campaign_language_FK = GetString(reader, 115);
            string campaign_country_FK = GetString(reader, 116);
            string preferred_language = GetString(reader, 117);

            //RFG 2.11 |added by Raju
            string rpe_company_website = GetString(reader, 118);
            string rpe_company_revenue = GetString(reader, 119);
            string rpe_company_revenue_range = GetString(reader, 120);

            if (customerFK == Constants.UnknownCustomer)
            {//use rpe
                retval = new BaseDataReportDto(customerFK, rpe_country_FK, campaign_language_FK, campaign_country_FK, rpe_email_address,
                    rpe_first_name, rpe_last_name, source_db_id, siebel_con_id, siebel_prosp_id, source_db_name,
                    campaign_code, company_id, rpe_company_name, rpe_world_size, rpe_job_code, rpe_jobtitle,
                    rpe_business_code, greeting_string, edm_list_indicator, rpe_personal_title, rpe_address1,
                    rpe_address2, rpe_address3, rpe_town, rpe_county, rpe_postcode, rpe_telephone,
                    ConvertOptins(contact_by_email), email_pref, ConvertOptins(contact_by_post),
                    ConvertOptins(contact_by_phone), ConvertOptins(allowance_flag), ConvertOptouts(mailstop_flag),
                    rpe_pwd, rpe_flexfield1, rpe_flexfield2, rpe_flexfield3, rpe_flexfield4, rpe_flexfield5,
                    rpe_flexfield6, rpe_flexfield7, rpe_flexfield8, rpe_flexfield9, rpe_flexfield10, rpe_flexfield11,
                    rpe_flexfield12, rpe_flexfield13, rpe_flexfield14, rpe_flexfield15, visitTime, responseTime,
                    responserId, responseId, rpe_country_name, telephone_country, telephone_area, telephone_extn,
                    fax_country, fax_area, fax, fax_extn, mobile_country, mobile, preferred_language, rpe_company_website, rpe_company_revenue_range);
            }
            else
            {
                retval = new BaseDataReportDto(customerFK, country_FK, campaign_language_FK, campaign_country_FK, email_address,
                    first_name, last_name, source_db_id, siebel_con_id, siebel_prosp_id, source_db_name,
                    campaign_code, company_id, company_name, world_size, job_code, jobtitle,
                    business_code, greeting_string, edm_list_indicator, personal_title, address1,
                    address2, address3, town, county, postcode, telephone,
                    ConvertOptins(contact_by_email), email_pref, ConvertOptins(contact_by_post),
                    ConvertOptins(contact_by_phone), ConvertOptins(allowance_flag), ConvertOptouts(mailstop_flag),
                    pwd, flexfield1, flexfield2, flexfield3, flexfield4, flexfield5,
                    flexfield6, flexfield7, flexfield8, flexfield9, flexfield10, flexfield11,
                    flexfield12, flexfield13, flexfield14, flexfield15, visitTime, responseTime,
                    responserId, responseId, country_name, telephone_country, telephone_area, telephone_extn,
                    fax_country, fax_area, fax, fax_extn, mobile_country, mobile, preferred_language,rpe_company_website,rpe_company_revenue);
            }
  
            return retval;
        }
Exemplo n.º 2
0
 public ReportRowDto(BaseDataReportDto baseData, CustomerAnswerReportDto[] dynamicQuestions, ShippingAddressReportDto shippingAddress, QuestionReportDto[] questions)
 {
     DynamicQuestions = dynamicQuestions;
     _shippingAddress = shippingAddress;
     BaseData = baseData;
     Questions = questions;
 }