private void button4_Click(object sender, EventArgs e) { String username = this.input1.Text; String password = this.input2.Text; String domain = this.input4.Text; String upn = username + "@" + domain; check cek = new check(); UserDisco ud = new UserDisco(); String check = cek.InputNullCheck(username, password, domain); if (check.Equals("noError")) { bool auth = cek.Authenticate(username, password, domain); if (auth == false) { this.outputbox.Text = "Authentication Failed"; } else { this.outputbox.Text = ud.LocMachineNamedUser(upn); } } else { this.outputbox.Text = check; } }
private void button2_Click(object sender, EventArgs e) { String username = this.input1.Text; String password = this.input2.Text; String domain = this.input4.Text; check cek = new check(); UserDisco ud = new UserDisco(); String check = cek.InputNullCheck(username, password, domain); if (check.Equals("noError")) { bool auth = cek.Authenticate(username, password, domain); if (auth == false) { this.outputbox.Text = "Authentication Failed"; } else { this.outputbox.Text = ud.ADGroupMembership(domain, username, password); } } else { this.outputbox.Text = check; } }