Exemplo n.º 1
0
        private void button_MouseCliked(object sender, EventArgs e)
        {
            Guna.UI2.WinForms.Guna2Button bt = (Guna.UI2.WinForms.Guna2Button)sender;
            var _filter = bt.Tag.ToString();

            var dh = new dataset.yakkumdbTableAdapters.fa_rx_templateTableAdapter();

            dh.FillByNamaJEnis(yakkumdb.fa_rx_template, _filter, "Diagnosa");
            DataTable dt = dh.GetDataByNamaJenis(_filter, "Diagnosa");

            foreach (DataRow r in dt.Rows)
            {
                DataGridViewRow row = (DataGridViewRow)dgvDiagnosa.Rows[0].Clone();
                row.Cells[1].Value = r["icd_code"].ToString();
                row.Cells[2].Value = r["icd_desc"].ToString();
                dgvDiagnosa.Rows.Add(row);
            }

            dh.FillByNamaJEnis(yakkumdb.fa_rx_template, _filter, "Prosedur");
            DataTable dt2 = dh.GetDataByNamaJenis(_filter, "Prosedur");

            foreach (DataRow r in dt2.Rows)
            {
                DataGridViewRow row2 = (DataGridViewRow)dgvProcedure.Rows[0].Clone();
                row2.Cells[1].Value = r["icd_code"].ToString();
                row2.Cells[2].Value = r["icd_desc"].ToString();
                dgvProcedure.Rows.Add(row2);
            }
        }