Example #1
0
 public void GetProjectTime(TlProjectBrief project)
 {
     TlProjectTimeRecordCollection record = project.GetTimeSpent();
     foreach (TlProjectTimeRecord r in record)
         Console.WriteLine(r.ToString());
 }
Example #2
0
        public void GetProjectDetails(TlProjectBrief project)
        {
            TlProjectExtended pex = project.GetDetails();

            Console.Clear();
            Console.WriteLine(pex.ToString());

            //if (pex.Responsible != null)
            //{
            //    Console.WriteLine();
            //    Console.WriteLine("Reponsible:");
            //    Console.WriteLine(pex.Responsible.GetDetails());
            //}
            //if (pex.CreatedBy != null)
            //{
            //    Console.WriteLine();
            //    Console.WriteLine("Created by:");
            //    Console.WriteLine(pex.CreatedBy.GetDetails());
            //}

            Console.WriteLine("Milestones:\n\n");
            GetProjectMilestones(pex);
            Console.WriteLine("Project time:\n\n");
            GetProjectTime(pex);

            Console.WriteLine();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();
        }
Example #3
0
 public void GetProjectMilestones(TlProjectBrief project)
 {
     ShowMilestoneList(project.GetMilestones());
 }
 /// <summary>
 /// Returns the list of all users participating in the project
 /// </summary>
 /// <param name="project">Project</param>
 /// <returns>List of users</returns>
 public TlUserCollectionBrief GetTeamByProject(TlProjectBrief project)
 {
     return GetTeamByProject(project.ID);
 }
 /// <summary>
 /// Returns the list of all the milestones within the project
 /// </summary>
 /// <param name="projectID">Project</param>
 /// <returns>Collection of milestones</returns>
 public TlProjectMilestoneCollection GetMilestonesByProject(TlProjectBrief project)
 {
     return GetMilestonesByProject(project.ID);
 }
 /// <summary>
 /// Returns the list with the detailed information about the tasks for the current user 
 /// within specified project
 /// </summary>
 /// <param name="project">Project</param>
 /// <param name="status">Task status</param>
 /// <returns>Tasks collection</returns>
 public TlProjectTaskCollection GetTasksMyByProject(TlProjectBrief project, TlProjectTaskStatus status)
 {
     return GetTasksMyByProject(project.ID, status);
 }
 /// <summary>
 /// Get all project tasks
 /// </summary>
 /// <param name="project">Project</param>
 /// <returns>Tasks collection</returns>
 public TlProjectTaskCollection GetTasksByProject(TlProjectBrief project)
 {
     return GetTasksByProject(project.ID);
 }
 /// <summary>
 /// Returns the detailed information about the time spent on the project
 /// </summary>
 /// <param name="project">Requested project</param>
 /// <returns>Collection of time records</returns>
 public TlProjectTimeRecordCollection GetProjectTime(TlProjectBrief project)
 {
     return GetProjectTime(project.ID);
 }
 /// <summary>
 /// Returns project details
 /// </summary>
 /// <param name="user">Project which contains requested project id</param>
 /// <returns>Project record or null if user was not found</returns>
 public TlProjectExtended GetProject(TlProjectBrief project)
 {
     return GetProject(project.ID);
 }
        /// <summary>
        /// Parses XML node
        /// </summary>
        /// <param name="nodeNameLowerCase">XMLNode node name (lower case)</param>
        /// <param name="node">XMLNode node</param>
        /// <returns>True if XML node conains object data, otherwise returns false</returns>
        protected override bool ParseItem(string nodeNameLowerCase, XmlNode node)
        {
            if (nodeNameLowerCase == "canedit")
                CanEdit = HelperXML.GetBool(node);
            else if (nodeNameLowerCase == "id")
                ID = HelperXML.GetInt32(node);
            else if (nodeNameLowerCase == "title")
                Title = node.InnerText;
            else if (nodeNameLowerCase == "description")
                Description = node.InnerText;
            else if (nodeNameLowerCase == "isnotify")
                IsNotify = HelperXML.GetBool(node);
            else if (nodeNameLowerCase == "iskey")
                IsKey = HelperXML.GetBool(node);
            else if (nodeNameLowerCase == "deadline")
                Deadline = HelperXML.GetDateTime(node);
            else if (nodeNameLowerCase == "projectowner")
            {
                ProjectOwner = new TlProjectBrief();
                ProjectOwner.Connection = Connection;
                ProjectOwner.Deserialize(node);
            }
            else if (nodeNameLowerCase == "status")
                Status = (TlProjectMilestoneStatus)HelperXML.GetInt32(node);
            else if (nodeNameLowerCase == "responsible")
            {
                Responsible = new TlUserBrief();
                Responsible.Connection = Connection;
                Responsible.Deserialize(node);
            }
            else if (nodeNameLowerCase == "created")
                Created = HelperXML.GetDateTime(node);
            else if (nodeNameLowerCase == "createdby")
            {
                CreatedBy = new TlUserBrief();
                CreatedBy.Connection = Connection;
                CreatedBy.Deserialize(node);
            }
            else if (nodeNameLowerCase == "updated")
                Updated = HelperXML.GetDateTime(node);
            else if (nodeNameLowerCase == "updatedby")
            {
                UpdatedBy = new TlUserBrief();
                UpdatedBy.Connection = Connection;
                UpdatedBy.Deserialize(node);
            }
            else
                return false;

            return true;
        }