示例#1
0
        private void riempiDatiUtente()
        {
            try
            {
                if (utenteCorrente != null)
                {
                    lblNomeVal.Content         = utenteCorrente.Nome;
                    lblCognomeVal.Content      = utenteCorrente.Cognome;
                    lblCFVal.Content           = utenteCorrente.CodiceFiscale;
                    lblDataNascitaVal.Content  = utenteCorrente.DataDiNascita.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                    lblEmailVal.Content        = utenteCorrente.Email;
                    lblIndirizzoVal.Content    = utenteCorrente.Indirizzo;
                    lblLuogoNascitaVal.Content = utenteCorrente.LuogoNascita;
                    lblProvinciaVal.Content    = utenteCorrente.Provincia.getTestoProvincia();
                    lblScadAbbVal.Content      = utenteCorrente.ScadenzaAbb.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
                    lblSessoVal.Content        = utenteCorrente.Sesso;
                    lblStato.Content           = utenteCorrente.Stato;
                    lblTelefonoVal.Content     = utenteCorrente.Telefono;
                    lblVisitaVal.Content       = utenteCorrente.ScadenzaVisitaMedica.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);

                    btnCI.IsEnabled       = File.Exists(utenteCorrente.getDocumentPath("CI"));
                    btnVisita.IsEnabled   = File.Exists(utenteCorrente.getDocumentPath("VM"));
                    checkAttivo.IsChecked = utenteCorrente.isAttivo();
                    if (utenteCorrente.ListPresenze.Count > 0)
                    {
                        Presenza pres = utenteCorrente.ListPresenze[utenteCorrente.getLastKey()];
                        if (pres.OraUscita != null)
                        {
                            btnIngresso.IsEnabled = true;
                            btnUscita.IsEnabled   = false;
                        }
                        else
                        {
                            btnIngresso.IsEnabled = false;
                            btnUscita.IsEnabled   = true;
                        }
                    }
                    else
                    {
                        btnIngresso.IsEnabled = true;
                        btnUscita.IsEnabled   = false;
                    }
                    loadPresenzeTabella();
                    loadStoricoTabella();
                }
            }
            catch (Exception ex)
            {
                Helper.Logger("class=MainWindow riempiDatiUtente - " + ex.Message);
            }
        }
示例#2
0
        private void riempiDatiUtente()
        {
            textBoxNome.Text               = mUtente.Nome;
            textBoxCognome.Text            = mUtente.Cognome;
            textBoxCF.Text                 = mUtente.CodiceFiscale;
            textBoxIndirizzo.Text          = mUtente.Indirizzo;
            textBoxLuogoNascita.Text       = mUtente.LuogoNascita;
            textBoxMail.Text               = mUtente.Email;
            textBoxTelefono.Text           = mUtente.Telefono;
            datePickerNascita.SelectedDate = mUtente.DataDiNascita;
            datePickerAbb.SelectedDate     = mUtente.ScadenzaAbb;
            datePickerVM.SelectedDate      = mUtente.ScadenzaVisitaMedica;
            comboBoxProvincia.SelectedItem = mUtente.Provincia.getTestoProvincia();
            comboBoxStato.SelectedItem     = mUtente.Stato;
            rbSessoM.IsChecked             = mUtente.Sesso == "M";
            rbSessoF.IsChecked             = mUtente.Sesso == "F";


            if (File.Exists(mUtente.getDocumentPath("CI")))
            {
                lblCIPresente.Content = "SI";
            }
            else
            {
                lblCIPresente.Content = "NO";
            }

            if (File.Exists(mUtente.getDocumentPath("VM")))
            {
                lblPresenteVM.Content = "SI";
            }
            else
            {
                lblPresenteVM.Content = "NO";
            }
        }