Exemple #1
0
        public static BLLmain GetInfo() // get data from DB.bin
        {
            DALmain <BLLmain> dm  = new DALmain <BLLmain>();
            BLLmain           bll = new BLLmain();

            try
            {
                dm.Deserialize(ref bll);
                bll.data = new DALmain <BLLmain>();
            }
            catch (ArgumentNullException)
            {
                Console.WriteLine("Файл не знайдено.");
                Console.WriteLine("Натисніть клавішу для виходу...");
                Console.ReadLine();
                Environment.Exit(1);
            }
            catch (NotSupportedException)
            {
                Console.WriteLine("Файл не знайдено.");
                Console.WriteLine("Натисніть клавішу для виходу...");
                Console.ReadLine();
                Environment.Exit(1);
            }
            return(bll);
        }
Exemple #2
0
 public virtual void SaveInfo(BLLmain info) // save data to DB.bin
 {
     data.Serialize(info);
 }