private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\erol\source\repos\elmalar\elmalar\elmalar.mdf;Integrated Security=True;Connect Timeout=30"); SqlDataAdapter sda = new SqlDataAdapter("Select Count (*) From [Table] where k_adi='" + textBox1.Text + "'and sifre='" + maskedTextBox1.Text + "'", con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { this.Hide(); arayuz arayuz1 = new arayuz(); arayuz1.Show(); } else { MessageBox.Show("Lütfen Kullanıcı Adı ve Şifrenizi Kontrol Edin."); } }
public arduinoController(arayuz View) { this.View = View; }