Exemple #1
0
 public static ChangeOrder ToChangeOrder(ChangeOrderContract contract)
 {
     ChangeOrder co = null;
     if (contract != null)
     {
         co = new ChangeOrder(contract.Key, contract.ProjectKey, contract.Number);
         co.AgencyApprovedDate = contract.AgencyApprovedDate;
         co.AmountChanged = contract.AmountChanged;
         co.ArchitectSignatureDate = contract.ArchitectSignatureDate;
         co.ChangeType = Converter.ToPriceChangeType(contract.ChangeType);
         co.PriceChangeDirection = Converter.ToChangeDirection(contract.ChangeTypeDirection);
         co.Contractor = Converter.ToCompany(contract.Contractor);
         co.ContractorSignatureDate = contract.ContractorSignatureDate;
         co.DateToField = contract.DateToField;
         co.Description = contract.Description;
         co.EffectiveDate = contract.EffectiveDate;
         co.OwnerSignatureDate = contract.OwnerSignatureDate;
         foreach (RoutingItemContract item in contract.RoutingItems)
         {
             co.RoutingItems.Add(Converter.ToRoutingItem(item));
         }
         co.Status = Converter.ToItemStatus(contract.Status);
         co.TimeChanged = contract.TimeChanged;
         co.TimeChangeDirection = Converter.ToChangeDirection(contract.TimeChangeDirection);
     }
     return co;
 }
Exemple #2
0
 public static ChangeOrderContract ToChangeOrderContract(ChangeOrder co)
 {
     ChangeOrderContract contract = null;
     if (co != null)
     {
         contract = new ChangeOrderContract();
         contract.AgencyApprovedDate = co.AgencyApprovedDate;
         contract.AmountChanged = co.AmountChanged;
         contract.ArchitectSignatureDate = co.ArchitectSignatureDate;
         contract.ChangeType = Converter.ToPriceChangeTypeContract(co.ChangeType);
         contract.ChangeTypeDirection = Converter.ToChangeDirectionContract(co.PriceChangeDirection);
         contract.Contractor = Converter.ToCompanyContract(co.Contractor);
         contract.ContractorSignatureDate = co.ContractorSignatureDate;
         contract.DateOfSubstantialCompletion = co.DateOfSubstantialCompletion;
         contract.DateToField = co.DateToField;
         contract.Description = co.Description;
         contract.EffectiveDate = co.EffectiveDate;
         contract.Key = co.Key;
         contract.NewConstructionCost = co.NewConstructionCost;
         contract.Number = co.Number;
         contract.OriginalConstructionCost = co.OriginalConstructionCost;
         contract.OwnerSignatureDate = co.OwnerSignatureDate;
         contract.PreviousAuthorizedChangeOrderAmount = co.PreviousAuthorizedAmount;
         contract.PreviousTimeChangedTotal = co.PreviousTimeChangedTotal;
         contract.ProjectKey = co.ProjectKey;
         foreach (RoutingItem item in co.RoutingItems)
         {
             contract.RoutingItems.Add(Converter.ToRoutingItemContract(item));
         }
         contract.Status = Converter.ToItemStatusContract(co.Status);
         contract.TimeChanged = co.TimeChanged;
         contract.TimeChangeDirection = Converter.ToChangeDirectionContract(co.TimeChangeDirection);
     }
     return contract;
 }