private void button1_Click_1(object sender, EventArgs e) { FormaPrincipala fp = new FormaPrincipala(); fp.Show(); this.Hide(); }
private void button1_Click(object sender, EventArgs e) { Con.Open(); SqlDataAdapter sda = new SqlDataAdapter("select COUNT(*) from Personal_tbl where NumePersonal='" + numeutilizatortb.Text + "'and ParolaPersonal='" + parolatb.Text + "' ", Con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { FormaPrincipala fp = new FormaPrincipala(); fp.Show(); this.Hide(); } else { MessageBox.Show("Wrong NumeUtilizator or Parola"); } Con.Close(); }