Exemplo n.º 1
0
 public void Raise(ImagesSelectedEventArgs e)
 {
     CurrentSelected = e.Selected;
     if (OnInboundDocSelected != null)
     {
         OnInboundDocSelected(e);
     }
 }
Exemplo n.º 2
0
        private void PersistDocumentSplit(InboundDocsView current, DocumentSplitResult splitResult, ImagesDto originalDocDto)
        {            
            using (var ts = new TransactionScope())
            {                                
                string guidFileName = GenerateCopyFileName(current, "_split_");
                var newInboundDocDto = DtoViewConverter.CreateInboundDocsDto(current,guidFileName);
                newInboundDocDto.Id = inboundDocsDal.Insert(newInboundDocDto);
                Logger.DebugFormat("Persisted document split, new document Id = {0}", newInboundDocDto.Id);

                var splitImage = splitResult.SplitPages.GetImageBytes();
                imagesDal.Insert(
                    new ImagesDto(
                        newInboundDocDto.Id,
                        splitImage,
                        originalDocDto.MarkupImageFileExt,
                        splitImage,
                        originalDocDto.MarkupImageFileExt,
                        originalDocDto.Type)
                );

                originalDocDto.MarkupImage = splitResult.Remainder.GetImageBytes();
                imagesDal.Update(originalDocDto);
                var newInboundDocView = DtoViewConverter.CreateInboundDocsView(newInboundDocDto);
                ApplyNewInboundDocToView(newInboundDocView);
                ts.Complete();                                
            }           
        }
Exemplo n.º 3
0
        private void PersistDocumentMerge(List<InboundDocsView> selectedViews, ImagesDto[] imagesDto, TifImage mergedImage)
        {
            using (var ts = new TransactionScope())
            {
                var mergedBytes = mergedImage.GetImageBytes();

                imagesDto[0].MarkupImage = mergedBytes;
                imagesDal.Update(imagesDto[0]);
                var viewToDiscard = selectedViews[1];
                inboundDocsDal.UpdateStatus((int)viewToDiscard.Id, InboundDoc.DISCARDED);
                viewToDiscard.DocStatusCode = InboundDoc.DISCARDED;
                ApplyMergeResultsToView(viewToDiscard);
                ts.Complete();
            }           
        }
 public ImagesSelectedEventArgs(ImagesDto selected, bool canEditImage = true)
 {
     Selected = selected;
     CanEditImage = canEditImage;
 }