/// <summary> /// 根据存款类型创建存款用户 /// </summary> /// <param name="accountType">存款类型</param> /// <returns></returns> public static Custom CreateCustom(string accountType) { Custom custom = null; switch (accountType) { //定期1年, //定期3年, //定期5年, //活期, //零存整取1年, //零存整取3年, //零存整取5年 case "活期存款": custom = new CustomChecking(); break; case "定期1年": custom = new CustomFixed(); break; case "定期3年": custom = new CustomFixed3(); break; case "定期5年": custom = new CustomFixed5(); break; case "零存整取1年": custom = new CustomFixedL(); break; case "零存整取3年": custom = new CustomFixedL3(); break; case "零存整取5年": custom = new CustomFixedl5(); break; } custom.AccountInfo.accountType = accountType; return(custom); }
/// <summary> /// 根据存款类型创建存款用户 /// </summary> /// <param name="accountType">存款类型</param> /// <returns></returns> public static Custom CreateCustom(string accountType) { Custom custom = null; switch (accountType) { case "活期存款": custom = new CustomChecking(); break; case "定期存款": custom = new CustomFixed(); break; case "零存整取": break; } custom.AccountInfo.accountType = accountType; return(custom); }