Exemplo n.º 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DialogResult result = new DialogResult();
            ArtisDialog  dialog = new ArtisDialog("Are you sure you want to delete user " + myUser.Username + " ?");

            result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                Program.ARTISClient.deleteResUser(myUser.Username, Program.TOKEN);
            }
        }
Exemplo n.º 2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            DialogResult result = new DialogResult();
            ArtisDialog  dialog = new ArtisDialog("Are you sure you want to update user " + myUser.Username + " ?");

            result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                myUser.Username = txtEditUserName.Text;
                if (myUser.Password != txtEditPassword.Text)
                {
                    myUser.Password = txtEditPassword.Text;
                }
                myUser.PrivLevel = comboPrivLevel.Text;
                myUser.Notes     = txtEditNotes.Text;
                Program.ARTISClient.saveResUser(myUser, Program.TOKEN);
            }
        }