public static int ApproveBack(string acid) { using (var dbHelper = new SqlDbHelper(ConnectionHelper.GetDecryptConn("Gungnir"))) { dbHelper.BeginTransaction(); try { //var result1 = DalSeckill.DeleteFlashSaleTempByAcid(acid); //if (result1 <= 0) //{ // dbHelper.Rollback(); // return -1; //} //var result2 = DalSeckill.DeleteFlashSaleProductsTempByAcid(acid); //if (result2 <= 0) //{ // dbHelper.Rollback(); // return -1; //} var result3 = DalSeckill.UpdateSeckillToToApprove(acid, 2); if (result3 <= 0) { dbHelper.Rollback(); return(-1); } dbHelper.Commit(); return(1); } catch (Exception e) { dbHelper.Rollback(); throw new Exception(e.Message);; } } }
public static int UpdateSeckillToToApprove(string acid) { return(DalSeckill.UpdateSeckillToToApprove(acid)); }