private void listBoxDr_SelectedIndexChanged(object sender, EventArgs e) { // Tıklanan doktorun randevularını getir.7 Doktor secilenDr = (Doktor)listBoxDr.SelectedItem; listViewDr.Items.Clear(); RandevuServis.DoktorunTumRandevulariniGetir(secilenDr, listViewDr); }
private void comboBoxDrSeciniz_SelectedIndexChanged(object sender, EventArgs e) { Doktor secilenDr = (Doktor)comboBoxDrSeciniz.SelectedItem; listViewDktr.Items.Clear(); RandevuServis.DoktorunTumRandevulariniGetir(secilenDr, listViewDktr); Form frm = printPreviewDialog1 as Form; printPreviewDialog1.Document = printDocument1; // Start maximized. frm.WindowState = FormWindowState.Maximized; // Start at 100% scale. printPreviewDialog1.PrintPreviewControl.Zoom = 1.0; // Display. if (secilenDr.DrRandevulari.Count > 0) { printPreviewDialog1.ShowDialog(); } }