Ejemplo n.º 1
0
        public bool RemoveSecurityInfo(BaseBatchModel <T> model)
        {
            var itemList = new ItemList <string>();

            itemList.AddRange((model.FolderIds ?? new List <T>()).Select(x => "folder_" + x));
            itemList.AddRange((model.FileIds ?? new List <T>()).Select(x => "file_" + x));

            FileStorageService.RemoveAce(itemList);

            return(true);
        }
        public static BaseBatchModel ToBaseBatch(this Batch batch)
        {
            BaseBatchModel _result = new BaseBatchModel();

            _result.Id                = batch.Id;
            _result.ProductId         = batch.ProductId;
            _result.BatchNumber       = batch.BatchNumber;
            _result.Barcode           = batch.Barcode;
            _result.PartNumber        = batch.PartNumber;
            _result.ManufacturingDate = batch.ManufacturingDate;
            _result.ExpiryDate        = batch.ExpiryDate;
            _result.Narration         = batch.Narration;
            _result.CreatedDate       = batch.CreatedDate;
            _result.ModifiedDate      = batch.ModifiedDate;
            return(_result);
        }
        public static Batch ToBatch(this BaseBatchModel batch)
        {
            Batch _result = new Batch();

            if (batch.Id.HasValue)
            {
                _result.Id = batch.Id.GetValueOrDefault();
            }
            _result.ProductId         = batch.ProductId;
            _result.BatchNumber       = batch.BatchNumber;
            _result.Barcode           = batch.Barcode;
            _result.PartNumber        = batch.PartNumber;
            _result.ManufacturingDate = batch.ManufacturingDate;
            _result.ExpiryDate        = batch.ExpiryDate;
            _result.Narration         = batch.Narration;
            _result.CreatedDate       = batch.CreatedDate;
            _result.ModifiedDate      = batch.ModifiedDate;
            return(_result);
        }
Ejemplo n.º 4
0
 public IEnumerable <FileOperationWraper> MarkAsRead(BaseBatchModel model)
 {
     return(FileStorageService.MarkAsRead(model.FolderIds.ToList(), model.FileIds.ToList()).Select(FileOperationWraperHelper.Get).ToList());
 }
Ejemplo n.º 5
0
 public IEnumerable <FileOperationWraper> MarkAsRead(BaseBatchModel <JsonElement> model)
 {
     return(FileStorageService.MarkAsRead(model.FolderIds, model.FileIds).Select(FileOperationWraperHelper.Get));
 }