Beispiel #1
0
        private void LoadData()
        {
            dtBN = bnDAO.getBenhNhan().Tables[0];
            if (dtBN.Rows.Count <= 0)
            {
                return;
            }

            cmbBenhNhan.Items.Clear();
            cmbBenhNhan.DataSource    = dtBN;
            cmbBenhNhan.DisplayMember = "TenKhachHang";
            cmbBenhNhan.ValueMember   = "MaKH";

            dtLoaiThuoc = ltDAO.getLoaiThuoc().Tables[0];

            cmbLoaiThuoc.Items.Clear();
            cmbLoaiThuoc.DataSource    = dtLoaiThuoc;
            cmbLoaiThuoc.ValueMember   = "MaLoaiThuoc";
            cmbLoaiThuoc.DisplayMember = "TenLoaiThuoc";
        }
Beispiel #2
0
        private void LoadData()
        {
            btnHuy.Enabled    = false;
            btnLuu.Enabled    = false;
            btnSua.Enabled    = true;
            btnThem.Enabled   = true;
            btnReload.Enabled = true;

            txtTenBenhNhan.Enabled  = false;
            txtCMND.Enabled         = false;
            txtQueQuan.Enabled      = false;
            dateTimePicker1.Enabled = false;
            txtSDT.Enabled          = false;

            comboBox1.Items.Clear();
            comboBox1.Items.Add("Nam");
            comboBox1.Items.Add("Nữ");
            comboBox1.Items.Add("Khác");
            comboBox1.SelectedIndex = 0;

            dataGridView1.DataSource = bn.getBenhNhan().Tables[0];
        }