public ResponseFPtplGet FPtplGet(RequestFPtplGet request) { ResponseFPtplGet response = new ResponseFPtplGet(); using (cnn = GetConnection()) { try { var data = cnn.QuerySingle <TKS_FAS_Invoice2TPLExt>( @"select A.*,B.title from TKS_FAS_Invoice2TPL A left join TKS_FAS_DocTPL B on A.tplId=B.id where A.id=@Id", new { Id = request.Data.Id }); response.IsSuccess = true; response.Message = "加载完毕"; response.Data = data; return(response); } catch (Exception ex) { return(this.DealException(response, ex) as ResponseFPtplGet); } } }
public ResponseFPtplGet FPtplGet([FromBody] RequestFPtplGet request) { try { FPtplBLL bll = new FPtplBLL(); return(bll.FPtplGet(request)); } catch (Exception ex) { throw new HttpResponseException( Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }