Exemple #1
0
        public IHttpActionResult GetSupplierById(int supid)
        {
            string        error = "";
            SupplierModel sm    = SupplierRepo.GetSupplierById(supid, out error);

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