private void button5_Click(object sender, EventArgs e) { if (textBox2.Text == textBox4.Text) { COMuser user = new COMuser(); user.CategoryName = textBox3.Text; user.Email = textBox1.Text; user.Password = textBox2.Text; user.ImageURL = BLLcategory.GetCategoryById(6).ImageURL; try { BLLuser.AddUser(user); } catch (Exception ex) { MessageBox.Show("error: add user didnt success: " + ex); } } else { MessageBox.Show("verify password isnt like password. try again."); } groupBox1.Visible = false; textBox1.Text = string.Empty; textBox2.Text = string.Empty; textBox4.Text = string.Empty; textBox3.Text = string.Empty; }