public int CancelAuditAuthentication(string custid)
{
const string sql = "update cust_info set authstatus=1 where innerid=@innerid;";
const string sqlau = "update cust_authentication set auditper='',auditdesc='',audittime=null where custid=@custid;";
using (var conn = Helper.GetConnection())
{
var tran = conn.BeginTransaction();
try
{
conn.Execute(sql, new { innerid = custid });
conn.Execute(sqlau, new { custid });
tran.Commit();
return 1;
}
catch (Exception ex)
{
tran.Rollback();
return 0;
}
}
}