public List <tbl_YEAR> GetAll() { try { return(Yeardal.GetAll()); } catch (Exception ex) { throw ex; } }
public tbl_000_COMPANY GetByID(int id) { try { if (id == 0) { throw new Exception("Invalid Parameter!"); } var exist = compdal.GetByID(id); if (exist == null) { throw new Exception("Record does not exist!"); } exist.YearList = yeardal.GetAll(); return(exist); } catch (Exception ex) { throw ex; } }