Beispiel #1
0
        public PresentationViewModel(Requirement requirement)
        {
            RequirementID            = requirement.RequirementID;
            DocumentationCode        = requirement.DocumentationBusinessType.Documentation.DocumentationCode;
            DocumentationDescription = requirement.DocumentationBusinessType.Documentation.Description;
            RequirementStatus        = requirement.RequirementStatus;

            if (requirement.EmployeeContract == null && requirement.VehicleContract == null)
            {
                this.ResourceType           = ResourceTypeViewModel.Contractor;
                this.ResourceIdentification = requirement.Contract.Contractor.CompanyName;
            }
            else
            {
                if (requirement.EmployeeContract == null)
                {
                    this.ResourceType           = ResourceTypeViewModel.Vehicle;
                    this.ResourceIdentification = requirement.VehicleContract.Vehicle.IdentificationNumber;
                }
                else
                {
                    this.ResourceType           = ResourceTypeViewModel.Employee;
                    this.ResourceIdentification = requirement.EmployeeContract.Employee.LastName + ", " + requirement.EmployeeContract.Employee.FirstName;
                }
            }
        }
Beispiel #2
0
 public SwimlaneViewModel(RequirementStatus requirementStatus)
 {
     _requirementStatus = requirementStatus;
     Index = new ObservableCollection <Requirement>();
     RequirementDragHandler = new RequirementDragHandler();
     RequirementDragHandler.DragDroppingHandler += OnDragDropping;
 }
Beispiel #3
0
        public async void OnDrop(int droppedRequirementId, RequirementStatus target)
        {
            var postIt = Index.Where(r => r.Requirement.Id == droppedRequirementId).FirstOrDefault();
            var isDroppedOnSameSwimlane = postIt != null;

            if (!isDroppedOnSameSwimlane)
            {
                MessengerInstance.Send(new BusyMessage(true, this));

                var authToken = User.Current.AuthToken;

                var dropped = await _requirementDataService.EditModelAsync(
                    authToken, FeedbackActions.ReactToException, droppedRequirementId);

                dropped.Status = (int)target;
                Requirement updated = null;
                try
                {
                    updated = await _requirementDataService.UpdateModelAsync(
                        authToken, FeedbackActions.ReactToException, dropped as Requirement);
                }
                finally
                {
                    MessengerInstance.Send(new BusyMessage(false, this));
                }
                if (updated != null)
                {
                    MessengerInstance.Send(new ReloadRequestMessage(this));
                }
            }
        }
        public void ConvertSDKUnrecognizedRequirementStatusToAPIUnknownValue()
        {
            apiRequirementStatus1 = "NEWLY_ADDED_REQUIREMENT_STATUS";
            RequirementStatus unrecognizedRequirementStatus = RequirementStatus.valueOf(apiRequirementStatus1);
            string            acutalApiValue = new RequirementStatusConverter(unrecognizedRequirementStatus).ToAPIRequirementStatus();

            Assert.AreEqual(apiRequirementStatus1, acutalApiValue);
        }
Beispiel #5
0
        public void DeleteRequirementStatus(int id)
        {
            RequirementStatus statusToBeDeleted = (from s in _repo.Query <RequirementStatus>()
                                                   where s.Id == id
                                                   select s).FirstOrDefault();

            _repo.Delete(statusToBeDeleted);
        }
Beispiel #6
0
        public RequirementStatus GetRequirementStatus(int id)
        {
            RequirementStatus status = (from s in _repo.Query <RequirementStatus>()
                                        where s.Id == id
                                        select s).FirstOrDefault();

            return(status);
        }
 public SwimlaneViewModel(
     IDataService <Requirement> requirementDataService,
     RequirementStatus name)
 {
     Name  = name;
     Index = new ObservableCollection <PostItViewModel>();
     _requirementDataService = requirementDataService;
 }
Beispiel #8
0
 public void TestRequirementStatus()
 {
     foreach (RequirementStatus requirementStatus in RequirementStatus.Values())
     {
         Assert.IsNotNull(requirementStatus.ToString());
         Assert.IsNotEmpty(requirementStatus.ToString());
     }
     Assert.AreEqual(0, (int)RequirementStatus.INCOMPLETE);
     Assert.AreEqual("REJECTED", (string)RequirementStatus.REJECTED);
     Assert.AreEqual("COMPLETE", RequirementStatus.COMPLETE.GetName());
 }
Beispiel #9
0
        public void whenBuildingRequirementStatusWithAPIValueCOMPLETEThenCOMPLETERequirementStatusIsReturned()
        {
            string expectedSDKValue = "COMPLETE";


            RequirementStatus classUnderTest = RequirementStatus.valueOf("COMPLETE");
            string            actualSDKValue = classUnderTest.getSdkValue();


            Assert.AreEqual(expectedSDKValue, actualSDKValue);
        }
Beispiel #10
0
        public void whenBuildingRequirementStatusWithAPIValueREJECTEDThenREJECTEDRequirementStatusIsReturned()
        {
            string expectedSDKValue = "REJECTED";


            RequirementStatus classUnderTest = RequirementStatus.valueOf("REJECTED");
            string            actualSDKValue = classUnderTest.getSdkValue();


            Assert.AreEqual(expectedSDKValue, actualSDKValue);
        }
Beispiel #11
0
        public void whenBuildingRequirementStatusWithUnknownAPIValueThenUNRECOGNIZEDRequirementStatusIsReturned()
        {
            string expectedSDKValue = "UNRECOGNIZED";


            RequirementStatus classUnderTest = RequirementStatus.valueOf("ThisRequirementStatusDoesNotExistInSDK");
            String            actualSDKValue = classUnderTest.getSdkValue();


            Assert.AreEqual(expectedSDKValue, actualSDKValue);
        }
Beispiel #12
0
        private async Task DoSearch()
        {
            RequirementStatus statusFilter = ComboBoxFeatureStatus.SelectedItem != null ?
                                             (RequirementStatus)(ComboBoxFeatureStatus.SelectedItem) :
                                             RequirementStatus.All;

            FeatureList = new FeatureIncrementalLoad(
                TextBoxFeatureTitleSearch.Text,
                statusFilter);

            await FeatureList.LoadMoreItemsAsync();

            featureList.ItemsSource = FeatureList;
        }
Beispiel #13
0
        private async Task DoSearch()
        {
            RequirementStatus statusFilter = ComboBoxRequirementStatus.SelectedItem != null ?
                                             (RequirementStatus)(ComboBoxRequirementStatus.SelectedItem) :
                                             RequirementStatus.All;

            RequirementList = new RequirementIncrementalLoad(
                TextBoxRequirementTitleSearch.Text,
                statusFilter);

            await RequirementList.LoadMoreItemsAsync();

            requirementList.ItemsSource = RequirementList;
        }
Beispiel #14
0
        private void ButtonAddTask_Click(object sender, RoutedEventArgs e)
        {
            filteredStatus   = (RequirementStatus)(ComboBoxTaskType.SelectedItem ?? RequirementStatus.All);
            filteredIsActive = CheckBoxShowInactive.IsChecked.Value;
            filterText       = TextBoxTaskTitleSearch.Text;

            TaskAPI task = new TaskAPI {
                isActive = true, isNew = true
            };

            ((Frame)Parent).Navigate(
                typeof(Tasks.TaskEdit),
                task,
                new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo());
        }
Beispiel #15
0
        public async Task <ActionResult> Index(int?contractID, int?periodID, string requirementStatusID, int?entityTypeID)
        {
            ViewBag.ContractID          = new SelectList(await contractRepository.FindContractsAsync(base.CurrentContractorID), "ContractID", "ContractCode");
            ViewBag.PeriodID            = new SelectList(await periodRepository.FindPeriodsAsync(), "PeriodID", "PeriodID");
            ViewBag.RequirementStatusID = new SelectList(Enum.GetNames(typeof(RequirementStatus)));
            ViewBag.EntityTypeID        = new SelectList(await entityTypeRepository.EntityTypesAsync(), "EntityTypeID", "Description");

            RequirementStatus requirementStatus = !string.IsNullOrEmpty(requirementStatusID) ? (RequirementStatus)Enum.Parse(typeof(RequirementStatus), requirementStatusID) : 0;

            var requirements = await requirementRepository.FindRequirementsByFilterAsync(0, 0, contractID == null? 0 : contractID.Value, periodID == null? 0 : periodID.Value, requirementStatus, entityTypeID == null? 0 : entityTypeID.Value);

            var requirementsViewModel = new RequirementListViewModel(requirements.ToList());

            return(View(requirementsViewModel));
        }
Beispiel #16
0
        public void UpdateRequirement(Requirement req)
        {
            Sprint sprint = (from s in _repo.Query <Sprint>()
                             where s.Id == req.Sprint.Id
                             select s).FirstOrDefault();

            req.Sprint = sprint;

            RequirementStatus reqStatus = (from rs in _repo.Query <RequirementStatus>()
                                           where rs.Id == req.Status.Id
                                           select rs).FirstOrDefault();

            req.Status = reqStatus;

            _repo.Update(req);
        }
Beispiel #17
0
 public EditRequirementViewModel(Requirement requirement)
 {
     Id = requirement.Id;
     AssignedToUserId = requirement.AssignedToUserId;
     ContactId        = requirement.ContactId;
     SourceId         = requirement.SourceId;
     CategoryId       = requirement.CategoryId;
     Title            = requirement.Title;
     Description      = requirement.Description;
     Url               = requirement.Url;
     BillingType       = requirement.BillingType;
     Budget            = requirement.Budget;
     RequirementStatus = requirement.RequirementStatus;
     PostedOn          = requirement.PostedOn;
     CreatedOn         = requirement.CreatedOn;
 }
        // GET: CustomerRequirements
        public async Task <ActionResult> Index(int?contractorID, int?contractID, int?periodID)
        {
            //Contractors por Customer
            ViewBag.ContractorID = new SelectList(await contractorRepository.FindContractorsAsync(base.CurrentCustomerID), "ContractorID", "CompanyName");

            //Contracts por Contractor
            ViewBag.ContractID = new SelectList(await contractRepository.FindContractsAsync(base.CurrentContractorID), "ContractID", "ContractCode");

            ViewBag.PeriodID = new SelectList(await periodRepository.FindPeriodsAsync(), "PeriodID", "PeriodID");

            RequirementStatus requirementStatus = 0; // !string.IsNullOrEmpty(string.Empty) ? (RequirementStatus)Enum.Parse(typeof(RequirementStatus), requirementStatusID) : 0;
            var requirements = await requirementRepository.FindRequirementsByFilterAsync(0, contractorID == null? 0 : contractorID.Value, contractID == null? 0 : contractID.Value, periodID == null? 0 : periodID.Value, requirementStatus, 0);

            var requirementsViewModel = new RequirementListViewModel(requirements.ToList());

            return(View(requirementsViewModel));
        }
Beispiel #19
0
        public IActionResult Post([FromBody] RequirementStatus status)
        {
            if (status == null)
            {
                return(BadRequest());
            }
            else if (status.Id == 0)
            {
                _reqStat.AddRequirementStatus(status);

                return(Ok());
            }
            else
            {
                _reqStat.UpdateRequirementStatus(status);

                return(Ok());
            }
        }
Beispiel #20
0
        private async void taskList_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
        {
            filteredStatus   = (RequirementStatus)(ComboBoxTaskType.SelectedItem ?? RequirementStatus.All);
            filteredIsActive = CheckBoxShowInactive.IsChecked.Value;
            filterText       = TextBoxTaskTitleSearch.Text;

            ListView listView = sender as ListView;

            if (null == listView)
            {
                return;
            }

            long    taskId = (listView.SelectedItem as TasksAPI).id;
            TaskAPI task   = await jlTask.Get(taskId);

            ((Frame)Parent).Navigate(
                typeof(Tasks.TaskEdit),
                task,
                new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo());
        }
Beispiel #21
0
        public async Task <ActionResult> Index(int?customerID, int?contractorID, int?periodID, string requirementStatusID, int?entityTypeID)
        {
            var customersByAuditor = await customerAuditorRespository.FindCustomerAuditorsByUserIDAsync(this.CurrentUserID);

            var customerIDFilter = customerID == null?customersByAuditor.FirstOrDefault().CustomerID : customerID;

            var contractors = await contractorRepository.FindContractorsByCustomerIDAsync((int)customerIDFilter);

            var contractorIDFilter = contractors != null && contractorID == null?contractors.FirstOrDefault()?.ContractorID : contractorID;

            ViewBag.PeriodID            = new SelectList(await periodRepository.FindPeriodsAsync(), "PeriodID", "PeriodID");
            ViewBag.RequirementStatusID = new SelectList(Enum.GetNames(typeof(RequirementStatus)));
            ViewBag.EntityTypeID        = new SelectList(await entityTypeRepository.EntityTypesAsync(), "EntityTypeID", "Description");

            RequirementStatus requirementStatus = !string.IsNullOrEmpty(requirementStatusID) ? (RequirementStatus)Enum.Parse(typeof(RequirementStatus), requirementStatusID) : 0;

            //var requirements = await requirementRepository.FindRequirementsByFilterAsync((int)customerIDFilter, (int)contractorIDFilter, 0, periodID == null ? 0 : periodID.Value, requirementStatus, entityTypeID == null ? 0 : entityTypeID.Value);
            var requirements = await requirementRepository.FindRequirementsByFilterAsync((int)customerIDFilter, contractorIDFilter == null? 0 : contractorIDFilter.Value, 0, periodID == null? 0 : periodID.Value, requirementStatus, entityTypeID == null? 0 : entityTypeID.Value);


            var requirementsViewModel = new RequirementListViewModel(requirements.ToList());

            ViewBag.CustomerID   = customerIDFilter;
            ViewBag.ContractorId = contractorIDFilter;

            requirementsViewModel.Customers = customersByAuditor.Select(x => new SelectListItem()
            {
                Value = x.CustomerID.ToString(), Text = x.Customer.FullCompanyName
            });
            requirementsViewModel.Contractors = contractors.Select(x => new SelectListItem()
            {
                Value = x.ContractorID.ToString(), Text = x.FullCompanyName
            });


            return(View(requirementsViewModel));
        }
        /// <summary>Creates a new instance of our IncidentDetailsForm.</summary>
        public frmDetailsRequirement()
        {
            try
            {
                InitializeComponent();

                //Load images needed..
                this.imgLoadingIncident.Source = StaticFuncs.getImage("imgInfoWPF", new Size(48, 48)).Source;
                this.imgSavingIncident.Source  = StaticFuncs.getImage("imgSaveWPF", new Size(48, 48)).Source;
                this.imgLoadingError.Source    = StaticFuncs.getImage("imgErrorWPF", new Size(48, 48)).Source;
                //Load strings needed..
                this.toolTxtSave.Text           = StaticFuncs.getCultureResource.GetString("app_General_Save");
                this.toolTxtRefresh.Text        = StaticFuncs.getCultureResource.GetString("app_General_Refresh");
                this.toolTxtLoadWeb.Text        = StaticFuncs.getCultureResource.GetString("app_General_ViewBrowser");
                this.lblLoadingIncident.Text    = StaticFuncs.getCultureResource.GetString("app_Requirement_Loading");
                this.lblSavingIncident.Text     = StaticFuncs.getCultureResource.GetString("app_Requirement_Saving");
                this.btnRetryLoad.Content       = StaticFuncs.getCultureResource.GetString("app_General_ButtonRetry");
                this.lblLoadingError.Text       = StaticFuncs.getCultureResource.GetString("app_General_TalkingToServerErrorMessage");
                this.lblExpanderDetails.Text    = StaticFuncs.getCultureResource.GetString("app_General_ExpanderDetails");
                this.lblName.Text               = StaticFuncs.getCultureResource.GetString("app_General_Name") + ":";
                this.lblTxtToken.Text           = StaticFuncs.getCultureResource.GetString("app_General_CopyToClipboard");
                this.lblStatus.Text             = StaticFuncs.getCultureResource.GetString("app_General_Status") + ":";
                this.lblCreatedBy.Text          = StaticFuncs.getCultureResource.GetString("app_Requirement_CreatedBy") + ":";
                this.lblOwnedBy.Text            = StaticFuncs.getCultureResource.GetString("app_General_OwnedBy") + ":";
                this.lblImportance.Text         = StaticFuncs.getCultureResource.GetString("app_General_Priority") + ":";
                this.lblRelease.Text            = StaticFuncs.getCultureResource.GetString("app_General_AssociatedRequirement") + ":";
                this.lblDescription.Text        = StaticFuncs.getCultureResource.GetString("app_General_Description") + ":";
                this.lblExpanderResolution.Text = StaticFuncs.getCultureResource.GetString("app_General_ExpanderResolution");
                this.lblPlnEffort.Text          = StaticFuncs.getCultureResource.GetString("app_General_EstEffort") + ":";
                this.lblHours.Text              = StaticFuncs.getCultureResource.GetString("app_General_Hours");
                this.lblMins.Text               = StaticFuncs.getCultureResource.GetString("app_General_Minutes");
                this.lblExpanderTasks.Text      = StaticFuncs.getCultureResource.GetString("app_Requirement_ExpanderTask");
                //this.lblExpanderCustom.Text = StaticFuncs.getCultureResource.GetString("app_General_ExpanderCustom");
                this.lblExpanderAttachments.Text    = StaticFuncs.getCultureResource.GetString("app_General_Attachments");
                this.lblAddNewResolution.Text       = StaticFuncs.getCultureResource.GetString("app_General_AddNewComment") + ":";
                this.btnConcurrencyMergeNo.Content  = StaticFuncs.getCultureResource.GetString("app_General_Refresh");
                this.btnConcurrencyMergeYes.Content = StaticFuncs.getCultureResource.GetString("app_General_Merge");
                this.lblMergeConcurrency.Text       = StaticFuncs.getCultureResource.GetString("app_Requirement_AskMergeConcurrency");
                this.btnConcurrencyRefresh.Content  = StaticFuncs.getCultureResource.GetString("app_General_Refresh");
                this.lblNoMergeConcurrency.Text     = StaticFuncs.getCultureResource.GetString("app_Requirement_NoMergeConcurrency");

                //Load fixed-option dropdowns.
                // -- Importance
                for (int j = 0; j <= 4; j++)
                {
                    //HACK: We use the same values as the Task Priority.
                    RequirementPriority newImp = new RequirementPriority();
                    newImp.PriorityId = ((j == 0) ? new int?() : j);
                    switch (j)
                    {
                    case 0:
                        newImp.Name = StaticFuncs.getCultureResource.GetString("app_Task_Priority_0");
                        break;

                    case 1:
                        newImp.Name = StaticFuncs.getCultureResource.GetString("app_Task_Priority_1");
                        break;

                    case 2:
                        newImp.Name = StaticFuncs.getCultureResource.GetString("app_Task_Priority_2");
                        break;

                    case 3:
                        newImp.Name = StaticFuncs.getCultureResource.GetString("app_Task_Priority_3");
                        break;

                    case 4:
                        newImp.Name = StaticFuncs.getCultureResource.GetString("app_Task_Priority_4");
                        break;
                    }
                    this.cntrlImportance.Items.Add(newImp);
                }
                this.cntrlImportance.SelectedIndex = 0;
                // -- Status
                for (int i = 1; i <= 8; i++)
                {
                    RequirementStatus newStatus = new RequirementStatus();
                    newStatus.StatusId = i;
                    switch (i)
                    {
                    case 1:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Requested");
                        break;

                    case 2:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Planned");
                        break;

                    case 3:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_InProgress");
                        break;

                    case 4:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Completed");
                        break;

                    case 5:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Accepted");
                        break;

                    case 6:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Rejected");
                        break;

                    case 7:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Evaluated");
                        break;

                    case 8:
                        newStatus.Name = StaticFuncs.getCultureResource.GetString("app_Requirement_Status_Obsolete");
                        break;
                    }
                    this.cntrlStatus.Items.Add(newStatus);
                }
                this.cntrlStatus.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                Logger.LogMessage(ex, ".ctor()");
                MessageBox.Show(StaticFuncs.getCultureResource.GetString("app_General_UnexpectedError"), StaticFuncs.getCultureResource.GetString("app_General_ApplicationShortName"), MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Beispiel #23
0
 public void AddRequirementStatus(RequirementStatus status)
 {
     _repo.Add(status);
 }
        override public void Execute()
        {
            // Signer1 with 1 attachment requirement
            signer1 = SignerBuilder.NewSignerWithEmail(email1)
                      .WithFirstName("John")
                      .WithLastName("Smith")
                      .WithCustomId(SIGNER1_ID)
                      .WithAttachmentRequirement(AttachmentRequirementBuilder.NewAttachmentRequirementWithName(NAME1)
                                                 .WithDescription(DESCRIPTION1)
                                                 .IsRequiredAttachment()
                                                 .Build())
                      .Build();

            // Signer2 with 2 attachment requirements
            Signer signer2 = SignerBuilder.NewSignerWithEmail(email2)
                             .WithFirstName("Patty")
                             .WithLastName("Galant")
                             .WithCustomId(SIGNER2_ID)
                             .WithAttachmentRequirement(AttachmentRequirementBuilder.NewAttachmentRequirementWithName(NAME2)
                                                        .WithDescription(DESCRIPTION2)
                                                        .Build())
                             .WithAttachmentRequirement(AttachmentRequirementBuilder.NewAttachmentRequirementWithName(NAME3)
                                                        .WithDescription(DESCRIPTION3)
                                                        .IsRequiredAttachment()
                                                        .Build())
                             .Build();

            DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed(PackageName)
                                                .DescribedAs("This is a package created using the eSignLive SDK")
                                                .WithSigner(signer1)
                                                .WithSigner(signer2)
                                                .WithDocument(DocumentBuilder.NewDocumentNamed("test document")
                                                              .FromStream(fileStream1, DocumentType.PDF)
                                                              .WithSignature(SignatureBuilder.SignatureFor(email1)
                                                                             .Build())
                                                              .Build())
                                                .Build();

            packageId = eslClient.CreateAndSendPackage(superDuperPackage);

            retrievedPackage = eslClient.GetPackage(packageId);

            attachment1Id = retrievedPackage.GetSigner(email1).GetAttachmentRequirement(NAME1).Id;
            signer1       = retrievedPackage.GetSigner(email1);

            signer1Attachments = retrievedPackage.GetSigner(email1).Attachments;
            signer2Attachments = retrievedPackage.GetSigner(email2).Attachments;

            signer1Att1 = signer1Attachments[0];
            signer2Att1 = signer2Attachments[0];
            signer2Att2 = signer2Attachments[1];

            retrievedSigner1Att1RequirementStatus = signer1Att1.Status;
            retrievedSigner2Att1RequirementStatus = signer2Att1.Status;
            retrievedSigner2Att2RequirementStatus = signer2Att2.Status;

            // Upload attachment for signer1
            byte[] attachment1ForSigner1FileContent = new StreamDocumentSource(attachmentInputStream1).Content();
            attachment1ForSigner1FileSize = attachment1ForSigner1FileContent.Length;
            eslClient.UploadAttachment(packageId, signer1Att1.Id, ATTACHMENT_FILE_NAME1, attachment1ForSigner1FileContent, SIGNER1_ID);
            eslClient.UploadAttachment(packageId, signer2Att1.Id, ATTACHMENT_FILE_NAME2,
                                       new StreamDocumentSource(attachmentInputStream2).Content(), SIGNER2_ID);
            eslClient.UploadAttachment(PackageId, signer2Att2.Id, ATTACHMENT_FILE_NAME3,
                                       new StreamDocumentSource(attachmentInputStream3).Content(), SIGNER2_ID);

            // Sender rejects Signer1's uploaded attachment
            eslClient.AttachmentRequirementService.RejectAttachment(packageId, signer1, NAME1, REJECTION_COMMENT);
            retrievedPackageAfterRejection = eslClient.GetPackage(packageId);
            retrievedSigner1Att1RequirementStatusAfterRejection        = retrievedPackageAfterRejection.GetSigner(email1).GetAttachmentRequirement(NAME1).Status;
            retrievedSigner1Att1RequirementSenderCommentAfterRejection = retrievedPackageAfterRejection.GetSigner(email1).GetAttachmentRequirement(NAME1).SenderComment;

            // Sender accepts Signer1's uploaded attachment
            eslClient.AttachmentRequirementService.AcceptAttachment(packageId, signer1, NAME1);
            retrievedPackageAfterAccepting = eslClient.GetPackage(packageId);

            retrievedSigner1Att1RequirementStatusAfterAccepting        = retrievedPackageAfterAccepting.GetSigner(email1).GetAttachmentRequirement(NAME1).Status;
            retrievedSigner1Att1RequirementSenderCommentAfterAccepting = retrievedPackageAfterAccepting.GetSigner(email1).GetAttachmentRequirement(NAME1).SenderComment;

            // Download signer1's attachment
            DownloadedFile downloadedAttachment = eslClient.AttachmentRequirementService.DownloadAttachmentFile(packageId, attachment1Id);

            System.IO.File.WriteAllBytes(downloadedAttachment.Filename, downloadedAttachment.Contents);

            // Download all attachments for the package
            DownloadedFile downloadedAllAttachmentsForPackage = eslClient.AttachmentRequirementService.DownloadAllAttachmentFilesForPackage(packageId);

            System.IO.File.WriteAllBytes(DOWNLOADED_ALL_ATTACHMENTS_FOR_PACKAGE_ZIP, downloadedAllAttachmentsForPackage.Contents);

            // Download all attachments for the signer1 in the package
            DownloadedFile downloadedAllAttachmentsForSigner1InPackage = eslClient.AttachmentRequirementService.DownloadAllAttachmentFilesForSignerInPackage(retrievedPackage, signer1);

            System.IO.File.WriteAllBytes(DOWNLOADED_ALL_ATTACHMENTS_FOR_SIGNER1_IN_PACKAGE_ZIP, downloadedAllAttachmentsForSigner1InPackage.Contents);

            // Download all attachments for the signer2 in the package
            DownloadedFile downloadedAllAttachmentsForSigner2InPackage = eslClient.AttachmentRequirementService.DownloadAllAttachmentFilesForSignerInPackage(retrievedPackage, signer2);

            System.IO.File.WriteAllBytes(DOWNLOADED_ALL_ATTACHMENTS_FOR_SIGNER2_IN_PACKAGE_ZIP, downloadedAllAttachmentsForSigner2InPackage.Contents);

            downloadedAttachemnt1 = new FileInfo(downloadedAttachment.Filename);
        }
Beispiel #25
0
 public void UpdateRequirementStatus(RequirementStatus status)
 {
     _repo.Update(status);
 }
        public Task <List <Requirement> > FindRequirementsByFilterAsync(int customerID, int contractorID, int contractID, int periodID, RequirementStatus requirementStatus, int entityTypeID)
        {
            Stopwatch timespan = Stopwatch.StartNew();

            try
            {
                var result = db.Requirements
                             .Where(t => t.Contract.Contractor.CustomerID == customerID || customerID == 0)
                             .Where(t => t.Contract.Contractor.ContractorID == contractorID || contractorID == 0)
                             .Where(t => t.ContractID == contractID || contractID == 0)
                             .Where(t => t.PeriodID == periodID || periodID == 0)
                             .Where(t => t.RequirementStatus == requirementStatus || (int)requirementStatus == 0)
                             .Where(t => t.DocumentationBusinessType.Documentation.EntityTypeID == entityTypeID || entityTypeID == 0)
                             .OrderByDescending(t => t.DocumentationBusinessType.Documentation.EntityType.EntityTypeID)
                             .OrderByDescending(t => t.DocumentationBusinessType.Documentation.DocumentationCode).ToListAsync();

                timespan.Stop();
                log.TraceApi("SQL Database", "RequirementRepository.FindRequirementsByContractAsync", timespan.Elapsed);

                return(result);
            }
            catch (Exception e)
            {
                log.Error(e, "Error in RequirementRepository.FindRequirementsByContractAsync()");
                throw;
            }
        }
Beispiel #27
0
 public static UITableViewCell GetCell(this Requirement requirement,UITableView tableview, RequirementStatus status)
 {
     return new UITableViewCell(UITableViewCellStyle.Default,"requirement");
 }
        void OnGUI()
        {
            var windowRect = new Rect(Vector2.zero, position.size);

            var topRect = new Rect(0, 0, windowRect.size.x, topRectHeight);

            GUILayout.BeginArea(topRect);
            {
                GUILayout.Label("Requirements Manager", Data.nameStyle);
                GUILayout.BeginHorizontal();
                {
                    GUILayout.Label("Your name", Data.miniHeaderStyle);
                    LocalData.localName = GUILayout.TextField(LocalData.localName);
                }
                GUILayout.EndHorizontal();

                GUILayout.Space(6);
                GUILayout.Box(GUIContent.none, "ProfilerDetailViewBackground");
                GUILayout.Space(-12);

                GUILayout.BeginHorizontal();
                {
                    filterFoldout = EditorGUILayout.Foldout(filterFoldout, "Filters", true, Data.foldoutStyle);
                    EditorGUI.BeginChangeCheck();

                    if (ifFilterLocalPath)
                    {
                        GUI.color = Data.filterLocalColor;
                        GUILayout.Label(filterPath, Data.filterPathStyle);
                    }
                    else
                    {
                        GUILayout.FlexibleSpace();
                    }

                    if (GUILayout.Button(GUIContent.none, ifFilterLocalPath ? Data.filterLocalStyle : Data.filterWorldStyle))
                    {
                        ifFilterLocalPath = !ifFilterLocalPath;
                        RefreshList();
                    }
                    GUI.color = Color.white;

                    if (GUILayout.Button("Reset", Data.miniButtonSytle))
                    {
                        ifFilterLocalPath    = false;
                        filterKeyword        = "";
                        filterPersonIndex    = 0;
                        filterStatus         = 0;
                        filterPriority       = 0;
                        filterExtensionIndex = 0;
                    }
                    GUILayout.Space(3);
                }
                GUILayout.EndHorizontal();
                if (filterFoldout)
                {
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Space(Data.indentWidth);
                        GUILayout.Label("Keyword", GUILayout.ExpandWidth(false));
                        filterKeyword = GUILayout.TextField(filterKeyword, GUILayout.ExpandWidth(true));
                        GUILayout.Label("Person", GUILayout.ExpandWidth(false));
                        filterPersonIndex = EditorGUILayout.Popup(filterPersonIndex, filterPersons.ToArray(), GUILayout.MaxWidth(Data.filterOptionWidth));
                    }
                    GUILayout.EndHorizontal();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Space(Data.indentWidth);
                        GUILayout.Label("Status", GUILayout.ExpandWidth(false));
                        filterStatus = (RequirementStatus)EditorGUILayout.EnumFlagsField((RequirementStatusFilter)filterStatus, GUILayout.MaxWidth(Data.filterOptionWidth));
                        GUILayout.FlexibleSpace();
                        GUILayout.Label("Priority", GUILayout.ExpandWidth(false));
                        filterPriority = (RequirementPriority)EditorGUILayout.EnumFlagsField((RequirementPriorityFilter)filterPriority, GUILayout.MaxWidth(Data.filterOptionWidth));
                        GUILayout.FlexibleSpace();
                        GUILayout.Label("Format", GUILayout.ExpandWidth(false));
                        filterExtensionIndex = EditorGUILayout.Popup(filterExtensionIndex, filterExtensions.ToArray(), GUILayout.MaxWidth(Data.filterOptionWidth));
                    }
                    GUILayout.EndHorizontal();

                    if (EditorGUI.EndChangeCheck())
                    {
                        RefreshList();
                    }
                }

                GUILayout.Space(4);
                GUILayout.Box(GUIContent.none, "ProfilerDetailViewBackground");
                GUILayout.Space(-12);
                sorterFoldout = EditorGUILayout.Foldout(sorterFoldout, "Sorters", true, Data.foldoutStyle);
                if (sorterFoldout)
                {
                    EditorGUI.BeginChangeCheck();
                    GUILayout.BeginHorizontal();
                    {
                        GUILayout.Space(Data.indentWidth);
                        SorterField("Status", ref sorterStatusInverted, sorterStatus);
                        SorterField("Priority", ref sorterPriorityInverted, sorterPriority);
                        SorterField("Name", ref sorterNameInverted, sorterName);
                        SorterField("Path", ref sorterPathInverted, sorterPath);
                    }
                    GUILayout.EndHorizontal();
                    if (EditorGUI.EndChangeCheck())
                    {
                        RefreshList();
                    }
                }
            }
            GUILayout.EndArea();


            var scrollRect = new Rect(0, topRectHeight, windowRect.size.x, windowRect.size.y - topRectHeight);
            var viewHeight = reqList.Count * (Data.reqRectMargin.y + Data.reqLabelHeight);
            var viewRect   = new Rect(0, 0, scrollRect.width - (scrollRect.height > viewHeight ? 0 : 13), viewHeight);

            GUI.Box(new Rect(scrollRect.x, scrollRect.y, viewRect.width, scrollRect.height), GUIContent.none, "window");
            scrollPos = GUI.BeginScrollView(scrollRect, scrollPos, viewRect);
            {
                var reqRect = new Rect(Data.reqRectMargin, new Vector2(viewRect.width - Data.reqRectMargin.x * 2, Data.reqLabelHeight));
                foreach (var req in reqList)
                {
                    RequirementField(reqRect, req);
                    reqRect.y += Data.reqRectMargin.y + Data.reqLabelHeight;
                }
            }
            GUI.EndScrollView();
        }
Beispiel #29
0
        private async void ComboBoxRequirementStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            filteredStatus = (RequirementStatus)(ComboBoxRequirementStatus.SelectedItem);

            await DoSearch();
        }