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); } }
/// <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); } }
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); }
public BankImportTwo(DeductCommand deductcommand) : base(deductcommand) { }
public BankImportFive(DeductCommand deductcommande) : base(deductcommande) { }
public BankImportFour(DeductCommand deductcommand) : base(deductcommand) { }