''' void setAdminAuthenticate(const string& path, const string& login, const string& password)
{
if (Adminstrator::adminID == 0)
{
throw exception("Error! You are not registered in the system!");
}
else
{
Adminstrator dmn;
fstream fs;
fs.open(path, fstream::in | fstream::out);
if (!fs.is_open())
{
throw file_not_found("Error! File not found!");
}
else
{
fs.read((char*)& dmn, sizeof(Adminstrator));
if (dmn.login == login and dmn.password == password)
{
m_login = dmn.login;
m_password = dmn.password;
}
else
{
throw exception("Error! You entered incorrectly login or password!");
}
}
}
}'''