Exemplo n.º 1
0
 public void Delete(ProjectLog projectLog)
 {
     if (xDocument.Root != null)
     {
         var project =
             xDocument.Root.Descendants(ProjectEntry).Where(
                 element => (DateTime.Parse(element.Attribute("StartDate").Value) == projectLog.StartDate
                             )).SingleOrDefault();
         if (project != null)
         {
             project.Remove();
         }
     }
 }
Exemplo n.º 2
0
        public void Add(ProjectLog projectLog)
        {
            var xElement = new XElement(ProjectEntry);

            xElement.Add(new XAttribute("UserId", projectLog.UserId));
            xElement.Add(new XAttribute("ProjectId", projectLog.ProjectId));
            xElement.Add(new XAttribute("DurationTime", projectLog.DurationTime.ToString()));
            xElement.Add(new XAttribute("StartDate", projectLog.StartDate));

            if (xDocument.Root != null)
            {
                xDocument.Root.Add(xElement);
            }
        }
Exemplo n.º 3
0
 public void  AddLogEntry(ProjectLog projectLog)
 {
     projectLogRepository.Add(projectLog);
     projectLogRepository.Save();
 }
Exemplo n.º 4
0
 public void Send(ProjectLog projectLog)
 {
     Console.WriteLine("Send project log: " + projectLog.ProjectId + " " + projectLog.UserId);
 }