Beispiel #1
0
        public ResponseFPFJGet FPFJGet(RequestFPFJGet request)
        {
            ResponseFPFJGet response = new ResponseFPFJGet();

            using (cnn = GetConnection())
            {
                var ts = cnn.BeginTransaction();

                try
                {
                    var user = UserInfoGet(request.Token, ts);
                    var data = cnn.QuerySingle <TKS_FAS_InvoiceAttach>("select * from TKS_FAS_InvoiceAttach 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 ResponseFPFJGet);
                }
            }
        }
Beispiel #2
0
 public ResponseFPFJGet FPFJGet([FromBody] RequestFPFJGet request)
 {
     try
     {
         FPFJBLL bll = new FPFJBLL();
         return(bll.FPFJGet(request));
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(
                   Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }