Ejemplo n.º 1
0
        private void btn_ModificaUtente_Click(object sender, RoutedEventArgs e)
        {
            // apertura finestra utenti in modifica
            if (IndexSelected == -1)
            {
                MessageBox.Show("E' necessario selezionare l'utente da modificare", "Selezione utente", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }
            Utente utente = new Utente();

            utente.Id       = Convert.ToInt32(((TextBlock)(((Border)(stpUTE_ID.Children[IndexSelected])).Child)).Text);
            utente.RuoId    = Convert.ToInt16(((TextBlock)(((Border)(stpRUO_ID.Children[IndexSelected])).Child)).Text);
            utente.Login    = ((TextBlock)(((Border)(stpUTE_LOGIN.Children[IndexSelected])).Child)).Text;
            utente.Nome     = ((TextBlock)(((Border)(stpUTE_NOME.Children[IndexSelected])).Child)).Text;
            utente.Cognome  = ((TextBlock)(((Border)(stpUTE_COGNOME.Children[IndexSelected])).Child)).Text;
            utente.Psw      = ((TextBlock)(((Border)(stpUTE_PSW.Children[IndexSelected])).Child)).Text;
            utente.Descr    = ((TextBlock)(((Border)(stpUTE_DESCR.Children[IndexSelected])).Child)).Text;
            utente.RuoDescr = ((TextBlock)(((Border)(stpRUO_DESCR.Children[IndexSelected])).Child)).Text;

            wUpsertUtenti w = new wUpsertUtenti(utente);

            w.ShowDialog();

            CaricaUtenti();
        }
Ejemplo n.º 2
0
        private void btn_NuovoUtente_Click(object sender, RoutedEventArgs e)
        {
            // apertura finestra utenti in inserimento
            wUpsertUtenti w = new wUpsertUtenti(null);

            w.ShowDialog();
            CaricaUtenti();
        }