private void btnclogin_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(tbcloginnm.Text)) { MessageBox.Show("Please enter UserName!"); } else if (String.IsNullOrEmpty(tbcloginpass.Text)) { MessageBox.Show("Please enter Password!"); } else if (userlogin(tbcloginnm.Text, tbcloginpass.Text)) { username = tbcloginnm.Text; password = tbcloginpass.Text; this.Visible = false; noticef c = new noticef(); c.ShowDialog(); this.Close(); } else { MessageBox.Show("Username or Password incorrect"); } Database.ClearTable(); }
private void btnsignup_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(tbsignupnm.Text) || String.IsNullOrEmpty(tbsignupeml.Text) || String.IsNullOrEmpty(tbsignupnmbr.Text) || String.IsNullOrEmpty(tbsignuppass.Text)) { MessageBox.Show("All fields are not filled"); } else { usersignup(tbsignupnm.Text, tbsignupeml.Text, tbsignupnmbr.Text, tbsignuppass.Text); this.Visible = false; noticef a = new noticef(); a.ShowDialog(); this.Close(); } }