Exemple #1
0
        public async Task <bool> GenQRAsync1(IEnumerable <ReceiptWares> pW)
        {
            bool res = true;

            if (!Global.IsGenQrCoffe)
            {
                return(res);
            }

            int Number = 0;

            foreach (var el in pW.Where(r => r.PLU > 0))
            {
                StringBuilder QRs = new StringBuilder();
                for (int i = 0; i < el.Quantity; i++)
                {
                    var QR = await ds.GetQrCoffe(el, Number ++);

                    QRs.Append((QRs.Length > 0 ? "," : "") + QR);
                }
                el.QR = QRs.ToString();
                res  &= db.UpdateQR(el);
            }
            return(res);
        }