private void goToDetailPage(object sender, ItemClickEventArgs e) { LaporanKriminalitas selected = (LaporanKriminalitas)e.ClickedItem; ReportDetailPageParams param = new ReportDetailPageParams(selected.id_user_pelapor, selected.nama_user_pelapor, selected.id_laporan, selected.alamat_laporan, selected.tanggal_laporan, selected.waktu_laporan, selected.judul_laporan, selected.jenis_kejadian, selected.deskripsi_kejadian, selected.lat_laporan, selected.lng_laporan, "kriminalitas", selected.thumbnail_gambar, selected.status_laporan, selected.jumlah_konfirmasi); session.setReportDetailPageParams(param); this.Frame.Navigate(typeof(ReportDetailPage)); }
private void goToDetailPage(object sender, ItemClickEventArgs e) { LaporanLostFound selected = (LaporanLostFound)e.ClickedItem; string jenis_laporan = selected.jenis_laporan == 0 ? "Penemuan " + selected.jenis_barang : "Kehilangan " + selected.jenis_barang; ReportDetailPageParams param = new ReportDetailPageParams(selected.id_user_pelapor, selected.nama_user_pelapor, selected.id_laporan, selected.alamat_laporan, selected.tanggal_laporan, selected.waktu_laporan, selected.judul_laporan, jenis_laporan, selected.deskripsi_barang, selected.lat_laporan, selected.lng_laporan, "lostfound", selected.thumbnail_gambar, selected.status_laporan, null); session.setReportDetailPageParams(param); this.Frame.Navigate(typeof(ReportDetailPage)); }
private void pageLoaded(object sender, RoutedEventArgs e) { param = session.getReportDetailPageParams(); userLogin = session.getUserLogin(); string type = ""; if (param.tag == "kriminalitas") { txtJumlahKonfirmasiLaporan.Text = param.jumlah_konfirmasi.ToString(); checkKonfirmasiLaporan(); } else { btnKonfirmasi.Visibility = Visibility.Collapsed; type = param.tag == "Penemuan barang" ? "0":"1"; stackKonfirmasiLaporan.Visibility = Visibility.Collapsed; } if ((userLogin.id_user == param.id_user_pelapor) || (userLogin.status_user == 2)) { btnChatPage.Visibility = Visibility.Collapsed; btnKonfirmasi.Visibility = Visibility.Collapsed; } if (param.status_laporan == 0) { txtStatusLaporan.Text = "Belum diverifikasi"; txtStatusLaporan.Foreground = new SolidColorBrush(Colors.Red); btnShare.Visibility = Visibility.Collapsed; stackComment.Visibility = Visibility.Collapsed; } else { txtStatusLaporan.Text = "Sudah diverifikasi"; txtStatusLaporan.Foreground = new SolidColorBrush(Colors.Green); } imageLaporan.Source = new BitmapImage(new Uri(session.getUrlGambarLaporan() + param.thumbnail_gambar)); txtNamaPengguna.Text = param.nama_user_pelapor; txtTanggalUpload.Text = param.tanggal_laporan + " Pukul " + param.waktu_laporan; txtDeskripsiLaporan.Text = param.deskripsi_laporan; txtJudulLaporan.Text = param.judul_laporan; txtAlamatLaporan.Text = param.alamat_laporan; txtJenisLaporan.Text = param.jenis_laporan; loadKomentarLaporan(); webVieMapLokasi.Navigate(new Uri(session.getUrlWebView() + "location-map.php?lat=" + param.lat_laporan + "&lng=" + param.lng_laporan + "&type=" + type)); }
public void goToDetailPage(object sender, ItemClickEventArgs e) { string tag = (sender as ListView).Tag.ToString(); if (tag == "lvKriminalitas") { LaporanKriminalitas selected = (LaporanKriminalitas)e.ClickedItem; ReportDetailPageParams param = new ReportDetailPageParams(selected.id_user_pelapor, selected.nama_user_pelapor, selected.id_laporan, selected.alamat_laporan, selected.tanggal_laporan, selected.waktu_laporan, selected.judul_laporan, selected.jenis_kejadian, selected.deskripsi_kejadian, selected.lat_laporan, selected.lng_laporan, "kriminalitas", selected.thumbnail_gambar, selected.status_laporan, selected.jumlah_konfirmasi); session.setReportDetailPageParams(param); } else if (tag == "lvLostFound") { LaporanLostFound selected = (LaporanLostFound)e.ClickedItem; string jenis_laporan = selected.jenis_laporan == 0 ? "Penemuan " + selected.jenis_barang : "Kehilangan " + selected.jenis_barang; ReportDetailPageParams param = new ReportDetailPageParams(selected.id_user_pelapor, selected.nama_user_pelapor, selected.id_laporan, selected.alamat_laporan, selected.tanggal_laporan, selected.waktu_laporan, selected.judul_laporan, jenis_laporan, selected.deskripsi_barang, selected.lat_laporan, selected.lng_laporan, "lostfound", selected.thumbnail_gambar, selected.status_laporan, null); session.setReportDetailPageParams(param); } this.Frame.Navigate(typeof(ReportDetailPage)); }