Example #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            User        user = new User();
            frmEditUser frm  = new frmEditUser(user);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                RefreshUsers();
            }
        }
Example #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (lbUsers.SelectedIndex >= 0)
            {
                UsersRepository usersRepo = new UsersRepository();

                User user = (User)lbUsers.SelectedItem;

                frmEditUser frm = new frmEditUser(user);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    RefreshUsers();
                }
            }
        }