public void SaveNewConstructionChangeDirective()
 {
     ConstructionChangeDirective ccd = new ConstructionChangeDirective(new Guid("5704f6b9-6ffa-444c-9583-35cc340fce2a"), 5);
     ccd.AmountChanged = 150;
     ccd.ChangeType = PriceChangeType.ContractSum;
     ccd.PriceChangeDirection = ChangeDirection.Increased;
     ccd.Contractor = CompanyService.GetCompany("8b6a05be-6106-45fb-b6cc-b03cfa5ab74b");
     ccd.Description = "This is a test.";
     ccd.TimeChanged = 2;
     ccd.TimeChangeDirection = ChangeDirection.Increased;
     Exception error = null;
     try
     {
         this.repository[ccd.Key] = ccd;
         this.unitOfWork.Commit();
     }
     catch (Exception e)
     {
         error = e;
         this.testContextInstance.WriteLine(e.ToString());
     }
     Assert.IsNull(error);
 }
Ejemplo n.º 2
0
 public static ConstructionChangeDirectiveContract ToConstructionChangeDirectiveContract(ConstructionChangeDirective ccd)
 {
     ConstructionChangeDirectiveContract contract = null;
     if (ccd != null)
     {
         contract = new ConstructionChangeDirectiveContract();
         contract.AmountChanged = ccd.AmountChanged;
         contract.ArchitectSignatureDate = ccd.ArchitectSignatureDate;
         contract.Attachment = ccd.Attachment;
         contract.Cause = ccd.Cause;
         contract.ChangeType = Converter.ToPriceChangeTypeContract(ccd.ChangeType);
         contract.Contractor = Converter.ToCompanyContract(ccd.Contractor);
         contract.ContractorSignatureDate = ccd.ContractorSignatureDate;
         foreach (CopyTo copy in ccd.CopyToList)
         {
             contract.CopyToList.Add(Converter.ToCopyListContract(copy));
         }
         contract.DeliveryMethod = Converter.ToDeliveryMethodContract(ccd.DeliveryMethod);
         contract.Description = ccd.Description;
         contract.Final = ccd.Final;
         contract.From = Converter.ToEmployeeContract(ccd.From);
         contract.Initiator = ccd.Initiator;
         contract.IssueDate = ccd.IssueDate;
         contract.Key = ccd.Key;
         contract.Number = ccd.Number;
         contract.Origin = ccd.Origin;
         contract.OtherDeliveryMethod = ccd.OtherDeliveryMethod;
         contract.OwnerSignatureDate = ccd.OwnerSignatureDate;
         contract.PhaseNumber = ccd.PhaseNumber;
         contract.PriceChangeDirection = Converter.ToChangeDirectionContract(ccd.PriceChangeDirection);
         contract.ProjectKey = ccd.ProjectKey;
         contract.Reason = ccd.Reason;
         contract.Reimbursable = ccd.Reimbursable;
         contract.Remarks = ccd.Remarks;
         contract.TimeChanged = ccd.TimeChanged;
         contract.TimeChangeDirection = Converter.ToChangeDirectionContract(ccd.TimeChangeDirection);
         contract.To = Converter.ToProjectContactContract(ccd.To);
         contract.TotalPages = ccd.TotalPages;
         contract.TransmittalDate = ccd.TransmittalDate;
         contract.TransmittalRemarks = ccd.TransmittalRemarks;
     }
     return contract;
 }
 public static void SaveConstructionChangeDirective(
     ConstructionChangeDirective ccd)
 {
     ConstructionChangeDirectiveService.repository[ccd.Key] = ccd;
     ConstructionChangeDirectiveService.unitOfWork.Commit();
 }
Ejemplo n.º 4
0
 public static void SaveConstructionChangeDirective(
     ConstructionChangeDirective ccd)
 {
     ConstructionChangeDirectiveService.repository[ccd.Key] = ccd;
     ConstructionChangeDirectiveService.unitOfWork.Commit();
 }