private void cmdLogIn_Click(object sender, EventArgs e) { CSE_DEPTDataSetTableAdapters.LogInTableAdapter LogInTableApt = new CSE_DEPTDataSetTableAdapters.LogInTableAdapter(); LogInTableApt.ClearBeforeFill = true; LogInTableApt.FillByUsernamePassword(ds.LogIn, txtUserName.Text, txtPassWord.Text); if (ds.LogIn.Count == 0) { MessageBox.Show("No matched username/password found!",this.Text,MessageBoxButtons.OK,MessageBoxIcon.Exclamation); txtUserName.Clear(); txtUserName.Focus(); txtPassWord.Clear(); } else { selForm.Show(); this.Hide(); } }
private void cmdLogIn_Click(object sender, EventArgs e) { CSE_DEPTDataSetTableAdapters.LogInTableAdapter LogInTableApt = new CSE_DEPTDataSetTableAdapters.LogInTableAdapter(); LogInTableApt.ClearBeforeFill = true; LogInTableApt.FillByUsernamePassword(ds.LogIn, txtUserName.Text, txtPassWord.Text); if (ds.LogIn.Count == 0) { MessageBox.Show("No matched username/password found!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtUserName.Clear(); txtUserName.Focus(); txtPassWord.Clear(); } else { selForm.Show(); this.Hide(); } }