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