private void AutorisationButton_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckPassword())
         {
             Catalog catalogForm = new Catalog(this);
             catalogForm.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Логин или пароль не верны.", "System", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception ex)
     {
         var msg = MessageBox.Show($"{ex.Message} \nОткрыть окно соединения с SQL-сервер?", "System", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
         if (msg == DialogResult.Yes)
         {
             ConnectToSql connect = new ConnectToSql();
             connect.ShowDialog();
         }
     }
 }
        private void ConnectionLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ConnectToSql connect = new ConnectToSql();

            connect.ShowDialog();
        }