public void SetThingsUp() { global::voidsoft.DataBlock.Configuration.ReadConfigurationFromConfigFile(); bk = new Book(); bkPerst = new BookPersistentObject(bk); at = new Author(); atPerst = new AuthorPersistentObject(at); }
/// <summary> /// Loads the authors /// </summary> private void LoadAuthors() { Author aut = new Author(); AuthorPersistentObject authorPerst = new AuthorPersistentObject(aut); //get all the authors Author[] authors = (Author[])authorPerst.GetTableMetadata(); //bind the author list to the check box list this.listCheckboxes.DataSource = authors; this.listCheckboxes.DataTextField = "Name"; this.listCheckboxes.DataValueField = "AuthorId"; this.listCheckboxes.DataBind(); }
private void LoadAuthors() { try { Author aut = new Author(); AuthorPersistentObject autPerst = new AuthorPersistentObject(aut); authors = (Author[])autPerst.GetTableMetadata(); //add them to view this.Application.Add("AuthorsList", this.authors); this.gridViewAuthors.DataSource = authors; this.gridViewAuthors.DataBind(); } catch (Exception ex) { } }