/// <summary> /// Constructor /// </summary> public MasterLogic() { try { _masterDAO = new MasterDAO(); _tabAuthorDataTable = new MasterDS.TabAuthorDataTable(); _tabCategoryDataTable = new MasterDS.TabCategoryDataTable(); _tabLanguageDataTable = new MasterDS.TabLanguageDataTable(); _listTabMasterModel = new List <TabMasterModel>(); } catch (Exception ex) { //Error log simulate Console.WriteLine(ex.ToString()); Console.WriteLine(ex.GetBaseException().ToString()); throw; } }
/// <summary> /// Return Languages. /// </summary> /// <returns>List<TabMasterModel></returns> /// <exception cref="ex">Exception</exception> public List <TabMasterModel> GetAllLanguages() { try { _listTabMasterModel = new List <TabMasterModel>(); _tabLanguageDataTable = _masterDAO.GetAllLanguages(); foreach (MasterDS.TabLanguageRow row in _tabLanguageDataTable.Rows) { _listTabMasterModel.Add(TabMasterModel.Parse(row)); } return(_listTabMasterModel); } catch (Exception ex) { //Error log simulate Console.WriteLine(ex.ToString()); Console.WriteLine(ex.GetBaseException().ToString()); throw; } }