Example #1
0
 public ResponseDocUnAudit DocUnAudit([FromBody] RequestDocUnAudit request)
 {
     try
     {
         DocBLL bll = new DocBLL();
         return(bll.DocUnAudit(request));
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(
                   Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Example #2
0
        /// <summary>
        /// 凭证取消审核
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public ResponseDocUnAudit DocUnAudit(RequestDocUnAudit request)
        {
            ResponseDocUnAudit res = new ResponseDocUnAudit();

            using (cnn = GetConnection())
            {
                var ts = cnn.BeginTransaction();
                try
                {
                    string sql = @"update tks_fas_doc set checkStatus=1 where id=@Id and checkStatus=2";
                    cnn.Execute(sql, new { Id = request.Data.Id }, ts);
                    ts.Commit();

                    res.IsSuccess = true;
                    res.Message   = "取消审核成功";
                    return(res);
                }
                catch (Exception ex)
                {
                    ts.Rollback();
                    return(this.DealException(res, ex) as ResponseDocUnAudit);
                }
            }
        }