예제 #1
0
        //public CashContext(CashSuper csuper)
        public CashContext(string type)
        {
            //this.cs = csuper;
            switch (type)
            {
            case "正常收费":
                cs = new CashNormal();
                break;

            case "满300百送100":
                cs = new CashReturn("300", "100");
                break;

            case "打8折":
                cs = new CashRebate("0.8");
                break;
            }
        }
예제 #2
0
파일: CashFactory.cs 프로젝트: dym0080/DHMS
        public static CashSuper createCashAccept(string type)
        {
            CashSuper cs = null;

            switch (type)
            {
            case "正常收费":
                cs = new CashNormal();
                break;

            case "满300百送100":
                cs = new CashReturn("300", "100");
                break;

            case "打8折":
                cs = new CashRebate("0.8");
                break;
            }
            return(cs);
        }