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();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }