Beispiel #1
0
        private ReportItem GetReportItem(string itemType, int i)
        {
            ReportItem item = new ReportItem();

            var worktName = string.Format("{0}{1}_TB", itemType, i);
            var descriptionName = string.Format("{0}{1}_TA", itemType, i);
            var projectName = string.Format("{0}{1}_DDL", itemType, i);

            item.Work = Request.Form[worktName];
            item.Description = Request.Form[descriptionName];
            item.Project = Request.Form[projectName];

            if (string.IsNullOrEmpty(item.Work) || item.Work == "Finished " || item.Work == "Working on ")
                return null;
            else
                return item;
        }
Beispiel #2
0
 public void FromXML(string xml)
 {
     XmlDocument root = new XmlDocument();
     root.LoadXml(xml);
     XmlNode finished = root.DocumentElement.SelectSingleNode("Finished");
     foreach (XmlNode node in finished.ChildNodes)
     {
         ReportItem item = new ReportItem();
         item.FromXML(node);
         this.Finished.Add(item);
     }
     XmlNode wip = root.DocumentElement.SelectSingleNode("WIP");
     foreach (XmlNode node in wip.ChildNodes)
     {
         ReportItem item = new ReportItem();
         item.FromXML(node);
         this.WIP.Add(item);
     }
     XmlNode planning = root.DocumentElement.SelectSingleNode("Planning");
     if (planning != null)
     {
         foreach (XmlNode node in planning.ChildNodes)
         {
             ReportItem item = new ReportItem();
             item.FromXML(node);
             this.Planning.Add(item);
         }
     }
     XmlNode blocking = root.DocumentElement.SelectSingleNode("Blocking");
     if (blocking != null)
     {
         foreach (XmlNode node in blocking.ChildNodes)
         {
             ReportItem item = new ReportItem();
             item.FromXML(node);
             this.Blocking.Add(item);
         }
     }
     //XmlNode files = root.DocumentElement.SelectSingleNode("Files");
     //foreach (XmlNode node in files.ChildNodes)
     //{
     //    ReportFile item = new ReportFile();
     //    item.FromXML(node);
     //    this.Files.Add(item);
     //}
 }