Exemplo n.º 1
0
        public OrganizationTask GetOrganizationTasks(int id)
        {
            string        path   = $"..\\Db\\tasks\\OrganizationTask\\";
            XmlSerializer reader =
                new System.Xml.Serialization.XmlSerializer(typeof(OrganizationTask));
            StreamReader file = new StreamReader(
                $"{path}task_{id}.xml");

            OrganizationTask obj = (OrganizationTask)reader.Deserialize(file);

            file.Close();
            return(obj);
        }
Exemplo n.º 2
0
        private static void GenerateOrganization()
        {
            EnsureOutputDirectoryExists();

            Console.WriteLine("Generating organization JSON..");
            Stopwatch sw = new Stopwatch();

            sw.Start();
            OrganizationTask.GenerateJsonFile();
            sw.Stop();
            string msg = $"Organization JSON generated in {sw.Elapsed}.";

            Console.WriteLine(msg);
            Console.WriteLine();
        }
Exemplo n.º 3
0
        public BaseTask CreateATask(string title, string detail, TaskPriority taskPriority, bool internalTask = false)
        {
            BaseTask task      = null;
            int      newTaskId = GetNewTaskId();

            if (internalTask)
            {
                task = new OrganizationTask(title, detail, newTaskId, taskPriority);
            }
            else
            {
                task = new MarketPlaceTask(title, detail, newTaskId, taskPriority);
            }

            task.CreateTask(taskDb);
            return(task);
        }