private void bunifuImageButton6_Click(object sender, EventArgs e) { FacilitatorLogin fl = new FacilitatorLogin(); fl.Show(); this.Hide(); }
private void ButtonFacilitatorCreateAccount_Click(object sender, EventArgs e) { con.Open(); if (labelAvailableUsername.ForeColor == System.Drawing.Color.Green) { if (TextboxPassword.Text == TextboxReTypePassword.Text) { SqlCommand cmd = new SqlCommand("Insert into facilitator(name, username, password) Values('" + TextboxName.Text + "','" + TextboxUsername.Text + "','" + TextboxPassword.Text + "')", con); cmd.ExecuteNonQuery(); Dialogue.Show("Successfully Created", "", "Ok", "Cancel"); con.Close(); this.Hide(); FacilitatorLogin cf = new FacilitatorLogin(); cf.Show(); } else if (TextboxPassword.Text != TextboxReTypePassword.Text) { Dialogue.Show("Your Password does not Match", "", "Ok", "Cancel"); con.Close(); } } else if (TextboxName.Text == "" || TextboxPassword.Text == "" || TextboxReTypePassword.Text == "" || TextboxUsername.Text == "") { Dialogue.Show("Please Fill all Fields", "", "Ok", "Cancel"); con.Close(); } else { Dialogue.Show("Please use Available Username", "", "Ok", "Cancel"); con.Close(); } }