예제 #1
0
        public ResponseFJDelete FJDelete(RequestFJDelete request)
        {
            ResponseFJDelete response = new ResponseFJDelete();

            using (cnn = GetConnection())
            {
                var ts = cnn.BeginTransaction();
                try
                {
                    string sql = @" delete from TKS_FAS_Attachment where id=@Id";

                    cnn.Execute(sql, request.Data, ts);


                    ts.Commit();
                    response.IsSuccess = true;
                    response.Message   = "删除成功";
                    return(response);
                }
                catch (Exception ex)
                {
                    ts.Rollback();
                    return(this.DealException(response, ex) as ResponseFJDelete);
                }
            }
        }
예제 #2
0
 public ResponseFJDelete FJDelete([FromBody] RequestFJDelete request)
 {
     try
     {
         FJBLL bll = new FJBLL();
         return(bll.FJDelete(request));
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(
                   Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }