Beispiel #1
0
        private void NewUser_TI_Click(object sender, EventArgs e)
        {
            UserPasswordAddForm form = new UserPasswordAddForm(true);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                User nuevo = _usuarios.NewItem();
                nuevo.Licences = Privileges.CreatePerms(nuevo);
                nuevo.Name     = form.Nombre;
                nuevo.PlainPwd = form.Pass;
            }
        }
Beispiel #2
0
        private void EditUser_TI_Click(object sender, EventArgs e)
        {
            User item = (User)Datos.Current;

            if (Datos.Current != null)
            {
                UserPasswordAddForm form = new UserPasswordAddForm(((User)Datos.Current).Name, true);
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    ((User)Datos.Current).Name     = form.Nombre;
                    ((User)Datos.Current).PlainPwd = form.Pass;
                }
            }
            else
            {
                PgMng.ShowInfoException(Resources.Messages.NO_SELECTED);
            }
        }