public HttpResponseMessage CurrencyRate() { try { var data = new SaleBL().GetLatestCurrencyRate(); return(Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { LogManager.Instance.Error(ex); return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }
public HttpResponseMessage GetSales(string query) { try { var cmd = JsonConvert.DeserializeObject <SaleCommand>(query); int pagesCount = 0; var data = new SaleBL().GetSales(cmd, ref pagesCount); var result = Request.CreateResponse(HttpStatusCode.OK, data); result.Headers.Add(Consts.PAGES_COUNT, pagesCount.ToString()); return(result); } catch (Exception ex) { LogManager.Instance.Error(ex); return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }
public SaleWCF() { SalBL = new SaleBL(); }