Exemplo n.º 1
0
        public ExportTemplate2 GetBankExportTemplate2(DeductCommand deductcommand)
        {
            switch (deductcommand.ExportCmdType.ValueToEnum <EnumExportCmdKind>())
            {
            case EnumExportCmdKind.TemplateFive:
                return(new BankExportFive());

            case EnumExportCmdKind.TemplateSix:
                return(new BankExportSix());

            case EnumExportCmdKind.TemplateEight:
                return(new BankExportEight());

            default:
                return(null);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 通过模版配置,获取模版的格式处理方式
        /// </summary>
        /// <param name="deductcommand"></param>
        /// <returns></returns>
        public ExportTemplate GetBankExportTemplate(DeductCommand deductcommand)
        {
            switch (deductcommand.ExportCmdType.ValueToEnum <EnumExportCmdKind>())
            {
            case EnumExportCmdKind.TemplateOne:
                return(new BankExportOne());

            case EnumExportCmdKind.TemplateTwo:
                return(new BankExportTwo());

            case EnumExportCmdKind.TemplateThree:
                return(new BankExportThree());

            case EnumExportCmdKind.TemplateFour:
                return(new BankExportFour());

            case EnumExportCmdKind.TemplateSeven:
                return(new BankExportSeven());

            default:
                return(null);
            }
        }
Exemplo n.º 3
0
 public ImportTemplate(DeductCommand deductcommand)
 {
     this._DeductCommand = deductcommand;
 }
        public string DispatchCommand(string[] commandParameters)
        {
            string commandName = commandParameters[0];

            commandParameters = commandParameters.Skip(1).ToArray();
            string          result          = string.Empty;
            SavingService   savingService   = new SavingService();
            CheckingService checkingService = new CheckingService();
            UserService     userService     = new UserService();


            switch (commandName)
            {
            case "Exit":
                ExitCommand exit = new ExitCommand();
                result = exit.Execute();
                break;

            case "Deposit":
                DepositCommand deposit = new DepositCommand(savingService);
                result = deposit.Execute(commandParameters);
                break;

            case "Withdraw":
                WithdrawCommand withdeow = new WithdrawCommand(savingService);
                result = withdeow.Execute(commandParameters);
                break;

            case "AddInterest":
                AddInterestCommand addInterest = new AddInterestCommand(savingService);
                result = addInterest.Execute(commandParameters);
                break;

            case "DeductFee":
                DeductCommand deduct = new DeductCommand(checkingService);
                result = deduct.Execute(commandParameters);
                break;

            case "Register":
                RegisterCommand register = new RegisterCommand(userService);
                result = register.Execute(commandParameters);
                break;

            case "Login":
                LoginCommand login = new LoginCommand();
                result = login.Execute(commandParameters);
                break;

            case "Logout":
                Logout logout = new Logout();
                result = logout.Execute();
                break;

            case "AddSavingAccount":
                AddSavingAccountCommand addAccount = new AddSavingAccountCommand(savingService);
                result = addAccount.Execute(commandParameters);
                break;

            case "ListAccounts":
                ListAccounts listAccounts = new ListAccounts(savingService, checkingService);
                result = listAccounts.Execute();
                break;
            }
            return(result);
        }
Exemplo n.º 5
0
 public BankImportTwo(DeductCommand deductcommand)
     : base(deductcommand)
 {
 }
Exemplo n.º 6
0
 public BankImportFive(DeductCommand deductcommande)
     : base(deductcommande)
 {
 }
Exemplo n.º 7
0
 public BankImportFour(DeductCommand deductcommand)
     : base(deductcommand)
 {
 }