/// <summary> /// 审核补扣款 /// </summary> /// <param name="info">扣补款对象</param> public static bool UpdateInfoTranBD(DeductModel info) { using (SqlConnection conn = new SqlConnection(DBHelper.connString)) { conn.Open(); SqlTransaction tran = conn.BeginTransaction(); try { if (DeductDAL.UpdateDeduct(info, tran) <= 0) { tran.Rollback(); return(false); } if (!ReleaseDAL.UpdateDeductOutBD(tran, info.Number, info.IsDeduct, info.Actype, info.DeductMoney)) { tran.Rollback(); return(false); } DirectionEnum de = DirectionEnum.AccountReduced; D_AccountKmtype km = D_AccountKmtype.AddMoneycut; string remark = "管理员协助扣款" + info.DeductMoney.ToString(); if (info.IsDeduct == 1) { de = DirectionEnum.AccountsIncreased; km = D_AccountKmtype.AddMoneyget; remark = "管理员协助补款" + info.DeductMoney.ToString(); } D_AccountDAL.AddAccountWithdraw1(info.Number, info.DeductMoney, D_AccountSftype.MemberType, D_Sftype.BounsAccount, km, de, remark, tran); tran.Commit(); return(true); } catch { tran.Rollback(); return(false); } finally { conn.Close(); conn.Dispose(); } } }