public static EmployeeHome getInstance() { if (l == null) { l = new EmployeeHome(); l.Show(); return(l); } else { return(l); } }
private void cmdLogin_Click(object sender, EventArgs e) { Server.Service1 server = new Server.Service1(); Boolean isvalid = false; Boolean isvalidpassed = false; //server.valid(txtUserName.Text, txtPassword.Text, out isvalid, out isvalidpassed); if (!isvalid) { EmployeeHome l = EmployeeHome.getInstance(); l.Show(); this.Hide(); MessageBox.Show("valid"); } else { MessageBox.Show("invalid"); } }