Example #1
0
        private void Export_Click(object sender, EventArgs e)
        {
            string       variantaExport = view.getExportType();
            string       numeSpectacol  = view.getSpectacolByTitlu();
            List <Bilet> listaBilete    = view.getListaBilete();

            if (variantaExport != "" && numeSpectacol != "")
            {
                //view.showMessage(variantaExport);
                ExporterFactory exportFactory = new ExporterFactory();
                Exporter        exporter      = exportFactory.getExporter(variantaExport);
                exporter.export(numeSpectacol, listaBilete);

                view.showMessage("Fisier exportat cu succes!");
            }
            else
            {
                view.showMessage("Spectacol/Varianta export neselectata!");
            }
        }