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);
 }
Ejemplo n.º 3
0
 public ChangeOrderViewModel(IView view)
     : base(view)
 {
     this.contractors          = CompanyService.GetAllCompanies();
     this.toList               = UserSession.CurrentProject.Contacts;
     this.priceChangeTypesView = new
                                 CollectionView(Enum.GetNames(typeof(PriceChangeType)));
     string[] changeDirections = Enum.GetNames(typeof(ChangeDirection));
     this.priceChangeDirections = new CollectionView(changeDirections);
     this.timeChangeDirections  = new CollectionView(changeDirections);
     this.statuses              = SubmittalService.GetItemStatuses();
     this.disciplines           = SubmittalService.GetDisciplines();
     this.routingItemsViewModel = new RoutingItemsViewModel <ChangeOrder>(this);
 }