Ejemplo n.º 1
0
        private void CheckFiles()
        {
            if (!File.Exists("prodotti.xml"))
            {
                XmlSerializerUtil.Save <List <Product> >("prodotti.xml", _warehouse.ProductList.ToList());
            }
            if (!File.Exists("riepiloghiCustomer.dat"))
            {
                DatBinaryFormatter.Save <List <Customer> >("riepiloghiCustomer.dat", _costumerRiepilogue.GetAll.ToList());
            }

            if (!File.Exists("riepiloghiRent.dat"))
            {
                DatBinaryFormatter.Save <List <Rent> >("riepiloghiRent.dat", _rentsRiepilogue.GetAll.ToList());
            }

            if (!File.Exists("riepiloghiInvoice.dat"))
            {
                DatBinaryFormatter.Save <List <Invoice> >("riepiloghiInvoice.dat", _invoicesRiepilogue.GetAll.ToList());
            }
        }
Ejemplo n.º 2
0
 private void onWarehouse(object sender, NotifyCollectionChangedEventArgs e)
 {
     XmlSerializerUtil.Save <List <Product> >("prodotti.xml", _warehouse.ProductList.ToList());
 }