private void button1_Click(object sender, EventArgs e) { string login = textBox1.Text; string pass = textBox2.Text; if (inputCheck.CheckLogPas(login, pass)) { if (inputCheck.CorrectInputLogin(login) && inputCheck.LoginExist(login)) { string req = String.Format("INSERT INTO Accounts (Login, Password, Access) " + "VALUES ('{0}', '{1}', 'Consultant')", login, pass); bd.WorkWithBD(req); bd.ViewAllAcc(listBox1); textBox1.Text = ""; textBox2.Text = ""; } } }
private void button4_Click(object sender, EventArgs e) { string login = textBox1.Text; string password = textBox2.Text; correctInput = new CorrectInputCheck(); bd = new BD(); seccess = new SeccessList(); if (correctInput.CheckLogPas(login, password)) { if (correctInput.CorrectInputLogin(login)) { if (correctInput.LoginExist(login)) { bd.WorkWithBD(String.Format("INSERT INTO Accounts VALUES('{0}','{1}','{2}',{3})", login, password, "Guest", correctInput.BucketIdGen())); seccess.SeccessMessage(2); } } } }