コード例 #1
0
ファイル: Contact.cs プロジェクト: maxwalter/TimeLogApiSdk
 /// <summary>
 /// Initializes a new instance of the <see cref="Contact" /> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public Contact(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AccountManagerFullName = node.GetStringSafe("tlp:AccountManagerFullName", namespaceManager);
     this.AccountManagerID = node.GetIntSafe("tlp:AccountManagerID", namespaceManager);
     this.Address1 = node.GetStringSafe("tlp:Address1", namespaceManager);
     this.Address2 = node.GetStringSafe("tlp:Address2", namespaceManager);
     this.Birthday = node.GetStringSafe("tlp:Birthday", namespaceManager);
     this.City = node.GetStringSafe("tlp:City", namespaceManager);
     this.Comment = node.GetStringSafe("tlp:Comment", namespaceManager);
     this.Country = node.GetStringSafe("tlp:Country", namespaceManager);
     this.CustomerID = node.GetIntSafe("tlp:CustomerID", namespaceManager);
     this.CustomerName = node.GetStringSafe("tlp:CustomerName", namespaceManager);
     this.CustomerNo = node.GetStringSafe("tlp:CustomerNo", namespaceManager);
     this.Email = node.GetStringSafe("tlp:Email", namespaceManager);
     this.FirstName = node.GetStringSafe("tlp:FirstName", namespaceManager);
     this.FullName = node.GetStringSafe("tlp:FullName", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.LastName = node.GetStringSafe("tlp:LastName", namespaceManager);
     this.Mobile = node.GetStringSafe("tlp:Mobile", namespaceManager);
     this.Phone = node.GetStringSafe("tlp:Phone", namespaceManager);
     this.PrivatePhone = node.GetStringSafe("tlp:PrivatePhone", namespaceManager);
     this.State = node.GetStringSafe("tlp:State", namespaceManager);
     this.Title = node.GetStringSafe("tlp:Title", namespaceManager);
     this.ZipCode = node.GetStringSafe("tlp:ZipCode", namespaceManager);
 }
コード例 #2
0
ファイル: WorkUnit.cs プロジェクト: maxwalter/TimeLogApiSdk
 /// <summary>
 ///     Initializes a new instance of the <see cref="WorkUnit" /> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public WorkUnit(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AdditionalTextField = node.GetStringSafe("tlp:AdditionalTextField", namespaceManager);
     this.AllocationID = node.GetIntSafe("tlp:AllocationID", namespaceManager);
     this.ApprovedStatus = node.GetIntSafe("tlp:ApprovedStatus", namespaceManager);
     this.Created = node.GetDateTimeSafe("tlp:Created", namespaceManager);
     this.CreatedBy = node.GetStringSafe("tlp:CreatedBy", namespaceManager);
     this.CreatedByEmployeeID = node.GetIntSafe("tlp:CreatedByEmployeeID", namespaceManager);
     this.CustomerID = node.GetIntSafe("tlp:CustomerID", namespaceManager);
     this.CustomerName = node.GetStringSafe("tlp:CustomerName", namespaceManager);
     this.Date = node.GetDateTimeSafe("tlp:Date", namespaceManager);
     this.DepartmentID = node.GetIntSafe("tlp:DepartmentID", namespaceManager);
     this.DepartmentName = node.GetStringSafe("tlp:DepartmentName", namespaceManager);
     this.EmployeeFirstName = node.GetStringSafe("tlp:EmployeeFirstName", namespaceManager);
     this.EmployeeID = node.GetIntSafe("tlp:EmployeeID", namespaceManager);
     this.EmployeeInitials = node.GetStringSafe("tlp:EmployeeInitials", namespaceManager);
     this.EmployeeLastName = node.GetStringSafe("tlp:EmployeeLastName", namespaceManager);
     this.EstimatedAmount = node.GetDoubleSafe("tlp:EstimatedAmount", namespaceManager);
     this.EstimatedHours = node.GetDoubleSafe("tlp:EstimatedHours", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.InvAmount = node.GetDoubleSafe("tlp:InvAmount", namespaceManager);
     this.InvHours = node.GetDoubleSafe("tlp:InvHours", namespaceManager);
     this.IsBillable = node.GetBoolTimeSafe("tlp:IsBillable", namespaceManager);
     this.LastModifiedAt = node.GetDateTimeSafe("tlp:LastModifiedAt", namespaceManager);
     this.LastModifiedBy = node.GetStringSafe("tlp:LastModifiedBy", namespaceManager);
     this.LastModifiedByEmployeeID = node.GetIntSafe("tlp:LastModifiedByEmployeeID", namespaceManager);
     this.Note = node.GetStringSafe("tlp:Note", namespaceManager).Trim('\r', '\n');
     this.ProjectID = node.GetIntSafe("tlp:ProjectID", namespaceManager);
     this.ProjectName = node.GetStringSafe("tlp:ProjectName", namespaceManager);
     this.RegAmount = node.GetDoubleSafe("tlp:RegAmount", namespaceManager);
     this.RegHours = node.GetDoubleSafe("tlp:RegHours", namespaceManager);
     this.TaskID = node.GetIntSafe("tlp:TaskID", namespaceManager);
     this.TaskName = node.GetStringSafe("tlp:TaskName", namespaceManager);
 }
コード例 #3
0
ファイル: Customer.cs プロジェクト: maxwalter/TimeLogApiSdk
 /// <summary>
 /// Initializes a new instance of the <see cref="Customer"/> class.
 /// </summary>
 /// <param name="node">The XML node to initialize from</param>
 /// <param name="namespaceManager">The namespace manager</param>
 public Customer(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     this.AccountManagerFullName = node.GetStringSafe("tlp:AccountManagerFullName", namespaceManager);
     this.AccountManagerID = node.GetIntSafe("tlp:AccountManagerID", namespaceManager);
     this.Address1 = node.GetStringSafe("tlp:Address1", namespaceManager);
     this.Address2 = node.GetStringSafe("tlp:Address2", namespaceManager);
     this.Address3 = node.GetStringSafe("tlp:Address3", namespaceManager);
     this.City = node.GetStringSafe("tlp:City", namespaceManager);
     this.Country = node.GetStringSafe("tlp:Country", namespaceManager);
     this.CustomerStatus = node.GetStringSafe("tlp:CustomerStatus", namespaceManager);
     this.CustomerStatusID = node.GetIntSafe("tlp:CustomerStatusID", namespaceManager);
     this.Email = node.GetStringSafe("tlp:Email", namespaceManager);
     this.Fax = node.GetStringSafe("tlp:Fax", namespaceManager);
     this.Id = int.Parse(node.Attributes["ID"].InnerText);
     this.Name = node.GetStringSafe("tlp:Name", namespaceManager);
     this.NickName = node.GetStringSafe("tlp:NickName", namespaceManager);
     this.No = node.GetStringSafe("tlp:No", namespaceManager);
     this.Phone = node.GetStringSafe("tlp:Phone", namespaceManager);
     this.State = node.GetStringSafe("tlp:State", namespaceManager);
     this.VATNo = node.GetStringSafe("tlp:VATNo", namespaceManager);
     this.WebPage = node.GetStringSafe("tlp:WebPage", namespaceManager);
     this.ZipCode = node.GetStringSafe("tlp:ZipCode", namespaceManager);
 }