private void button2_Click(object sender, EventArgs e) { string ss = textBox8.Text; if (bank._ClientsList.ContainsKey(textBox7.Text)) { textBox10.Visible = true; textBox10.Text = "this handle is already exist try another one"; } else if (textBox8.Text != textBox9.Text) { textBox10.Visible = true; textBox10.Text = "the two passwords are not the same try again !"; } else { Account.Client Client = new Account.Client(); Client.Register(textBox4.Text, textBox5.Text, textBox7.Text, textBox8.Text, textBox6.Text); textBox10.Visible = true; textBox10.Text = "you registered successfully"; Form f = new Form3(textBox7.Text); f.Show(); this.Visible = false; } }
private void button1_Click(object sender, EventArgs e) { if (radioButton1.Checked == true) { Account.Client client = Account.CreateObjectOfClientClass(); if (!client.LogInWhoEver(textBox1.Text, textBox2.Text)) { textBox3.Visible = true; textBox3.Text = "sorry you have not an account please try again ! "; } else { textBox3.Visible = true; textBox3.Text = "welcome "; Form f = new Form3(textBox1.Text); f.Show(); this.Visible = false; } } else if (radioButton2.Checked == true) { Employee employee = new Employee(textBox1.Text, textBox2.Text); if (!employee.LogInWhoEver(textBox1.Text, textBox2.Text)) { textBox3.Visible = true; textBox3.Text = "Sorry you can't login please try again ! "; } else { Employee_form e_form = new Employee_form(textBox1.Text); e_form.Show(); this.Hide(); } } else { textBox3.Visible = true; textBox3.Text = "please you must determine you are client or employee"; } }