Exemple #1
0
        public List<AccidentDTO>GetAccident(string Username)
        {
            Transaction trans = new Transaction();
            List<AccidentDTO> accident;
            AccidentRDG accidentRDG = new AccidentRDG(trans);
            trans.BeginTransaction();
            try
            {
                accident = accidentRDG.GetAccident(Username);
            }
            catch (Exception e)
            {
                trans.Rollback();
                throw e;
            }
            trans.Commit();

            return accident;
        }
Exemple #2
0
 public void DeleteAccident(string Username)
 {
     Transaction trans = new Transaction();
     AccidentRDG accidentRDG = new AccidentRDG(trans);
     trans.BeginTransaction();
     try
     {
         accidentRDG.DeleteAccident(Username);
     }
     catch (Exception e)
     {
         trans.Rollback();
         throw e;
     }
     trans.Commit();
 }