База данных для хранения и обработки информации, которая требуется типичной психиатрической больнице, страница 14

                                                                                                  cmd.Parameters.AddWithValue("pPHONE", information.Phone);

                                                                                                  cmd.Parameters.AddWithValue("pLOGIN", information.Login);

                                                                                                  cmd.Parameters.AddWithValue("pPASSWORD", getHashString(information.Password));

                                                                                                  cmd.ExecuteNonQuery();

                                                                               }

                                                           }

                                       }

                                       /// <summary>

                                       /// Данные, которые может изменить главный

                                       /// </summary>

                                       public static void AdminUpdateEmployeeInfo(DbEmployee employee)

                                       {

                                                           using (OracleConnection connection = GetConnection())

                                                           {

                                                                               using (OracleCommand cmd = new OracleCommand("UPDATE СОТРУДНИК SET ФОТОГРАФИЯ=:photography, ДОЛЖНОСТЬ_ID=:ДОЛЖНОСТЬ_ID WHERE ID = :ID", connection))

                                                                               {

                                                                                                  cmd.Parameters.AddWithValue(":ДОЛЖНОСТЬ_ID", employee.PostID);

                                                                                                  cmd.Parameters.AddWithValue(":ID", employee.ID);

                                                                                                  cmd.Parameters.Add(getPhotoParameter(":photography", employee.Photography));

                                                                                                  cmd.ExecuteNonQuery();

                                                                               }

                                                                               using (OracleCommand cmd = new OracleCommand("UPDATE ЧЕЛОВЕК SET ФАМИЛИЯ=:ФАМИЛИЯ, ИМЯ=:ИМЯ, ОТЧЕСТВО=:ОТЧЕСТВО, ПАСПОРТ=:ПАСПОРТ WHERE ID = :ID", connection))

                                                                               {

                                                                                                  cmd.Parameters.AddWithValue(":ФАМИЛИЯ", employee.Surname);

                                                                                                  cmd.Parameters.AddWithValue(":ИМЯ", employee.Name);

                                                                                                  cmd.Parameters.AddWithValue(":ОТЧЕСТВО", employee.Patronymic);

                                                                                                  cmd.Parameters.AddWithValue(":ПАСПОРТ", employee.Passport);

                                                                                                  cmd.Parameters.AddWithValue(":ID", employee.HumanID);

                                                                                                  cmd.ExecuteNonQuery();

                                                                               }

                                                           }

                                       }

                                       /// <summary>

                                       /// Смена пароля у юзверя

                                       /// </summary>

                                       /// <param name="password">новый пароль</param>

                                       public static void ChangePassword(string username, string oldpassword, string newpassword)

                                       {

                                                           using (OracleConnection connection = GetConnection())

                                                           using (OracleCommand cmd = new OracleCommand("ChangePassword", connection))

                                                           {

                                                                               cmd.CommandType = CommandType.StoredProcedure;

                                                                               cmd.Parameters.AddWithValue("pLOGIN", username);

                                                                               cmd.Parameters.AddWithValue("pOLDPASSWORD", getHashString(oldpassword));

                                                                               cmd.Parameters.AddWithValue("pNEWPASSWORD", getHashString(newpassword));

                                                                               cmd.ExecuteNonQuery();

                                                           }

                                       }

                                       /// <summary>

                                       /// Словарь из всех лекарств

                                       /// </summary>

                                       public static Dictionary<int, DbDrug> GetAllDrugs()

                                       {

                                                           Dictionary<int, DbDrug> result = new Dictionary<int, DbDrug>();

                                                           using (OracleConnection connection = GetConnection())