public NewReversalReAllocationViewModel(NewDishonourReversalViewModel viewModel, int reallocationReceiptID)
            : base(ReceiptBatchType.Reversals, viewModel.ReceiptBatchID, viewModel.BatchStatus)
        {
            Receipt = viewModel.Receipt;
            ClientName = viewModel.ClientName;
            ReAllocationReceiptID = reallocationReceiptID;
            ApplyToObjectID = viewModel.ApplyToObjectID;
            IconFileName = viewModel.IconFileName;
            OpenItems = viewModel.OpenItems;            

            if (viewModel.ReturnValue != null)
            {
                ReAllocateTo = viewModel.ReturnValue.Item1;
                ReAllocateToObjectID = viewModel.ReturnValue.Item2;
                Reference = viewModel.ReturnValue.Item3;
            }

            ReAllocateReceiptToList = new List<string>();

            foreach (string option in Enum.GetNames(typeof(ReAllocateReceiptTo)))
            {
                ReAllocateReceiptToList.Add(Regex.Replace(option, "([a-z])([A-Z])", "$1 $2"));
            }

            ReAllocationSearch = new DelegateCommand(OnReAllocationSearch);
            ReAllocateOK = new DelegateCommand(OnReAllocateOK);
            SetIcon();
        }
 public ReversalReceiptReallocation(NewDishonourReversalViewModel viewModel, int reallocationReceiptID)
 {
     InitializeComponent();
     NewReversalReAllocationViewModel = new NewReversalReAllocationViewModel(viewModel, reallocationReceiptID);
 }