Exemple #1
0
        private static CheckView create(Check check)
        {
            var view = new CheckView {
                AccountName   = check?.Data?.Name,
                AccountNumber = check?.Data?.Number,
                BankAddress   = check?.Data?.Address,
                BankID        = check?.Data?.Issue,
                BankName      = check?.Data?.Organization,
                Payee         = check?.Data?.Payee,
                CheckNumber   = check?.Data?.Code,
                ID            = check?.Data?.ID,
                ValidFrom     = check?.Data?.ValidFrom,
                ValidTo       = check?.Data?.ValidTo
            };

            return(view);
        }
Exemple #2
0
        public static Check Create(CheckView view)
        {
            var check = new CheckData
            {
                Name         = view?.AccountName,
                Number       = view?.AccountNumber,
                Address      = view?.BankAddress,
                Issue        = view?.BankID,
                Organization = view?.BankName,
                Payee        = view?.Payee,
                Code         = view?.CheckNumber,
                ID           = view?.ID,
                ValidFrom    = view?.ValidFrom ?? DateTime.MinValue,
                ValidTo      = view?.ValidTo ?? DateTime.MaxValue
            };

            return(new Check(check));
        }