private List <Emp> FindAllEmpsForAllocate() { List <Emp> emps = null; try { OleDbConnection con = empDao.Begin(); emps = empDao.FindAllEmpDAO(con); empDao.Commit(); return(emps); } catch (Exception) { empDao.RollBack(); throw; } finally { empDao.Close(); } }
public void AddEmp(Emp emp) { try { OleDbConnection con = empDao.Begin(); empDao.AddEmpItemDAO(con, emp); empDao.Commit(); } catch (Exception) { empDao.RollBack(); throw; } finally { empDao.Close(); } }