private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { frmaddfood f = new frmaddfood(); this.Hide(); f.Show(); }
private void cmdLogin_Click(object sender, EventArgs e) { localhost.Service1 s = new localhost.Service1(); bool Adminisvalid, Adminisvalidpassed; s.Adminisvalid(txtusername.Text, txtpassword.Text, out Adminisvalid, out Adminisvalidpassed); if (Adminisvalid) { MessageBox.Show("Valid admin"); frmaddfood l = new frmaddfood(); this.Hide(); l.Show(); } else { MessageBox.Show("inValid admin"); } }