예제 #1
0
        private void ButtonManajemenUser_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormUser users = new FormUser();

            users.Show();
        }
예제 #2
0
        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;
        }
예제 #3
0
 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;
 }
예제 #4
0
 public FormTambahUser(FormUser frm)
 {
     InitializeComponent();
     frm2 = frm;
 }
예제 #5
0
 private void ButtonManajemenUser_Click(object sender, EventArgs e)
 {
     this.Hide();
     FormUser users = new FormUser();
     users.Show();
 }
예제 #6
0
 public FormTambahUser(FormUser frm)
 {
     InitializeComponent();
     frm2 = frm;
 }