public void RunSync() { this.InitializeProvider(); //TODO: move to the KSHEMA_PNC sync since it runs first //base.Reset_Sync_Steps(); this.LogMessage("PNC to Kshema Sync Started", "INFO"); //1. run the epec sync this.ProcessEntityFlow <Epec>("EPEC_Query.sql"); this.Update_Sync_Step("Processing Epec Log"); // process the Subscriber Queue Epec.Process_Epec_Stage_Queue(); this.Update_Sync_Step("Processing Epec Stage Queue"); //2. run the resident sync this.ProcessEntityFlow <Resident>("Get_Resident_Log.sql"); this.Update_Sync_Step("Processing Resident Log"); //3. Process the subscriber queue Epec.Process_Epec_Stage_Queue(); this.Update_Sync_Step("Processing Epec Stage Queue"); //4. Process Contacts this.ProcessEntityFlow <Contact>("Get_Contact_Log.sql"); this.Update_Sync_Step("Processing Contact Log"); Contact.Process_Contact_Temp_Queue(); this.Update_Sync_Step("Processing Contact Stage Queue"); //5. Language this.ProcessEntityFlow <Language>("Get_Language_Log.sql"); this.Update_Sync_Step("Processing Language Log"); //6. Keywords this.ProcessEntityFlow <Keyword>("Get_Keyword_Log.sql"); this.Update_Sync_Step("Processing Keyword Log"); Keyword.Delete_KS_SubscriberMedicalInfo_2(); this.Update_Sync_Step("Deleting Subscriber Medical Info"); Keyword.Process_SubscriberMedicalInfo(); this.Update_Sync_Step("Processing Subscriber Medical Info"); //7. Notes this.ProcessEntityFlow <Note>("Get_Notes_Log.sql"); this.Update_Sync_Step("Processing Notes Log"); //8. Contact Relation this.ProcessEntityFlow <ContactRelation>("Get_ContactRelation_Log.sql"); this.Update_Sync_Step("Processing Contact Relation Log"); //9. Responder Call Order Contact.Update_Responder_Call_Order(); this.Update_Sync_Step("Updating Responder Call Order"); //10. Contact Delete this.ProcessEntityDelete <Contact>("Contact_Delete_Log.sql"); this.Update_Sync_Step("Processing Contact Delete Log"); //11. Note Delete this.ProcessEntityDelete <Note>("Note_Delete_Log.sql"); this.Update_Sync_Step("Processing Note Delete Log"); this.Update_Sync_Step("Deleting duplicate contacts"); Contact.Delete_Duplicate_Contacts(); this.LogMessage("PNC to Kshema Sync Completed", "INFO"); this.DisposeProvider(); }