private void alertsMaintenanceToolStripMenuItem_Click(object sender, EventArgs e) { EUFolder folder = SPFoldersTreeView.SelectedNode.Tag as EUFolder; EUList list = SPFoldersTreeView.SelectedNode.Tag as EUList; EUWeb web = SPFoldersTreeView.SelectedNode.Tag as EUWeb; EUSiteSetting siteSetting = null; string webUrl = String.Empty; if (folder != null) { webUrl = folder.WebUrl; siteSetting = folder.SiteSetting; } else if (list != null) { webUrl = list.WebUrl; siteSetting = list.SiteSetting; } else if (web != null) { webUrl = web.Url; siteSetting = web.SiteSetting; } if (AlertManager.CheckSobiensAlertServiceEnability(siteSetting, webUrl) == false) { SobiensAlertServiceDisabledForm sobiensAlertServiceDisabledForm = new SobiensAlertServiceDisabledForm(); sobiensAlertServiceDisabledForm.ShowDialog(); return; } AlertMaintenanceForm alertMaintenanceForm = new AlertMaintenanceForm(); alertMaintenanceForm.Initialize(webUrl, siteSetting); alertMaintenanceForm.ShowDialog(); }
public List <ISPCFolder> GetSubFolders(ISPCFolder folder) { List <ISPCFolder> subFolders = new List <ISPCFolder>(); if (folder as EUWeb != null) { EUWeb web = (EUWeb)folder; List <EUWeb> webs = SharePointManager.GetWebs(web.Url, web.SiteSetting); foreach (EUWeb _web in webs) { subFolders.Add(_web); } List <EUList> lists = SharePointManager.GetLists(web.Url, web.SiteSetting); foreach (EUList list in lists) { if ( (list.ServerTemplate == 101 || list.ServerTemplate == 100 || list.BaseType == 1) && //or BaseType == 1 - JOEL JEFFERY 20110708 list.Hidden == false ) { subFolders.Add(list); } } } else if (folder as EUFolder != null) { EUFolder _folder = (EUFolder)folder; IEnumerable <EUFolder> folders = SharePointManager.GetFolders(_folder); foreach (EUFolder __folder in folders) { subFolders.Add(__folder); } } return(subFolders); }