/// <summary>
        /// Statyczna funkcja ładująca kolejkę z pliku
        /// </summary>
        /// <returns>Zwraca nowy SickLeave Resender wczytany z pliku</returns>
        public static SickLeaveResender Load()
        {
            SickLeaveResender tmp = (SickLeaveResender)BinarySerializerWithCipher.Deserialize <SickLeaveResender>("AppData2.dat");

            if (tmp != null)
            {
                return(tmp);
            }
            else
            {
                return(new SickLeaveResender());
            }
        }
示例#2
0
        // metoda do sprawdzenia czy można sie zalogowac


        /// <summary>
        /// Metoda statyczna wczytująca bazę danych z pliku
        /// </summary>
        /// <returns>Zwraca bazę wczytaną z plików</returns>
        public static FirmLocalDataBase Initialize()
        {
            FirmLocalDataBase dataBase = (FirmLocalDataBase)BinarySerializerWithCipher.Deserialize <FirmLocalDataBase>("FrimsLocal.dat");

            if (dataBase == null)
            {
                return(new FirmLocalDataBase());
            }
            else
            {
                return(dataBase);
            }
        }
示例#3
0
        public static Reporter Load()
        {
            Reporter tmp = (Reporter)BinarySerializerWithCipher.Deserialize <Reporter>("AppData1.dat");

            if (tmp != null)
            {
                if (tmp.lisOfReports.Count > 1000)
                {
                    tmp.lisOfReports.RemoveAt(0);
                }


                return(tmp);
            }
            else
            {
                return(new Reporter());
            }
        }
 /// <summary>
 /// Funkcja zapisująca tą klasę do pliku
 /// </summary>
 private void Save()
 {
     BinarySerializerWithCipher.Serialize <SickLeaveResender>("AppData2.dat", this);
 }
示例#5
0
 /// <summary>
 /// Metoda zapisująca klasę do pliku
 /// </summary>
 public void Save()
 {
     BinarySerializerWithCipher.Serialize("FrimsLocal.dat", this);
 }
示例#6
0
 private void Save()
 {
     BinarySerializerWithCipher.Serialize("AppData1.dat", this);
 }