Exemple #1
0
        public IHttpActionResult GetSupplierByStatus(int status)
        {
            string error             = "";
            List <SupplierModel> sms = SupplierRepo.GetSupplierByStatus(status, out error);

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