Ejemplo n.º 1
0
        public void AddRfiTest()
        {
            IList <RequestForInformation> rfis = this.repository.FindAll();

            // Create a new RequestForInformation
            Project project                = ProjectService.GetAllProjects()[0];
            RequestForInformation rfi      = new RequestForInformation(project.Key, 2);
            IList <ItemStatus>    statuses = SubmittalService.GetItemStatuses();

            rfi.From       = project.Contacts[0];
            rfi.Status     = statuses[0];
            rfi.Contractor = CompanyService.GetAllCompanies()[0];
            IList <SpecificationSection> specSections =
                SubmittalService.GetSpecificationSections();

            rfi.SpecSection = specSections[0];

            // Add the RFI to the Repository
            this.repository.Add(rfi);

            // Commit the transaction
            this.unitOfWork.Commit();

            // Reload the RFI and verify it's number
            RequestForInformation savedRfi = repository.FindBy(rfi.Key);

            Assert.AreEqual(2, savedRfi.Number);
        }
Ejemplo n.º 2
0
 public TransmittalViewModel(IView view)
     : base(view)
 {
     this.specificationSections
         = SubmittalService.GetSpecificationSections();
     this.itemStatuses      = SubmittalService.GetItemStatuses();
     this.mutableCopyToList = new BindingList <MutableCopyTo>();
     this.deliveryMethods   = new CollectionView(
         Enum.GetNames(typeof(Delivery)));
     this.disciplines         = SubmittalService.GetDisciplines();
     this.deleteCopyToCommand =
         new DelegateCommand(this.DeleteCopyToCommandHandler);
 }