예제 #1
0
        private void lbMainPage_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            frmUserStores t = new frmUserStores();

            this.Close();
            t.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.validUser(txtName.Text, txtPassword.Text, out valid, out validS);
         if (valid)
         {
             MessageBox.Show("Welcome!");
             frmUserStores temp = new frmUserStores();
             temp.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("wrong username or password!");
         }
     }
 }