예제 #1
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select * from tbl_user_stats;");

            pMysql.Message = "tbl_user_stats - extraction - START";
            while (dataReader.Read())
            {
                string time_signup     = (dataReader["time_signup"].ToString() == "")? "null" : "'" + FromUnixTime(Convert.ToInt64(dataReader["time_signup"])).ToString().Replace(". ", ".") + "'";
                string time_activate   = (dataReader["time_activate"].ToString() == "")? "null" : "'" + FromUnixTime(Convert.ToInt64(dataReader["time_activate"])).ToString().Replace(". ", ".") + "'";
                string time_last_login = (dataReader["time_last_login"].ToString() == "")? "null" : "'" + FromUnixTime(Convert.ToInt64(dataReader["time_last_login"])).ToString().Replace(". ", ".") + "'";
                string time_disable    = (dataReader["time_disable"].ToString() == "")? "null" : "'" + FromUnixTime(Convert.ToInt64(dataReader["time_disable"])).ToString().Replace(". ", ".") + "'";

                pPostgres.Insert("insert into tbl_user_stats(id, user_id, activation_code, time_signup, time_activate, time_last_login, time_disable, login_count, ips, dontshow1) " +
                                 "values('" + dataReader["id"] + "','" + dataReader["userid"] + "','" + dataReader["activation_code"] + "'," +
                                 "" + time_signup + "," + time_activate + "," +
                                 "" + time_last_login + "," + time_disable + "," +
                                 "" + dataReader["login_count"] + ",'" + dataReader["ips"] + "'," +
                                 "'" + CheckBool(dataReader["dontshow1"].ToString()) + "')");
            }
            pPostgres.Message = "tbl_user_stats - extraction - FINISH";
        }
예제 #2
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select a.id codeid, b.name name, b.discount_fee discount_fee, b.fee fee, b.eventid eventid " +
                                                       "from tbl_event_reg_types_18 b join promo_codes a using(eventid) " +
                                                       "union " +
                                                       "select a.id codeid, b.name name, b.discountfee discount_fee, b.fee fee, b.eventid eventid " +
                                                       "from tbl_event_reg_types_12 b join promo_codes a using(eventid) " +
                                                       "union " +
                                                       "select a.id codeid, b.name, b.discountfee discount_fee, b.fee, b.eventid " +
                                                       "from tbl_event_reg_types_16 b join promo_codes a using(eventid) " +
                                                       "union " +
                                                       "select a.id codeid, b.name, b.discount_fee discount_fee, b.fee, b.eventid " +
                                                       "from tbl_event_reg_types_21 b join promo_codes a using(eventid) " +
                                                       "union " +
                                                       "select a.id codeid, b.name, b.discount_fee discount_fee, b.fee, b.eventid " +
                                                       "from tbl_event_reg_types_23 b join promo_codes a using(eventid)");

            pMysql.Message = "tbl_events_has_promo_code - extraction - START";
            while (dataReader.Read())
            {
                string regTypId =
                    GetId("select id from tbl_event_reg_types where name like '" + dataReader["name"] + "'", pPostgres);

                string PomId = GetId("select promo_codes_id from tbl_events_has_promo_code where " +
                                     "promo_codes_id = '" + dataReader["codeid"] + "' and " +
                                     "events_id='" + dataReader["eventid"] + "' and " +
                                     "tbl_event_reg_types_id='" + regTypId + "';", pPostgres);

                if (PomId == "null")
                {
                    pPostgres.Insert(
                        "insert into tbl_events_has_promo_code(promo_codes_id, events_id, tbl_event_reg_types_id, discount_fee, fee) " +
                        "values('" + dataReader["codeid"] + "','" + dataReader["eventid"] + "','" + regTypId + "','" +
                        dataReader["discount_fee"] + "','" + dataReader["fee"] + "');");
                }
            }


            pPostgres.Message = "tbl_events_has_promo_code - extraction - FINISH";
        }
예제 #3
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select * from tbl_date_studios");

            pMysql.Message = "tbl_date_studios - extraction - START";
            int pcounter = 0;

            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tbl_date_studios(id, tour_dates_id, studios_id, " +
                                 "total_fees, fees_paid, credit, " +
                                 "full_rates, independent, invoice_note, " +
                                 "ftv, ftc, statsregid, emailer_count, " +
                                 "studiocode, confirmdate) " +
                                 "values('" + dataReader["id"] + "','" + dataReader["tourdateid"] + "','" + dataReader["studioid"] + "'," +
                                 "'" + dataReader["total_fees"] + "'," + NVL(dataReader["fees_paid"].ToString().Replace(",", "")) + "," + NVL(dataReader["credit"].ToString().Replace("$", "")) + "," +
                                 "'" + CheckBool(dataReader["full_rates"].ToString()) + "','" + CheckBool(dataReader["independent"].ToString()) + "'," + NVL(dataReader["invoice_note"].ToString().Replace("'", "''")) + "," +
                                 "" + NVL(dataReader["free_teacher_value"].ToString()) + "," + NVL(dataReader["free_teacher_count"].ToString()) + "," + NVL(dataReader["statsregid"].ToString()) + "," +
                                 "'" + dataReader["emailer_count"] + "'," + NVL(dataReader["studiocode"].ToString()) + ",'" + FromUnixTime(Convert.ToInt64(dataReader["confirmdate"])).ToString().Replace(". ", ".") + "')");
            }
            pPostgres.Message = "tbl_date_studios - extraction - FINISH";
        }
예제 #4
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            // tbl_registration from dancetea.registration
            // ----------------------------------------------------------
            MySqlDataReader dataReader = pMysql.Select("select * from tbl_user_registrations");
            int             MaxRegId   = Convert.ToInt32(GetId("select max(id) from tbl_registration;", pPostgres));

            pMysql.Message = "Tbl_registration (mybreak.tbl_user_registrations) - extraction - START ";
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tbl_registration(id, tour_dates_id, old_user_reg_id, user_id, left_off, date, completed, fees, observers, free_teacher, waiver, credit, payment_method ) " +
                                 "values('" + ++MaxRegId + "','" + dataReader["tourdateid"] + "', " + dataReader["id"] + ", " + dataReader["userid"] + ",'" + dataReader["leftoffphp"] + "'," +
                                 "'" + Get_json_date(dataReader["mktime"].ToString(), dataReader["mkupdate"].ToString()) + "','0'," +
                                 "'" + Get_json_fees(dataReader["workshop_fee"].ToString(), dataReader["competition_fee"].ToString(), dataReader["attendee_fee"].ToString(),
                                                     dataReader["bestdancer_fee"].ToString(), dataReader["offers_fee"].ToString(), dataReader["offers_fee"].ToString(),
                                                     dataReader["observers_fee2"].ToString()) + "'," +
                                 "'" + Get_json_observers(dataReader["observers"].ToString(), dataReader["observers2"].ToString()) + "'," +
                                 "'" + Get_json_free_teacher(dataReader["ftc"].ToString(), dataReader["ftv"].ToString()) + "'," + CheckBool(dataReader["waiver"].ToString()) + "," +
                                 "'" + Get_json_credit(dataReader["creditamt"].ToString(), dataReader["creditfrom"].ToString()) + "','" + dataReader["payment_method"] + "');");
            }

            pPostgres.Message = "Tbl_registration (mybreak.tbl_user_registrations) - extraction - FINISH";
        }
예제 #5
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select * from tbl_user_registrations_specialty");

            pMysql.Message = "Tbl_user_registrations_specialty - extraction - START ";
            while (dataReader.Read())
            {
                string RegId = GetId("select id from tbl_registration  where old_user_reg_id='" + dataReader["regid"] + "' limit 1;", pPostgres);

                pPostgres.Insert("insert into tbl_user_registrations_specialty(id, user_id, registration_id, ota_mj_regroutineid, ota_ts_regroutineid, " +
                                 "ota_cd_regroutineid, bc_mj_regroutineid, bc_ts_regroutineid, peopleschoice_regroutineid, ota_m_regroutineid, ota_j_regroutineid, " +
                                 "ota_t_regroutineid, ota_s_regroutineid, bc_mj_cho, bc_ts_cho, ota_cd_cd) " +
                                 "values(" + dataReader["id"] + "," + dataReader["userid"] + "," + RegId + "," + NVL2(dataReader["ota_mj_regroutineid"].ToString()) + "," +
                                 "" + NVL2(dataReader["ota_ts_regroutineid"].ToString()) + "," + NVL2(dataReader["ota_cd_regroutineid"].ToString()) + "," +
                                 "" + NVL2(dataReader["bc_mj_regroutineid"].ToString()) + "," + NVL2(dataReader["bc_ts_regroutineid"].ToString()) + "," +
                                 "" + NVL2(dataReader["peopleschoice_regroutineid"].ToString()) + "," + NVL2(dataReader["ota_m_regroutineid"].ToString()) + "," +
                                 "" + NVL2(dataReader["ota_j_regroutineid"].ToString()) + ", " + NVL2(dataReader["ota_t_regroutineid"].ToString()) + "," +
                                 "" + NVL2(dataReader["ota_s_regroutineid"].ToString()) + ",'" + dataReader["bc_mj_cho"].ToString().Replace("'", "''") + "'," +
                                 "'" + dataReader["bc_ts_cho"].ToString().Replace("'", "''") + "','" + dataReader["ota_cd_cd"].ToString().Replace("'", "''") + "');");
            }

            pPostgres.Message = "Tbl_user_registrations_specialty - extraction - FINISH";
        }
예제 #6
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select * from users;");

            pMysql.Message = "Tbl_admin - extraction - START ";
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into Tbl_admin(id, password, last_login, ip, name, theme, financials, accesslevel) " +
                                 "values('" + dataReader["id"] + "','" + dataReader["password"] + "','" + dataReader["last_login"] + "','" + dataReader["ip"] + "'," +
                                 "'" + dataReader["name"] + "','" + dataReader["theme"] + "','" + CheckBool(dataReader["financials"].ToString()) + "','" + CheckBool(dataReader["accesslevel"].ToString()) + "');");
            }
            pPostgres.Insert("insert into tbl_admin(id, name) values(21, 'DUMMY')");
            pPostgres.Insert("insert into tbl_admin(id, name) values(0, 'DUMMY')");
            pPostgres.Insert("insert into tbl_admin(id, name) values(34, 'DUMMY')");

            pPostgres.Insert("insert into tbl_admin(id, name) values(12, 'DUMMY')");
            pPostgres.Insert("insert into tbl_admin(id, name) values(23, 'DUMMY')");
            pPostgres.Message = "Tbl_admin - extraction - FINISH";
        }
예제 #7
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            pMysql.Message = "tour_dates_workshop_room - extraction - START";
            MySqlDataReader dataReader = pMysql.Select("select distinct a.id, '1' , b.id, b.name , substr(workshop_room_1 ,instr(workshop_room_1, 'Level'), 7) as level " +
                                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                                       "where 1=1 and a.workshop_room_1 is not null " +
                                                       "and (lower(a.workshop_room_1) like concat(lower(b.name)) or (a.workshop_room_1 like '%Level%'));");

            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres) + ");");
            }

            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '2' , b.id, b.name , substr(workshop_room_2 ,instr(workshop_room_2, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_2 is not null " +
                                       "and (lower(a.workshop_room_2) like concat(lower(b.name)) or (a.workshop_room_2 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '3' , b.id, b.name , substr(workshop_room_3 ,instr(workshop_room_3, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_3 is not null " +
                                       "and (lower(a.workshop_room_3) like concat(lower(b.name)) or (a.workshop_room_3 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '4' , b.id, b.name , substr(workshop_room_4 ,instr(workshop_room_4, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_4 is not null " +
                                       "and (lower(a.workshop_room_4) like concat(lower(b.name)) or (a.workshop_room_4 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '5' , b.id, b.name , substr(workshop_room_5 ,instr(workshop_room_5, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_5 is not null " +
                                       "and (lower(a.workshop_room_5) like concat(lower(b.name)) or (a.workshop_room_5 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '6' , b.id, b.name , substr(workshop_room_6 ,instr(workshop_room_6, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_6 is not null " +
                                       "and (lower(a.workshop_room_6) like concat(lower(b.name)) or (a.workshop_room_6 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                                 "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" + dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            // -----------------
            dataReader = pMysql.Select("select distinct a.id, '7' , b.id, b.name , substr(workshop_room_7 ,instr(workshop_room_7, 'Level'), 7) as level " +
                                       "from tbl_tour_dates a, tbl_age_divisions b " +
                                       "where 1=1 and a.workshop_room_7 is not null " +
                                       "and (lower(a.workshop_room_7) like concat(lower(b.name)) or (a.workshop_room_7 like '%Level%'));");
            while (dataReader.Read())
            {
                pPostgres.Insert(
                    "insert into tour_dates_workshop_room(tour_dates_id, workshop_room_id,  age_divisions_id, level_id) " +
                    "values('" + dataReader[0].ToString() + "','" + dataReader[1].ToString() + "','" +
                    dataReader[2].ToString() + "'," + GetLevel(dataReader[4].ToString(), pPostgres).ToString() + ");");
            }
            pPostgres.Message = "tour_dates_workshop_room - extraction - FINISH";
        }
예제 #8
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_11;");

            pMysql.Message = "tbl_routine_categories - extraction - START";
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('11','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }
            dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_14;");
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('14','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }
            dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_17;");
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('17','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }
            dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_2;");
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('2','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }
            dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_20;");
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('20','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }
            dataReader = pMysql.Select("select cast(name as char) name, min_dancers, full_fee_per_dancer, duration, cast(abbreviation as char) abbreviation, discount_fee_per_dancer, " +
                                       "finale_fee_per_dancer, finale_prelim_fee_per_dancer from tbl_routine_categories_22;");
            while (dataReader.Read())
            {
                string categId = GetId("select id from tbl_category where lower(name) like lower('" + dataReader["name"] + "');", pPostgres);
                pPostgres.Insert("insert into tbl_routine_categories(season_id, category_id, min_dancers, full_fee_per_dancer, duration, abbreviation, discount_fee_per_dancer, " +
                                 "finale_fee_per_dancer, finale_prelim_fee_per_dancer) " +
                                 "values('22','" + categId + "','" + dataReader["min_dancers"] + "','" + dataReader["full_fee_per_dancer"] + "','" + dataReader["duration"] + "'," +
                                 "'" + dataReader["abbreviation"] + "','" + dataReader["discount_fee_per_dancer"] + "','" + dataReader["finale_fee_per_dancer"] + "','" + dataReader["finale_prelim_fee_per_dancer"] + "')");
            }

            pPostgres.Message = "tbl_routine_categories - extraction - FINISH";
        }
예제 #9
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            MySqlDataReader dataReader = pMysql.Select("select * from store_products;");

            pMysql.Message = "tbl_store_products - extraction - START";

            pPostgres.Insert("insert into tbl_store_products(id, product) values(1, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(6, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(7, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(8, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(9, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(12, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(2, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(4, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(32, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(31, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(30, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(34, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(35, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(36, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(37, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(38, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(39, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(40, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(41, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(44, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(45, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(10, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(54, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(55, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(5759, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(60, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(61, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(62, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(63, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(64, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(65, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(11, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(58, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(71, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(79, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(72, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(80, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(73, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(70, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(74, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(75, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(76, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(77, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(56, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(3, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(114, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(133, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(33, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(53, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(57, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(59, 'DUMMY');");
            pPostgres.Insert("insert into tbl_store_products(id, product) values(198, 'DUMMY');");

            while (dataReader.Read())
            {
                string tourdateid = (dataReader["tourdateid"].ToString() == "")? "null": dataReader["tourdateid"].ToString();
                string eventid    = (dataReader["eventid"].ToString() == "") ? "null" : dataReader["eventid"].ToString();
                pPostgres.Insert(
                    "insert into tbl_store_products(id, tour_dates_id, events_id, product_subtypes_id, product, description, price, shipping, featured, timeadded, " +
                    "instock, showonsite, onsale, sale_price, weight, trending, short_description, sort) " +
                    "values(" + dataReader["id"] + "," + tourdateid + "," + eventid + "," + dataReader["subtypeid"] + ",'" + dataReader["product"].ToString().Replace("'", "''") + "'," +
                    "'" + dataReader["description"].ToString().Replace("'", "''") + "','" + dataReader["price"] + "','" + dataReader["shipping"] + "'," +
                    "" + CheckBool(dataReader["featured"].ToString()) + ",'" + FromUnixTime(Convert.ToInt64(dataReader["timeadded"])).ToString().Replace(". ", ".") + "'," + CheckBool(dataReader["instock"].ToString()) + "," +
                    "" + CheckBool(dataReader["showonsite"].ToString()) + "," + CheckBool(dataReader["onsale"].ToString()) + ",'" + dataReader["sale_price"] + "','" + dataReader["weight"].ToString().Replace(",", ".") + "'," +
                    "" + CheckBool(dataReader["trending"].ToString()) + "," +
                    "'" + dataReader["short_description"].ToString().Replace("'", "''") + "'," + dataReader["sort"] + ");");
            }
            pPostgres.Message = "tbl_store_products - extraction - FINISH";
        }
예제 #10
0
        private void InsertDummyUsers(PostgreSQL_DB pPostgres)
        {
            pPostgres.Insert("insert into tbl_user(id, email) values(4,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(7,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(9,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(12,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(11,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(14,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(2370,'DUMMY USER');");
            pPostgres.Insert("insert into tbl_user(id, email) values(3, 'DUMMY');");
            //pPostgres.Insert("insert into tbl_user(id, email) values(9, 'DUMMY');");
            // pPostgres.Insert("insert into tbl_user(id, email) values(14, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(73992, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(73996, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(105790, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(92902, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62577, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62579, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62580, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62603, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62609, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(62629, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(67212, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(67213, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(132279, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(149103, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(152828, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(152831, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(213675, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(174652, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(175301, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(178172, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(174804, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(224601, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(216242, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(236145, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(243593, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(243595, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(243833, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(243837, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(243841, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(279771, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(323750, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(323613, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(323629, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(323631, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(323664, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354883, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354109, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354095, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354093, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354092, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354145, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(356486, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354669, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(354670, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(282113, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359814, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359820, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359645, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(444117, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(444133, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(360061, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359400, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359418, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359397, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359815, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359821, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359644, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359647, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359398, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359399, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359401, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359402, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359404, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(359419, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(367422, 'DUMMY');");

            pPostgres.Insert("insert into tbl_user(id, email) values(5, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(8, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(22, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(188, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(854, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(1182, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(1186, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(1452, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(1576, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(1716, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(13083, 'DUMMY');");
            pPostgres.Insert("insert into tbl_user(id, email) values(13084, 'DUMMY');");

            pPostgres.Insert("insert into tbl_user(id, email) values(44399, 'DUMMY');");
        }
예제 #11
0
 public void Add_award_nominations_has_teacher(string pPersonId, string pAwardId, PostgreSQL_DB pPostgres)
 {
     pPostgres.Insert("insert into tbl_award_nominations_has_teacher(tbl_person_id, tbl_tda_award_nominations_id) " +
                      "values(" + pPersonId + "," + pAwardId + ")");
 }
예제 #12
0
        private void AddDummyFaculty(PostgreSQL_DB pPostgres)
        {
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(55,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(56,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(60,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(61,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(62,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(63,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(66,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(65,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(64,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(67,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(68,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(69,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(70,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(71,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(72,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(78,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(79,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(81,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(82,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(83,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(85,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(84,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(86,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(87,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(88,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(89,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(90,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(91,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(92,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(94,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(97,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(101,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(102,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(103,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(104,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(105,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(106,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(108,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(109,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(118,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(119,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(93,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(95,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(96,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(98,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(99,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(59,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(107,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(100,6,20797, 'DUMMY', 'DUMMY');");

            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(110,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(111,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(112,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(113,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(114,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(115,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(117,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(120,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(121,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(122,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(123,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(124,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(125,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(126,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(127,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(128,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(129,6,20797, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_faculty(id, events_id, dancer_id, bio, website) values(0,6,20797, 'DUMMY', 'DUMMY');");
        }
예제 #13
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            pPostgres.Insert("insert into tbl_person(id, fname, lname) values(0, 'DUMMY', 'DUMMY');");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(20797,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(20862,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(18040,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(19862,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(20881,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(23182,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(23183,0)");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(37996,0);");

            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(12992,0);");
            pPostgres.Insert("insert into tbl_dancer(id, person_id) values(15804,0);");

            // all dancers related to the any studio...
            MySqlDataReader dataReader = pMysql.Select("select * from tbl_profiles where studioid is not null;");

            pMysql.Message = "tbl_dancers - extraction - START";
            while (dataReader.Read())
            {
                // insert new address of dancer (person)
                // private string GetAddressId(string pAddress, string pCity, string pState, string pZip, string pCountryId, PostgreSQL_DB pPostgres)
                string AddressId = GetAddressId(dataReader["address"].ToString(), dataReader["city"].ToString(),
                                                dataReader["state"].ToString(), dataReader["zip"].ToString(), dataReader["countryid"].ToString(),
                                                pPostgres);
                string GenderId = GetId("select id from tbl_gender where value like '" + dataReader["gender"] + "'", pPostgres);

                // inser dancer into person
                string birthdate = (dataReader["birth_date"].Equals("")) ? "null" : "'" + dataReader["birth_date"] + "'";
                pPostgres.Insert("insert into tbl_person(address_id, gender_id, fname, lname, birthdate, person_types_id) " +
                                 "values(" + AddressId + ", " + GenderId + ",'" + dataReader["fname"].ToString().Replace("'", "''") + "'," +
                                 "'" + dataReader["lname"].ToString().Replace("'", "''") + "'," + birthdate + ",'8')");
                string Max_person_id = GetId("select max(id) from tbl_person", pPostgres);

                // insert into tbl_dancer
                string parent_guardian = (dataReader["parent_guardian"] == "") ? "null" : dataReader["parent_guardian"].ToString();
                string email_parents   = (dataReader["email_parents"] == "") ? "null" : dataReader["email_parents"].ToString();
                if (email_parents.Equals("''"))
                {
                    email_parents = "null";
                }
                pPostgres.Insert("insert into tbl_dancer(id, person_id, parent_guardian, email_parents) " +
                                 "values('" + dataReader["id"] + "'," + Max_person_id + ",'" + parent_guardian.Replace("'", "''") + "','" + email_parents.Replace("'", "''") + "')");

                var phone_1 = dataReader["phone"].ToString();
                var phone_2 = dataReader["phone2"].ToString();
                var fax     = dataReader["fax"].ToString();
                var c       = new[] { '(', ')', '-', ' ' };
                // insert into studio_has_contact_type
                if (dataReader["phone"].ToString() != "")
                {
                    pPostgres.Insert("insert into person_has_contact_type(person_id, contact_type_id, value)" +
                                     "values(" + Max_person_id + ",2,'" + Remove(phone_1, c) + "')");
                }
                if (dataReader["phone2"].ToString() != "")
                {
                    pPostgres.Insert("insert into person_has_contact_type(person_id, contact_type_id, value)" +
                                     "values(" + Max_person_id + ",2,'" + Remove(phone_2, c) + "')");
                }
                if (dataReader["fax"].ToString() != "")
                {
                    pPostgres.Insert("insert into person_has_contact_type(person_id, contact_type_id, value)" +
                                     "values(" + Max_person_id + ",8,'" + Remove(fax, c) + "')");
                }
                if (dataReader["email"].ToString() != "")
                {
                    pPostgres.Insert("insert into person_has_contact_type(person_id, contact_type_id, value)" +
                                     "values(" + Max_person_id + ",1,'" + dataReader["email"].ToString().Replace("'", "''") + "')");
                }

                // insert into tbl_studio has dancer // exception has been deleted

                pPostgres.Insert("insert into tbl_studios_has_dancer(dancer_id, studios_id) values('" + dataReader["id"] + "','" + dataReader["studioid"] + "')");

                // insert tbl_user_has_dancer
            }
            pPostgres.Message = "tbl_dancers - extraction - FINISH";
        }
예제 #14
0
        public void SupRemigration(MySQL_DB pMysql, PostgreSQL_DB pPostgres, string pDate = "1.1.2500")
        {
            try
            {
                DummyStudioCreation(pMysql, pPostgres);
            }
            catch (Exception)
            {
            }
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(2924, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(8023, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(8024, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(11604, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(37012, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(78757,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(78681,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(80857,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(88247,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(79272,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(89721,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(89381,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(99410,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(92734,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(99786,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(100022,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(106053,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(100302,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(107876,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109241,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(112241,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(111469,0,'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(111236,0,'DUMMY');");

            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1189, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1177, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1176, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1183, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1174, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1178, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1179, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1175, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1186, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(1187, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(76177, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109212, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(0, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(52187, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(76193, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(76427, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(77296, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(76191, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(108262, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(108491, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109210, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(108489, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109216, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109211, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109611, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(109610, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(110660, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(110649, 0, 'DUMMY');");
            pPostgres.Insert("insert into tbl_routines(id, studios_id, name) values(110661, 0, 'DUMMY');");

            MySqlDataReader dataReader = pMysql.Select("select * from tbl_routines;");

            pMysql.Message = "tbl_routines - extraction - START - studio OWNERS";
            while (dataReader.Read())
            {
                pPostgres.Insert("insert into tbl_routines(id, studios_id, name) " +
                                 "values('" + dataReader["id"] + "','" + dataReader["studioid"] + "','" + dataReader["name"].ToString().Replace("'", "''") + "');");
                if (dataReader["teacher"].ToString().Length > 0)
                {
                    ManageTeacher(dataReader["teacher"].ToString(), dataReader["id"].ToString(), pPostgres);
                }
            }
            pPostgres.Message = "tbl_routines - extraction - FINISH - studio OWNERS";
        }