private void новыйToolStripMenuItem_Click(object sender, EventArgs e) { AddUser addUser = new AddUser(); if (addUser.ShowDialog() == DialogResult.OK) { DomainData dmd = addUser.DomainData; dmd.Id = users.Count > 0 ? users.Max(i => i.Id) + 1 : 1; users.Add(addUser.DomainData); UpdateDataGrid(); } }
private void addusrbtn_Click(object sender, EventArgs e) { AddUser frm = new AddUser(); frm.Show(); }