Esempio n. 1
0
 public static string FormatTickForDeal(string message, Site site, DealLog deallog, Account account, Shop shop, PosEndPoint pos, User @operator)
 {
     message = MessageFormator.Format(message, site);
     message = MessageFormator.Format(message, account);
     message = MessageFormator.Format(message, deallog);
     message = MessageFormator.Format(message, shop);
     message = MessageFormator.Format(message, pos);
     message = MessageFormator.FormatForOperator(message, @operator);
     return(message);
 }
Esempio n. 2
0
        public static string Format(string template, DealLog dealItem)
        {
            var typeText = "消费";

            //if (dealItem.DealType == DealTypes.Deal)
            //    typeText = "消费";
            //if (dealItem.DealType == DealTypes.CancelDeal)
            //    typeText = "撤消消费";

            return(template.Replace("#amount#", dealItem.Amount.ToString())
                   .Replace("#point#", dealItem.Point.ToString())
                   .Replace("#serial-server-no#", dealItem.SerialServerNo)
                   .Replace("#type#", typeText)
                   .Replace("#shop-name#", dealItem.ShopDisplayName)
                   .Replace("#serial-no#", dealItem.SerialNo)
                   .Replace("#now#", DateTime.Now.ToString("yyyy年MM月dd日 HH时mm分ss秒")));
        }
Esempio n. 3
0
 public static string FormatTickForRecharging(string message, Site site, bool hasReceipt, decimal amount, string howToDeal, DealLog deal, Account account, AccountType accountType, AccountUser owner, User @operator)
 {
     message = MessageFormator.Format(message, account);
     message = MessageFormator.Format(message, amount);
     //message = MessageFormator.Format(message, owner);
     //message = MessageFormator.Format(message, site);
     //message = hasReceipt ? message.Replace("#is-recharged#", "发票已开据") : message.Replace("#is-recharged#", "");
     //message = MessageFormator.FormatForOperator(message, @operator);
     message = MessageFormator.Format(message, owner);
     //message = MessageFormator.Format(message, accountType);
     message = MessageFormator.Format(message, deal);
     //message = MessageFormator.FormatHowToDeal(message, howToDeal);
     return(message);
 }