private void btnCreateObject_Click(object sender, EventArgs e) { CreatingObjectForm creatingObjectForm = new CreatingObjectForm(); creatingObjectForm.ShowDialog(); CompleteForm.dgvObjects(this); CompleteForm.dgvCollections(this); }
static public void dgvObjectCategories(CreatingObjectForm form) { form.dgvObjectCategories.DataSource = (from newCategory in Control.tempCategories select new { newCategory.Id, newCategory.Name }).ToList(); form.dgvObjectCategories.Columns[0].Visible = false; if (form.dgvObjectCategories.Rows.Count != 0) { form.dgvObjectCategories[1, 0].Selected = true; } form.dgvObjectCategories.Update(); }
static public void dgvObjectCollections(CreatingObjectForm form) { form.dgvObjectCollections.DataSource = (from collection in Control.tempCollections select new { collection.Id, collection.Name }).ToList(); form.dgvObjectCollections.Columns[0].Visible = false; if (form.dgvObjectCollections.Rows.Count != 0) { form.dgvObjectCollections[1, 0].Selected = true; } form.dgvObjectCollections.Update(); }
static public void dgvObjectUsers(CreatingObjectForm form) { form.dgvObjectAuthors.DataSource = (from user in Control.tempUsers select new { user.Id, user.Name }).ToList(); form.dgvObjectAuthors.Columns[0].Visible = false; if (form.dgvObjectAuthors.Rows.Count != 0) { form.dgvObjectAuthors[1, 0].Selected = true; } form.dgvObjectAuthors.Update(); }