Example #1
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (listViewLogin.SelectedItems.Count == 1)
            {
                int  id   = Convert.ToInt32(listViewLogin.SelectedItems[0].SubItems[0].Text);
                User user = User.GetUserById(id);

                if (user != null)
                {
                    FormAdd formAdd = new FormAdd(this, user);
                    formAdd.Show();
                }

                ReloadLists();
            }
        }
Example #2
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormAdd formAdd = new FormAdd(this, null);

            formAdd.Show();
        }