private void Loginbtn_Click(object sender, EventArgs e) { LoginUserControl obj = new LoginUserControl(); this.Hide(); this.Parent.Controls.Add(obj); }
public void RegisterBtn_Click(object sender, EventArgs e) { obj.Name = RNameInput.Text; obj.Email = REmailInput.Text; obj.Password = RPassword.Text; obj.Confirm_Password = RCnfmPassword.Text; obj.Number = RContact.Text; int f = 0; BLL obj1 = new BLL(); gl cat = obj1.get_details(obj1, Resources.Resource1.FilePathData); for (int i = 0; i < cat.temp.Count; i++) { if (REmailInput.Text == cat.temp[i].Email) { f = 1; break; } } bool validate = false; if (f == 1) { MessageBox.Show("Email Already Exists"); } else { validate = obj.send_details(obj, Resources.Resource1.FilePathData); } if (validate) { LoginUserControl obj = new LoginUserControl(); this.Hide(); this.Parent.Controls.Add(obj); } }