/// <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()); } }
// 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); } }
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); }
/// <summary> /// Metoda zapisująca klasę do pliku /// </summary> public void Save() { BinarySerializerWithCipher.Serialize("FrimsLocal.dat", this); }
private void Save() { BinarySerializerWithCipher.Serialize("AppData1.dat", this); }