示例#1
0
        public static void Show(MainForm m, UNFHibernate.Domain.Persona p)
        {
            ViewAnagrafica va = new ViewAnagrafica();

            va.setPersona(m, p);
            va.mainform = m;
            va.Show();
        }
示例#2
0
        public void setPersona(MainForm m, UNFHibernate.Domain.Persona p)
        {
            mainform = m;
            persona  = p;

            if (persona != null)
            {
                textCognome.Text = persona.Cognome ?? string.Empty;
                textNome.Text    = persona.Nome ?? string.Empty;

                Utils.SetPickerValidIfEnabled(persona.DataNascita, ref dateNascita);

                textLuogoNascita.Text = persona.LuogoNascita ?? string.Empty;

                if (persona.Male != null && persona.Male.Value)
                {
                    checkBoxMaschio.Checked = true;
                }

                textIndirizzo.Text       = persona.Indirizzo ?? string.Empty;
                textComune.Text          = persona.Comune ?? string.Empty;
                textCAP.Text             = persona.CAP ?? string.Empty;
                textProvincia.Text       = persona.Provincia ?? string.Empty;
                textCodiceFiscale.Text   = persona.CodiceFiscale ?? string.Empty;
                textEmail.Text           = persona.Email ?? string.Empty;
                textNumeroTelefono.Text  = persona.NumeroTelefono ?? string.Empty;
                textNumeroCellulare.Text = persona.NumeroCellulare ?? string.Empty;
                textNote.Text            = persona.Note ?? string.Empty;

                textGenitoreNome.Text         = persona.GenitoreNome ?? string.Empty;
                textGenitoreCognome.Text      = persona.GenitoreCognome ?? string.Empty;
                textGenitoreLuogoNascita.Text = persona.GenitoreLuogoNascita ?? string.Empty;
                Utils.SetPickerValidIfEnabled(persona.GenitoreDataNascita, ref dateNascitaGenitore);
            }
            else
            {
                Utils.SetPickerValid(dateNascita, false);
                Utils.SetPickerValid(dateNascitaGenitore, false);
            }

            RefreshIscrizioni();
        }