public IHttpActionResult GetSupplierItemBySupid(int supid)
        {
            string error = "";
            List <SupplierItemModel> sims = SupplierItemRepo
                                            .GetItemsBySupplier(supid, out error);

            if (error != "" || sims == null)
            {
                return(Content(HttpStatusCode.BadRequest, error));
            }
            return(Ok(sims));
        }
Esempio n. 2
0
        public IHttpActionResult GetItemsBySupplierId(int supid)
        {
            string error = "";
            List <SupplierItemModel> ims = SupplierItemRepo.GetItemsBySupplier(supid, out error);

            if (error != "" || ims == null)
            {
                if (error == ConError.Status.NOTFOUND)
                {
                    return(Content(HttpStatusCode.NotFound, "Items Not Found"));
                }
                return(Content(HttpStatusCode.BadRequest, error));
            }
            return(Ok(ims));
        }