Exemple #1
0
        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();
        }
Exemple #2
0
        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)));
        }