Beispiel #1
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string   name        = txtName.Text;
            string   surname     = txtSurname.Text;
            DateTime dateOfBirth = dtBirthday.Value;
            char     gender      = Convert.ToChar(drpGender.SelectedItem);

            if (drpItalyOrAbroad.SelectedIndex == 0)
            {
                controller.CurrentPlace = new ItalianMunicipality(drpMunicipality.SelectedValue.ToString());
            }
            else
            {
                controller.CurrentPlace = new ForeignCountry(drpForeignCountries.SelectedValue.ToString());
            }

            controller.SetPersonValues(name, surname, dateOfBirth, gender, controller.CurrentPlace);

            controller.Generator.GenerateFiscalCode();
            txtCF.Text                     = controller.Generator.FiscalCode;
            Omocodes                       = OmocodeGenerator.RetrieveList(txtCF.Text);
            lstOmocode.DataSource          = Omocodes;
            btnCopyToClipboard.Enabled     = true;
            btnCopyListToClipboard.Enabled = true;
        }
Beispiel #2
0
        public void ListTest()
        {
            string CF = "DMCNRL90E03B202A";

            OmocodeGenerator.InitialFiscalCode = CF;
            OmocodeGenerator.GenerateOmocodes();
            Assert.AreEqual(8, OmocodeGenerator.OmocodeFiscalCodes.Count);
        }