public static List <SiteFolder> GetBySite(Guid siteGuid) { List <SiteFolder> siteFolderList = new List <SiteFolder>(); using (IDataReader reader = DBSiteFolder.GetBySite(siteGuid)) { while (reader.Read()) { SiteFolder siteFolder = new SiteFolder(); siteFolder.guid = new Guid(reader["Guid"].ToString()); siteFolder.siteGuid = new Guid(reader["SiteGuid"].ToString()); siteFolder.folderName = reader["FolderName"].ToString(); siteFolderList.Add(siteFolder); } } return(siteFolderList); }
void btnAddFolder_Click(object sender, EventArgs e) { lblFolderMessage.Text = string.Empty; if (txtFolderName.Text.Length > 0) { if (SiteFolder.Exists(txtFolderName.Text)) { lblFolderMessage.Text = Resource.SiteSettingsFolderNameAlreadyInUseWarning; return; } if (!SiteFolder.IsAllowedFolder(txtFolderName.Text)) { lblFolderMessage.Text = Resource.SiteSettingsFolderNameNotAllowedWarning; return; } if (SiteFolder.HasInvalidChars(txtFolderName.Text)) { lblFolderMessage.Text = Resource.SiteSettingsFolderNameInvalidCharsWarning; return; } SiteFolder siteFolder = new SiteFolder(); siteFolder.SiteGuid = selectedSite.SiteGuid; siteFolder.FolderName = txtFolderName.Text; siteFolder.Save(); PopulateFolderList(); upFolderNames.Update(); } else { lblFolderMessage.Text = Resource.SiteSettingsFolderNameBlankWarning; } }
public static List<SiteFolder> GetBySite(Guid siteGuid) { List<SiteFolder> siteFolderList = new List<SiteFolder>(); using (IDataReader reader = DBSiteFolder.GetBySite(siteGuid)) { while (reader.Read()) { SiteFolder siteFolder = new SiteFolder(); siteFolder.guid = new Guid(reader["Guid"].ToString()); siteFolder.siteGuid = new Guid(reader["SiteGuid"].ToString()); siteFolder.folderName = reader["FolderName"].ToString(); siteFolderList.Add(siteFolder); } } return siteFolderList; }
public static int CompareByFolderName(SiteFolder siteFolder1, SiteFolder siteFolder2) { return siteFolder1.FolderName.CompareTo(siteFolder2.FolderName); }
public static int CompareByFolderName(SiteFolder siteFolder1, SiteFolder siteFolder2) { return(siteFolder1.FolderName.CompareTo(siteFolder2.FolderName)); }