public object GetDetailIndex(int id, DataSourceLoadOptions loadOptions) { try { var glavna = GlavnaDAO.GetAllObjects(id); return(DataSourceLoader.Load(glavna, loadOptions)); } catch (Exception) { return(DataSourceLoader.Load(new List <GlavnaModel>(), loadOptions)); } }
public object GetDetail(DataSourceLoadOptions loadOptions) { try { var glavna = GlavnaDAO.GetAllObjects(Convert.ToInt32(HttpContext.Session.GetInt32("GlavnaMasterID"))); foreach (var item in glavna) { item.InternePoruke = InternaPorukaDAO.GetMessagesById(item.AutoID); CreateGlavnaFolderForExcelFiles(item.AutoID, item.DatumKreiranjaUTC); } return(DataSourceLoader.Load(glavna, loadOptions)); } catch (Exception e) { return(DataSourceLoader.Load(new List <GlavnaModel>(), loadOptions)); } }