private void ButtonManajemenUser_Click(object sender, EventArgs e) { this.Hide(); FormUser users = new FormUser(); users.Show(); }
public FormEditUser(string id, string name, string u_name, string psswrd, FormUser frm) { InitializeComponent(); Database db = new Database(); string strconn = db.getString(); MySqlConnection conn = new MySqlConnection(strconn); conn.Open(); string query = "SELECT password FROM user WHERE username = @username"; MySqlCommand cmd = new MySqlCommand(query, conn); cmd.Parameters.AddWithValue("@username", u_name); MySqlDataReader reader = cmd.ExecuteReader(); reader.Read(); password = reader["password"].ToString(); //MessageBox.Show(password); conn.Close(); id_user = id; username = u_name; txtBoxUserEdit.Text = u_name; nama = name; txtBoxNamaLengkapUser.Text = name; frm2 = frm; }
public FormTambahUser(FormUser frm) { InitializeComponent(); frm2 = frm; }