public PSRefund GetPSRefund(int TILL_NUM, int SALE_NO, string TransactionID) { var dateStart = DateTime.Now; Performancelog.Debug($"Start,PaymentSourceManager,GetPSRefund,{string.Empty},{DateTime.Now:hh.mm.ss.ffffff}"); PSRefund psr; Sale sale = CacheManager.GetCurrentSaleForTill(TILL_NUM, SALE_NO); if (sale != null) { foreach (Sale_Line sl in sale.Sale_Lines) { if (sl.Serial_No == TransactionID) { psr = new PSRefund(); psr.UpcNumber = sl.Stock_Code; psr.Amount = string.Format("{0:0.00}", sl.Amount); psr.Name = sl.Description; return(psr); } } } psr = _PaymentSourceService.GetPSRefund(TransactionID); Performancelog.Debug($"End,PaymentSourceManager,GetPSRefund,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}"); return(psr); }
public HttpResponseMessage GetRefundInfo(string TransID, int SALE_NO, int TILL_NUM) { var dateStart = DateTime.Now; _performancelog.Debug($"Start,PaymentSourceController,GetRefundInfo,{string.Empty},{DateTime.Now:hh.mm.ss.ffffff}"); PSRefund psr = _PaymentSourceManager.GetPSRefund(TILL_NUM, SALE_NO, TransID); _performancelog.Debug($"End,PaymentSourceController,GetRefundInfo,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}"); return(Request.CreateResponse(HttpStatusCode.OK, psr)); }
public PSRefund GetPSRefund(string TransactionID) { PSRefund psr = null; try { string sSQL = "select * from [dbo].[SALELINE] " + "where SERIAL_NO='" + TransactionID + "'"; var dt = GetRecords(sSQL, DataSource.CSCTills); if (dt.Rows.Count > 0) { psr = new PSRefund(); psr.Amount = string.Format("{0:0.00}", dt.Rows[0]["Amount"]); psr.Name = dt.Rows[0]["DESCRIPT"].ToString(); psr.UpcNumber = dt.Rows[0]["STOCK_CODE"].ToString(); } } catch (Exception ex) { _performancelog.Error("PaymentSourceService.GetPSRefund(): " + ex.Message); } return(psr); }