public void Connection_check() { registry.Registry_Get(); try { Registry_Class.sql.Open(); MessageBox.Show("Подключение выполнено"); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { Registry_Class.sql.Close(); } }
private void btReg_Click(object sender, EventArgs e) { if (tbLogin.Text.Length >= 4 & tbPass.Text.Length >= 4) { if (tbPass.Text == tbRepeatPass.Text) { Registry_Class registry = new Registry_Class(); registry.Registry_Get(); DBProcedures procedure = new DBProcedures(); procedure.spAccount_Insert(tbLogin.Text, Hash(tbPass.Text), 1); this.Hide(); } else { MessageBox.Show("Пароли не совпадают!"); } } else { MessageBox.Show("Длина логина и пароля должна быть больше трех символов"); } }
private void AuthorizForm_Load(object sender, EventArgs e) { Registry_Class regCl = new Registry_Class(); regCl.Registry_Get(); }