public ResponseSupplierGet SupplierGet([FromBody] RequestSupplierGet request) { try { SupplierBLL bll = new SupplierBLL(); return(bll.SupplierGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }
public ResponseSupplierGet SupplierGet(RequestSupplierGet request) { ResponseSupplierGet response = new ResponseSupplierGet(); using (cnn = GetConnection()) { try { var data = cnn.QuerySingle <TKS_FAS_Supplier>("select * from tks_fas_Supplier where id=@Id", new { Id = request.Id }); response.IsSuccess = true; response.Message = "加载完毕"; response.Data = data; return(response); } catch (Exception ex) { return(this.DealException(response, ex) as ResponseSupplierGet); } } }