public void signup(string a, string b, string c, Int64 d, string e) { FirstName = a; LastName = b; nationality = c; PassportNumber = d; connec.Open(); string query = "insert into fursan values (@ppnumber , @fname , @lname , @nationality , @pass)"; SqlCommand cmd = new SqlCommand(query, connec); cmd.Parameters.AddWithValue("@ppnumber", PassportNumber); cmd.Parameters.AddWithValue("@fname", FirstName); cmd.Parameters.AddWithValue("@lname ", LastName); cmd.Parameters.AddWithValue("@nationality", nationality); cmd.Parameters.AddWithValue("pass", e); int x = cmd.ExecuteNonQuery(); if (x > 0) { MessageBox.Show("Your account has been made succesfully.", "Account MADE", MessageBoxButtons.OK, MessageBoxIcon.Information); FURSANSIGNUP f = new FURSANSIGNUP(); FURSAN fs = new FURSAN(); f.Hide(); } else { MessageBox.Show("Account registration unsuccesful.", "Make Account", MessageBoxButtons.OK, MessageBoxIcon.Error); } connec.Close(); }
private void button4_Click(object sender, EventArgs e) { this.Hide(); FURSAN fr = new FURSAN(); fr.Show(); }