private void DisplayData() { try { dataGridView1.DataSource = Akses.Tabel().Gejalas.Select(x => new { x.Id, Gejala = x.DetailGejala }).ToList(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void DisplayData() { try { dataGridView1.DataSource = Akses.Tabel().Penyakits.Select(x => new { x.Id, x.Nama, Detail = x.DetailPenyakit }).ToList(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void DisplayData() { try { dataGridView1.DataSource = Akses.Tabel().Obats. Select(x => new { x.Id, x.Nama, Dosis = x.DosisObat, EfekSamping = x.EfekObat }) .ToList(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void tbCari_TextChanged(object sender, EventArgs e) { dataGridView1.DataSource = Akses.Tabel().Obats .Where(x => x.Nama.Contains(tbCari.Text) || x.DosisObat.Contains(tbCari.Text) || x.EfekObat.Contains(tbCari.Text)) .Select(x => new { x.Id, x.Nama, Dosis = x.DosisObat, EfekSamping = x.EfekObat }).ToList(); }
private void tbCari_TextChanged(object sender, EventArgs e) { dataGridView1.DataSource = Akses.Tabel().Penyakits .Where(x => x.Nama.Contains(tbCari.Text) || x.DetailPenyakit.Contains(tbCari.Text)) .Select(x => new { x.Id, x.Nama, Detail = x.DetailPenyakit }).ToList(); }
private void tbCari_TextChanged(object sender, EventArgs e) { dataGridView1.DataSource = Akses.Tabel().Admins.Where(y => y.Username.Contains(tbCari.Text) || y.Password.Contains(tbCari.Text)).ToList(); }
private void tbCari_TextChanged(object sender, EventArgs e) { dataGridView1.DataSource = Akses.Tabel().Gejalas.Where(x => x.DetailGejala.Contains(tbCari.Text)) .Select(x => new { x.Id, Gejala = x.DetailGejala }).ToList(); }