예제 #1
0
        private void lbHome_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmAdminHome y = new frmAdminHome();

            this.Hide();
            y.Show();
        }
예제 #2
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtName.Text == "" || txtPassword.Text == "")
     {
         MessageBox.Show("Incomplete information");
     }
     else
     {
         bool valid  = false;
         bool validS = false;
         localhost.Service1 server = new localhost.Service1();
         server.isValidAdmin(txtName.Text, txtPassword.Text, out valid, out validS);
         if (valid)
         {
             MessageBox.Show("Welcome!");
             frmAdminHome h = new frmAdminHome();
             this.Close();
             h.Show();
         }
         else
         {
             MessageBox.Show("wrong username or password!");
         }
     }
 }