public PSVoucherInfo GetPSVoucherInfo(string ProdName) { var dateStart = DateTime.Now; Performancelog.Debug($"Start,PaymentSourceManager,GetPSVoucherInfo,{string.Empty},{DateTime.Now:hh.mm.ss.ffffff}"); PSVoucher psvc = _PaymentSourceService.GetPSVoucherInfo(ProdName); if (psvc == null) { return(null); } PSVoucherInfo psvcinfo = new PSVoucherInfo(); psvcinfo.Voucher = psvc; psvcinfo.Logos = _PaymentSourceService.GetPSLogos(ProdName); Performancelog.Debug($"End,PaymentSourceManager,GetPSVoucherInfo,{DateTime.Now.Subtract(dateStart).TotalMilliseconds},{DateTime.Now:hh.mm.ss.ffffff}"); return(psvcinfo); }
public PSVoucher GetPSVoucherInfo(string ProdName) { PSVoucher psvc = null; try { var dt = GetRecords("select * from [dbo].[PSVouchers] where ProdName='" + ProdName + "'", DataSource.CSCMaster); if (dt.Rows.Count == 0) { return(psvc); } psvc = new PSVoucher(); psvc.ProdName = dt.Rows[0]["ProdName"].ToString(); psvc.Voucher = dt.Rows[0]["Voucher"].ToString(); psvc.Lines = (int)dt.Rows[0]["Lines"]; } catch (Exception ex) { _performancelog.Error("PaymentSourceService.GetPSVoucherInfo(): " + ex.Message); } return(psvc); }