示例#1
0
        private void buttonImportCorsi(object sender, EventArgs e)
        {
            String titlestring = string.Empty; // fallirà
            String assorari    = string.Empty; // fallirà

            OpenFileDialog titleDialog = new OpenFileDialog();

            titleDialog.Title = "Selezionare il file degli orari";
            if (titleDialog.ShowDialog() == DialogResult.OK)
            {
                titlestring = titleDialog.FileName;
            }

            OpenFileDialog assorariDialog = new OpenFileDialog();

            assorariDialog.Title = "Selezionare il file delle associazioni orari<->corsi";
            if (assorariDialog.ShowDialog() == DialogResult.OK)
            {
                assorari = assorariDialog.FileName;
            }

            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.Title = "Selezionare il file dei corsi";
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                DBImporter.importCorsi(openFileDialog1.FileName, titlestring, assorari, null);
                RefreshCorsi();
                MessageBox.Show("Fatto!");
            }
        }
示例#2
0
        private void button_BackupListini(object sender, EventArgs e)
        {
            String filename = popupSaveFilenameBox();

            if (!String.IsNullOrEmpty(filename))
            {
                DBImporter.backupListini(DB.instance.listini, filename);
                MessageBox.Show("Fatto!");
            }
        }
示例#3
0
        private void buttonBackupALL(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                DBImporter.backupAll(dialog.SelectedPath);
                MessageBox.Show("Fatto!");
            }
        }
示例#4
0
        private void buttonBackupAnagrafiche(object sender, EventArgs e)
        {
            String filename = popupSaveFilenameBox();

            if (!String.IsNullOrEmpty(filename))
            {
                DBImporter.backupPersone(DB.instance.persone, filename);
                MessageBox.Show("Fatto!");
            }
        }
示例#5
0
        // importa iscrizioni
        private void buttonImportIscrizioni(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                DBImporter.importIscrizioni(openFileDialog1.FileName, null);
                RefreshCorsi();
                RefreshAnagrafiche();
            }
        }
示例#6
0
        private void buttonImportAnagrafiche(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                DBImporter.importPersone(openFileDialog1.FileName, null);
                RefreshAnagrafiche();
                MessageBox.Show("Fatto!");
            }
        }
示例#7
0
        private void button_RestoreListini(object sender, EventArgs e)
        {
            String filename = popupOpenFilenameBox();

            if (!String.IsNullOrEmpty(filename))
            {
                DBImporter.restoreListini(filename);
                RefreshChiusure();

                MessageBox.Show("Fatto!");
            }
        }
示例#8
0
        private void buttonRestoreAnagrafiche(object sender, EventArgs e)
        {
            String filename = popupOpenFilenameBox();

            if (!String.IsNullOrEmpty(filename))
            {
                DBImporter.restorePersone(filename);
                RefreshAnagrafiche();

                MessageBox.Show("Fatto!");
            }
        }
示例#9
0
        private void buttonRestoreALL(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                invalidateGridViews();

                DBImporter.restoreAll(dialog.SelectedPath, this);
                populateGridViews();

                MessageBox.Show("Fatto!");
            }
        }
示例#10
0
 private void button_DeleteALLDB(object sender, EventArgs e)
 {
     DBImporter.deleteAllAndClear(this);
 }