Example #1
0
        public ResponsePZZDelete PZZDelete(RequestPZZDelete request)
        {
            ResponsePZZDelete response = new ResponsePZZDelete();

            using (cnn = GetConnection())
            {
                var ts = cnn.BeginTransaction();
                try
                {
                    cnn.Execute("delete from TKS_FAS_CertificateWord where id=@Id", request.Data, ts);



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