Beispiel #1
0
        private void btnPilihUser_Click(object sender, RoutedEventArgs e)
        {
            if (pilihuser)
            {
                userlama = user_id;
            }
            PilihUser pu = new PilihUser();

            pu.ShowDialog();
            user_id              = pu.id;
            user_username        = pu.username;
            user_nama            = pu.nama;
            user_tanggal_lahir   = pu.tanggal_lahir;
            user_no_telp         = pu.no_telp;
            lblUsername.Text     = user_username.ToString();
            lblNama.Text         = user_nama.ToString();
            lblTanggalLahir.Text = user_tanggal_lahir.ToString();
            lblNoTelp.Text       = user_no_telp.ToString();
            if (userlama == user_id)
            {
                pilihuser = true;
                loadDataBuku(null);
            }
            else
            {
                pilihuser = false;
                loadDataBuku(null);
            }
            dgvBuku_Loaded(sender, e);
            dgvPilih_Loaded(sender, e);
            pilihuser = true;
        }
Beispiel #2
0
        private void cari()
        {
            //dUser = new DataTable();
            //OracleCommand cmd = new OracleCommand();
            //da = new OracleDataAdapter();
            //int cekprem = 0;
            //cmd.Connection = conn;
            //cmd.CommandText = $"select id as " + '"' + "No" + '"' + ", username as " + '"' + "Username" + '"' + "," +
            //        "nama as " + '"' + "Nama" + '"' + ", to_char(tanggal_lahir, 'dd/MM/yyyy') as " + '"' + "Tanggal Lahir" + '"' + ", no_telp as " + '"' + "No Telp" + '"' + "from users";
            //string comm = " where";
            //string keyword = Convert.ToString(tbKeyword.Text);
            //string berdasarkan = "username";

            //if (rbUsername.IsChecked == true)
            //{
            //    berdasarkan = "username";
            //}
            //else if (rbNamaLengkap.IsChecked == true)
            //{
            //    berdasarkan = "nama";
            //}
            //comm += $" upper({berdasarkan}) like upper('%{keyword}%')";


            //comm += $" order by ID";
            //cmd.CommandText += comm;
            //Console.WriteLine(cmd.CommandText);
            //conn.Close();
            //conn.Open();
            //cmd.ExecuteReader();
            //da.SelectCommand = cmd;
            //da.Fill(dUser);
            //dgvUser.ItemsSource = dUser.DefaultView;
            //conn.Close();
            PilihUser pu = new PilihUser();

            pu.ShowDialog();
            clear();
            user_id              = pu.id;
            user_username        = pu.username;
            user_password        = pu.password;
            user_nama            = pu.nama;
            user_tanggal_lahir   = pu.tanggal_lahir;
            user_no_telp         = pu.no_telp;
            lblUsername.Text     = user_username.ToString();
            lblNama.Text         = user_nama.ToString();
            lblTanggalLahir.Text = user_tanggal_lahir.ToString();
            lblNoTelp.Text       = user_no_telp.ToString();
            iduser = user_id;
        }
        private void btnPilihUser_Click(object sender, RoutedEventArgs e)
        {
            PilihUser pu = new PilihUser();

            pu.ShowDialog();
            //clear();
            user_id              = pu.id;
            user_username        = pu.username;
            user_password        = pu.password;
            user_nama            = pu.nama;
            user_tanggal_lahir   = pu.tanggal_lahir;
            user_no_telp         = pu.no_telp;
            lblUsername.Text     = user_username.ToString();
            lblNama.Text         = user_nama.ToString();
            lblTanggalLahir.Text = user_tanggal_lahir.ToString();
            lblNoTelp.Text       = user_no_telp.ToString();
            dgvPremium_Loaded(sender, e);
        }
Beispiel #4
0
        private void cari()
        {
            PilihUser pu = new PilihUser();

            pu.ShowDialog();
            clear();
            user_id              = pu.id;
            user_username        = pu.username;
            user_password        = pu.password;
            user_nama            = pu.nama;
            user_tanggal_lahir   = pu.tanggal_lahir;
            user_no_telp         = pu.no_telp;
            lblUsername.Text     = user_username.ToString();
            lblNama.Text         = user_nama.ToString();
            lblTanggalLahir.Text = user_tanggal_lahir.ToString();
            lblNoTelp.Text       = user_no_telp.ToString();
            iduser = user_id;
        }