Example #1
0
        private void btn_cari1_Click(object sender, EventArgs e)
        {
            string nama = tb_nama.Text;
            string type = comboBox1.Text;

            Dokter dokter = Dokter.getByName(nama, type);

            if (tb_nama.Text == "")
            {
                MessageBox.Show("Jangan Kosongkan Nama");
            }

            else if (comboBox1.Text == "")
            {
                MessageBox.Show("Jangan Kosongkan Profesi");
            }

            else if (dokter != null)
            {
                ProfilPsi Psi = new ProfilPsi(dokter);
                Psi.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Tidak ada data, Cari lagi");
                tb_nama.Text = "";
            }
        }
Example #2
0
 private void button3_click(Object sender, EventArgs e)
 {
     if (dataGridView1.SelectedRows.Count > 0)
     {
         Dokter    dokter = dataGridView1.SelectedRows[0].DataBoundItem as Dokter;
         ProfilPsi Psi    = new ProfilPsi(dokter);
         Psi.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Silahkan Pilih Salah Satu ");
     }
 }