Example #1
0
        private void buttonAddUser_Click(object sender, EventArgs e)
        {
            EditUser AddUserForm = new EditUser(null);

            AddUserForm.Owner = this;
            AddUserForm.ShowDialog();
        }
Example #2
0
        private void buttonEditUser_Click(object sender, EventArgs e)
        {
            //Передаем данные строки в поля формы
            string[] userData = new string[dataGridViewUsers.CurrentRow.Cells.Count];
            for (int i = 0; i < dataGridViewUsers.CurrentRow.Cells.Count; i++)
            {
                userData[i] = dataGridViewUsers.CurrentRow.Cells[i].Value.ToString();
            }

            EditUser EditUserForm = new EditUser(userData);

            EditUserForm.Owner = this;
            EditUserForm.ShowDialog();
        }