public void getCart(PrincipalMenu data, int empID, string name) { principalmenu = data; employeeID = empID; employeeName = name; labelEmpName.Text = name; labelEmpID.Text = empID.ToString(); }
private void button1_Click(object sender, EventArgs e) { Database a = new Database(); string username = a.authUser(IDuser.Text, Clave.Text); PrincipalMenu m = new PrincipalMenu(); sendValue sendValue = new sendValue(m.receiveData); if (username != null) { sendValue(username, IDuser.Text, this); m.Show(); this.Visible = false; } else { MessageBox.Show("El usuario o la contraseña son incorrectas."); } }