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;
            }
        }
        private static List <ATTOrganizationApplications> GetOrgApplicationsList(DataTable tbl)
        {
            List <ATTOrganizationApplications> OrgApplicationLST = new List <ATTOrganizationApplications>();

            try
            {
                foreach (DataRow row in tbl.Rows)
                {
                    ATTOrganizationApplications OrgApplicationObj = new ATTOrganizationApplications
                                                                    (
                        int.Parse(row["ORG_ID"].ToString()),
                        int.Parse(row["APPL_ID"].ToString()),
                        (string)row["FROM_DATE"].ToString(),
                        (string)row["TO_DATE"].ToString(),
                        "E"
                                                                    );
                    //OrgApplicationObj.LSTApplication = BLLApplication.GetApplicationByIDList(int.Parse(row["ORG_ID"].ToString()));
                    OrgApplicationObj.Applications = new ATTApplication
                                                     (
                        int.Parse(row["APPL_ID"].ToString()),
                        (string)row["APPL_SHORT_NAME"].ToString(),
                        (string)row["APPL_FULL_NAME"].ToString(),
                        (string)row["DESCRIPTION"].ToString(),
                        "E"

                                                     );

                    OrgApplicationObj.LSTRoles = BLLRoles.GetApplicationRoles(int.Parse(row["APPL_ID"].ToString()));


                    OrgApplicationLST.Add(OrgApplicationObj);
                }
                return(OrgApplicationLST);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }