public static List <ATTApplication> GetApplicationListWithFormNMenu() { try { List <ATTApplication> lstApp = BLLApplication.GetApplicationList(0); List <ATTApplicationForm> lstForm = BLLApplicationForm.GetApplicationFormListWithMenu(-1, -1); foreach (ATTApplication app in lstApp) { app.LstApplicationForm = lstForm.FindAll(delegate(ATTApplicationForm frm) { return(frm.ApplicationID == app.ApplicationID); }); } return(lstApp); } catch (Exception ex) { throw ex; } }
public static List <ATTApplication> GetApplicationListWithFormNMenuNRolesNRoleMenus() { try { List <ATTApplication> lstApp = BLLApplication.GetApplicationList(0); List <ATTMenu> lstMenus = BLLMenu.GetMenuList(-1, -1, -1); List <ATTRoles> lstRoles = BLLRoles.GetRolesAndMenus(-1, -1); foreach (ATTApplication app in lstApp) { app.LstMenus = lstMenus.FindAll(delegate(ATTMenu menus) { return(menus.ApplicationID == app.ApplicationID); }); app.LstRoles = lstRoles.FindAll(delegate(ATTRoles roles) { return(roles.ApplicationID == app.ApplicationID); }); } return(lstApp); } catch (Exception ex) { throw ex; } }