private static GridRowContent BuildGridRowContent(ITransferBundle bundle, ITransferBundleSettings bundleSettings)
        {
            var gridRowContent = new GridRowContent(bundle.Id.ToString(), bundle);

            switch (bundle.State)
            {
            case TransferBundleState.Registered:
                gridRowContent.BackColor          = Color.White;
                gridRowContent.SelectionBackColor = bundleSettings.SelectionColor;
                break;

            case TransferBundleState.Pended:
                gridRowContent.BackColor          = bundleSettings.PendedColor;
                gridRowContent.SelectionBackColor = ColorUtility.CalculateSelectionColor(bundleSettings.PendedColor);
                break;

            case TransferBundleState.Processed:
                gridRowContent.BackColor          = bundleSettings.ProcessedColor;
                gridRowContent.SelectionBackColor = ColorUtility.CalculateSelectionColor(bundleSettings.ProcessedColor);
                break;

            case TransferBundleState.Completed:
                gridRowContent.BackColor          = bundleSettings.CompletedColor;
                gridRowContent.SelectionBackColor = ColorUtility.CalculateSelectionColor(bundleSettings.CompletedColor);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(gridRowContent);
        }
        public static TransferBundleSettings Create(ITransferBundleSettings contractObject)
        {
            if (null == contractObject)
            {
                return(null);
            }

            if (contractObject is TransferBundleSettings businessObject)
            {
                return(businessObject);
            }

            return(Mapper.Map <TransferBundleSettings>(contractObject));
        }