private void LoadAll() { local_dataLOV = new domainListOfValues(); local_dataLOV.LoadData(true); sql_dataLOV = new domainListOfValues(); sql_dataLOV.LoadData(false); ProgressBarAdd(); local_dataPerson = new domainPerson(); local_dataPerson.LoadData(true); sql_dataPerson = new domainPerson(); sql_dataPerson.LoadData(false); ProgressBarAdd(); local_dataOrganization = new domainOrganization(); local_dataOrganization.LoadData(true); sql_dataOrganization = new domainOrganization(); sql_dataOrganization.LoadData(false); ProgressBarAdd(); local_dataProject = new domainProject(); local_dataProject.LoadData(true); sql_dataProject = new domainProject(); sql_dataProject.LoadData(false); ProgressBarAdd(); local_dataActivity = new domainActivity(); local_dataActivity.LoadData(true); sql_dataActivity = new domainActivity(); sql_dataActivity.LoadData(false); ProgressBarAdd(); }
private void CleanAccessDB() { CleanLocalDB(local_dataLOV.getCountries, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getDistanceBands, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getLanguages, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getNationalAgencies, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getOrganizationTypes, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getRoles, (toDel => { local_dataLOV.Delete(toDel, false); })); CleanLocalDB(local_dataLOV.getTopics, (toDel => { local_dataLOV.Delete(toDel, false); })); local_dataLOV.LoadData(); CleanLocalDB(local_dataPerson.getPersons, (toDel => { local_dataPerson.Delete(toDel, false); })); local_dataPerson.LoadData(); CleanLocalDB(local_dataOrganization.getOrganizations, (toDel => { local_dataOrganization.Delete(toDel, false); })); local_dataOrganization.LoadData(); CleanLocalDB(local_dataProject.getProjectActivities, (toDel => { local_dataProject.Delete(toDel, false); })); CleanLocalDB(local_dataProject.getProjectActivityVariations, (toDel => { local_dataProject.Delete(toDel, false); })); CleanLocalDB(local_dataProject.getProjects, (toDel => { local_dataProject.Delete(toDel, false); })); CleanLocalDB(local_dataProject.getProjectTopics, (toDel => { local_dataProject.Delete(toDel, false); })); CleanLocalDB(local_dataProject.getProjectVariationOrganizations, (toDel => { local_dataProject.Delete(toDel, false); })); CleanLocalDB(local_dataProject.getProjectVariations, (toDel => { local_dataProject.Delete(toDel, false); })); local_dataProject.LoadData(); CleanLocalDB(local_dataActivity.getActivityTypes, (toDel => { local_dataActivity.Delete(toDel, false); })); CleanLocalDB(local_dataActivity.getMobilities, (toDel => { local_dataActivity.Delete(toDel, false); })); local_dataActivity.LoadData(); }
public void InitData() { dataLOV = new domainListOfValues(); dataLOV.LoadData(); dataPerson = new domainPerson(); dataPerson.LoadData(); dataOrganization = new domainOrganization(); dataOrganization.LoadData(); dataProject = new domainProject(); dataProject.LoadData(); dataActivity = new domainActivity(); dataActivity.LoadData(); string computerName = SystemInformation.ComputerName; var client = dataLOV.getClients.FirstOrDefault(c => c.ComputerName.ToUpper() == computerName.ToUpper()); if (client != null) { CFGStationID = client.ComputerID; } else { CFGStationID = dataLOV.getClients.Max(c => c.ComputerID) + 1; var clnt = new modelClient(computerName, CFGStationID); dataLOV.Insert(clnt); } projectCalls = new List <modelProjectCall>(); projectCalls.Add(new modelProjectCall("2017-1", new DateTime(2017, 5, 1))); projectCalls.Add(new modelProjectCall("2017-2", new DateTime(2017, 8, 1))); projectCalls.Add(new modelProjectCall("2017-3", new DateTime(2018, 1, 1))); projectCalls.Add(new modelProjectCall("2018-1", new DateTime(2018, 5, 1))); projectCalls.Add(new modelProjectCall("2018-2", new DateTime(2018, 8, 1))); projectCalls.Add(new modelProjectCall("2018-3", new DateTime(2019, 1, 1))); projectCalls.Add(new modelProjectCall("2019-1", new DateTime(2019, 5, 1))); projectCalls.Add(new modelProjectCall("2019-2", new DateTime(2019, 8, 1))); }