private void btSkills_Click(object sender, EventArgs e) { Form form = new Skills(); form.ShowDialog(); }
private void btNext_Click(object sender, EventArgs e) { try { if (username != null && IfExistsUsername(username) == true) { throw new Exception("Username already exist!"); } else if (pass != null && Conditions(pass) == false) { throw new Exception("Parola nu coresounde conditiilor!"); } else if (pass != null && checkpass != null && pass.Equals(checkpass) == false) { throw new Exception("Password dosen't match!"); } else if (email != null && ValidEmailAddress(email) == false) { throw new Exception("E-mail address must be valid e-mail address format!"); } else if (IfExistsEmail(email) == true) { throw new Exception("Email already exist!"); } else if (IsPhoneNumber(phone) == false) { throw new Exception("Number incorect!"); } else if (firstname != null && lastname != null && username != null && phone != null && email != null && status != null && pass != null && checkpass != null && date != null && universiy != null && adress != null && sex != null && nationality != null && Skills.get_skill() != null) { throw new Exception("Register successfully!"); this.Close(); CClient.inregistreaza_client(firstname, lastname, username, pass, phone, email, date, universiy, adress, sex_id, status_id, nationality, result); Form form = new CClient(firstname, lastname, username, phone, email, date, universiy, adress, sex, status, nationality, Skills.get_skill(), pbProfile.Image); form.Show(); } else { throw new Exception("Some empty filled!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }