public List <PSTransaction> GetPSTransactions(int TILL_NUM, int SALE_NO, int PastDays)
        {
            List <PSTransaction> olist = new List <PSTransaction>();

            try
            {
                var sale = CacheManager.GetCurrentSaleForTill(TILL_NUM, SALE_NO);
                if (sale != null)
                {
                    olist = (from c in sale.Sale_Lines
                             where !string.IsNullOrEmpty(c.Serial_No)
                             select new PSTransaction()
                    {
                        TransactionID = c.Serial_No,
                        SALE_DATE = string.Format("{0:MM-dd-yyyy}", DateTime.Now),
                        STOCK_CODE = c.Stock_Code,
                        DESCRIPT = c.Description,
                        Amount = string.Format("{0:0.00}", c.Amount)
                    }).ToList();
                }
                List <PSTransaction> olist1 = _PaymentSourceService.GetPSTransactions(PastDays);
                olist = olist.Union(olist1).ToList();
            }
            catch (Exception ex)
            {
                Performancelog.Error("PaymentSourceManager.GetCurTransactions(): " + ex.Message);
            }
            return(olist);
        }
        public bool SavePSTransactionID(int TILL_NUM, int SALE_NO, int LINE_NUM, string TransID)
        {
            bool bSaved = false;

            try
            {
                Sale sale = CacheManager.GetCurrentSaleForTill(TILL_NUM, SALE_NO);
                sale.Sale_Lines[LINE_NUM].Serial_No = TransID;
                //Update current sale
                CacheManager.AddCurrentSaleForTill(TILL_NUM, SALE_NO, sale);
                //Get crrent sale after updating
                //sale = CacheManager.GetCurrentSaleForTill(TILL_NUM, SALE_NO);
                bSaved = true;
            }
            catch (Exception ex)
            {
                Performancelog.Error("PaymentSourceManager.SavePSTransactionID(): " + ex.Message);
            }

            return(bSaved);
        }