Пример #1
0
        public static string GetPrtStrKit(List <TAOrderItemInfo> lstOI, Hashtable ht)
        {
            StringBuilder sb = new StringBuilder();
            string        L  = PrtCommon.GetSplit();
            string        L1 = (string)ht["ChkNum"];

            //账单号
            sb.Append(PrtCommon.GetSpace((PrtStatic.PRT_LINE_SIZE_20 - L1.Length) / 2) + L1);
            sb.Append(Environment.NewLine);

            //分隔行
            sb.Append(L);
            sb.Append(Environment.NewLine);

            sb.Append("Code" + PrtCommon.GetSpace(2) + "Qty" + PrtCommon.GetSpace(2) + "Name" + PrtCommon.GetSpace(24));
            sb.Append(Environment.NewLine);

            //分隔行
            sb.Append(L);
            sb.Append(Environment.NewLine);

            PRT_BILL_SHUANGYU_ROW_COUNT = lstOI.Count * 2;

            foreach (var taOrderItemInfo in lstOI)
            {
                sb.Append(GetTab(taOrderItemInfo.ItemCode, taOrderItemInfo.ItemQty, taOrderItemInfo.ItemDishName));
                sb.Append(Environment.NewLine);
                var CNameList = CommonData.TaMenuItemList.Where(s => s.DishCode.Equals(taOrderItemInfo.ItemCode));
                if (CNameList.Any())
                {
                    sb.Append(PrtCommon.GetHanZiTabKitchen(CNameList.FirstOrDefault().OtherName));
                    sb.Append(Environment.NewLine);
                }
            }

            sb.Append(L);
            sb.Append(Environment.NewLine);

            return(sb.ToString());
        }