Пример #1
0
        }                             //end Service()

        public Service(net.autotask.webservices.Service entity) : base(entity)
        {
            this.Name               = entity.Name?.ToString();
            this.Description        = entity.Description?.ToString();
            this.InvoiceDescription = entity.InvoiceDescription.ToString();
            this.IsActive           = entity.IsActive == null ? default(bool?) : bool.Parse(entity.IsActive.ToString());
            this.UnitCost           = entity.UnitCost == null ? default(double) : double.Parse(entity.UnitCost.ToString());
            this.UnitPrice          = entity.UnitPrice == null ? default(double) : double.Parse(entity.UnitPrice.ToString());
            this.CreateDate         = entity.CreateDate == null
                ? default(DateTime?)
                                      : DateTime.Parse(entity.CreateDate.ToString());
            this.AllocationCodeID = entity.AllocationCodeID == null ? default(int) : int.Parse(entity.AllocationCodeID.ToString());
            this.LastModifiedDate = entity.LastModifiedDate == null
                ? default(DateTime)
                : DateTime.Parse(entity.LastModifiedDate.ToString());
            this.CreatorResourceID = entity.CreatorResourceID == null
                ? default(int?)
                : int.Parse(entity.CreatorResourceID.ToString());
            this.MarkupRate = entity.MarkupRate == null ? default(double) : double.Parse(entity.MarkupRate.ToString());
            this.PeriodType = entity.PeriodType?.ToString();
            this.ServiceLevelAgreementID = entity.ServiceLevelAgreementID == null
                ? default(long)
                : long.Parse(entity.ServiceLevelAgreementID.ToString());
            this.UpdateResourceID = entity.UpdateResourceID == null
                ? default(int?)
                : int.Parse(entity.UpdateResourceID.ToString());
            this.VendorAccountID = entity.VendorAccountID == null
                ? default(int?)
                : int.Parse(entity.VendorAccountID.ToString());

            this.UserDefinedFields = entity.UserDefinedFields?.Select(udf => new UserDefinedField {
                Name = udf.Name, Value = udf.Value
            }).ToList();
        } //end Account(net.autotask.webservices.Account entity)
Пример #2
0
        }                             //end Service()

        public Service(net.autotask.webservices.Service entity) : base(entity)
        {
            this.AllocationCodeID   = int.Parse(entity.AllocationCodeID.ToString());
            this.CreateDate         = entity.CreateDate == null ? default(DateTime?) : DateTime.Parse(entity.CreateDate.ToString());
            this.CreatorResourceID  = entity.CreatorResourceID == null ? default(int?) : int.Parse(entity.CreatorResourceID.ToString());
            this.Description        = entity.Description == null ? default(string) : entity.Description.ToString();
            this.InvoiceDescription = entity.InvoiceDescription == null ? default(string) : entity.InvoiceDescription.ToString();
            this.IsActive           = entity.IsActive == null ? default(bool?) : bool.Parse(entity.IsActive.ToString());
            this.LastModifiedDate   = entity.LastModifiedDate == null ? default(DateTime?) : DateTime.Parse(entity.LastModifiedDate.ToString());
            this.MarkupRate         = double.Parse(entity.MarkupRate.ToString());
            this.Name       = entity.Name == null ? default(string) : entity.Name.ToString();
            this.PeriodType = entity.PeriodType == null ? default(string) : entity.PeriodType.ToString();
            this.ServiceLevelAgreementID = long.Parse(entity.ServiceLevelAgreementID.ToString());
            this.UnitCost         = double.Parse(entity.UnitCost.ToString());
            this.UnitPrice        = double.Parse(entity.UnitPrice.ToString());
            this.UpdateResourceID = entity.UpdateResourceID == null ? default(int?) : int.Parse(entity.UpdateResourceID.ToString());
            this.VendorAccountID  = entity.VendorAccountID == null ? default(int?) : int.Parse(entity.VendorAccountID.ToString());
        } //end Account(net.autotask.webservices.Account entity)
Пример #3
0
        }                             //end Service()

        public Service(net.autotask.webservices.Service entity) : base(entity)
        {
        } //end Account(net.autotask.webservices.Account entity)