private FeiEReturnMessage Print凉菜房(VM_Order order, List <VM_DetailOrder> 凉菜房) { if (凉菜房.Count() == 0) { return(new FeiEReturnMessage() { ret = 99, msg = "没有凉菜房的菜品!" }); } string orderInfo2 = ""; orderInfo2 = $"<CB>{order.PositionName}</CB><BR>"; orderInfo2 = $"<BOLD>凉菜房</BOLD>"; orderInfo2 += "名称 单价 数量 金额<BR>"; orderInfo2 += "--------------------------------<BR>"; foreach (var detail in 凉菜房) { orderInfo2 += $"{detail.MenuName.PadRight(12 - detail.MenuName.Length)} {detail.SinglePrice.ToString().PadRight(5)} {detail.Weight.ToString().PadRight(3)} {detail.ShouldPrice.ToString().PadLeft(6)}<BR>"; } for (int i = 0; i < 3; i++) { orderInfo2 += "<BR>"; } orderInfo2 += "--------------------------------<BR>"; orderInfo2 += $"备注:{order.Note}<BR>"; orderInfo2 += $"订餐时间:{order.CreateTime}<BR>"; orderInfo2 += "--------------------------------<BR>"; return(Print(orderInfo2)); }
private FeiEReturnMessage Print总台(VM_Order order, List <VM_DetailOrder> 总台) { if (总台.Count() == 0) { throw new Exception("没有点任何菜品,无法打印!"); } //打印总单 string orderInfo = ""; orderInfo = $"<CB>{order.PositionName}</CB><BR>"; orderInfo = $"<BOLD>总台 留</BOLD>"; orderInfo += "名称 单价 数量 金额<BR>"; orderInfo += "--------------------------------<BR>"; foreach (var detail in 总台) { orderInfo += $"{detail.MenuName.PadRight(12 - detail.MenuName.Length)} {detail.SinglePrice.ToString().PadRight(5)} {detail.Weight.ToString().PadRight(3)} {detail.ShouldPrice.ToString().PadLeft(6)}<BR>"; } for (int i = 0; i < 6; i++) { orderInfo += "<BR>"; } orderInfo += "--------------------------------<BR>"; orderInfo += $"合计:¥{order.ShouldPrice}元<BR>"; orderInfo += $"备注:{order.Note}<BR>"; orderInfo += $"订餐时间:{order.CreateTime}<BR>"; orderInfo += "--------------------------------<BR>"; return(Print(orderInfo)); }