Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="taskNo"></param>
        /// <returns></returns>
        public Task GetTask(int taskNo)
        {
            string  xpath    = "/Tasks/task[@no='" + taskNo + "']";
            XmlNode taskNode = data.SelectSingleNode(xpath);
            Task    task     = Data.ToTask(taskNode);

            return(task);
        }
Exemplo n.º 2
0
        public IList <Task> GetTaskList()
        {
            IList <Task> taskList     = new List <Task>();
            XmlNodeList  taskNodelist = data.SelectNodes("/Tasks/task");

            foreach (XmlNode taskXml in taskNodelist)
            {
                Task task = Data.ToTask(taskXml);
                taskList.Add(task);
            }
            return(taskList);
        }