public ResponseBBDetailtplGet BBDetailtplGet(RequestBBDetailtplGet request) { ResponseBBDetailtplGet response = new ResponseBBDetailtplGet(); using (cnn = GetConnection()) { var ts = cnn.BeginTransaction(); try { var user = UserInfoGetButAccount(request.Token, ts); var data = cnn.QuerySingle <TKS_FAS_ReportDetailTPL>("select * from TKS_FAS_ReportDetailTPL where id=@Id", new { Id = request.Data.Id }, ts); ts.Commit(); response.IsSuccess = true; response.Message = "加载完毕"; response.Data = data; return(response); } catch (Exception ex) { ts.Rollback(); return(this.DealException(response, ex) as ResponseBBDetailtplGet); } } }
public ResponseBBDetailtplGet BBDetailtplGet([FromBody] RequestBBDetailtplGet request) { try { ReportTplBLL bll = new ReportTplBLL(); return(bll.BBDetailtplGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }