public List <PayLeavesDC> LoadAllEmployee() { DBConnection objConnection = new DBConnection(); PayLeavesDA objPayLeavesDA = new PayLeavesDA(); List <PayLeavesDC> objPayLeavesDC = null; try { objConnection.Open(false); objPayLeavesDC = objPayLeavesDA.LoadAllEmployee(objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objPayLeavesDC); }