public IHttpActionResult DeleteSale(string ord_num) { IRepository <sales> sale_repo = Repos.get_sales_repo(); if ((sale_repo as SalesRepositoryDB).removeSalesOrder(ord_num)) { return(StatusCode(HttpStatusCode.OK)); } return(StatusCode(HttpStatusCode.NotModified)); }
public IHttpActionResult AddSales(sales addedSales) { IRepository <sales> sale_repo = Repos.get_sales_repo(); if (sale_repo.Add(addedSales)) { return(StatusCode(HttpStatusCode.Created)); } return(StatusCode(HttpStatusCode.NotModified)); }