Exemplo n.º 1
0
        private void Mainform_FormClosing(object sender, FormClosingEventArgs e)
        {
            List <Guest> nGuestList = this.objectListView1.Objects.Cast <Guest>().ToList();

            DataManager.SaveListToFile <Guest>(nGuestList, Constants.DATA_FILE);
            CsvController csv = new CsvController(Constants.CSV_FILE);

            csv.Write(nGuestList);
        }
Exemplo n.º 2
0
        private void exportXMLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult nResult = this.saveCsvFileDialog.ShowDialog();

            if (nResult == DialogResult.OK)
            {
                List <Guest>  nGuestList = this.objectListView1.Objects.Cast <Guest>().ToList();
                CsvController csv        = new CsvController(this.saveCsvFileDialog.FileName);
                csv.Write(nGuestList);
            }
        }