Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (DBUtility dbu = new DBUtility())
- {
- dbu.BeginTransaction();
- try
- {
- // Add total points to balance
- txId = CreateTransaction(dbu, memberNum, totalPoints);
- // Details for each supplier
- foreach (DataRow dr in ds.Tables[0].Rows)
- CreateEarnDetails(dbu, txId, Convert.ToInt32(dr["supplierNum"]), Convert.ToInt32(dr["rewardsPoints"]), Convert.ToDouble(dr["volume"]));
- dbu.CommitTransaction();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- Debug.WriteLine("Error in ProcessRewards! Message: " + ex.Message + "\n StackTrace: " + ex.StackTrace);
- dbu.RollbackTransaction();
- throw;
- }
- }
Add Comment
Please, Sign In to add comment