void InitData()
 {
     try
     {
         DataTable m_dtLoaithuoc = new Select().From(DmucLoaithuoc.Schema).
             Where(DmucLoaithuoc.Columns.KieuThuocvattu).IsEqualTo(Kieuthuoc_vt)
             .ExecuteDataSet().Tables[0];
         DataTable m_dtLoaithuoc_new = m_dtLoaithuoc.Clone();
         if (globalVariables.gv_dtQuyenNhanvien_Dmuc.Select(QheNhanvienDanhmuc.Columns.Loai + "= 1").Length <= 0)
             m_dtLoaithuoc_new = m_dtLoaithuoc.Copy();
         else
         {
             foreach (DataRow dr in m_dtLoaithuoc.Rows)
             {
                 if (Utility.CoquyenTruycapDanhmuc(Utility.sDbnull(dr[DmucLoaithuoc.Columns.IdLoaithuoc]), "1"))
                 {
                     m_dtLoaithuoc_new.ImportRow(dr);
                 }
             }
         }
         DataBinding.BindDataCombobox(cboloaithuoc, m_dtLoaithuoc_new, DmucLoaithuoc.Columns.IdLoaithuoc, DmucLoaithuoc.Columns.TenLoaithuoc, "Chọn", false);
         dt_KhoaThucHien = THU_VIEN_CHUNG.Laydanhmuckhoa("NGOAI", 0);
         DataBinding.BindDataCombobox_Basic(cboKhoaTH, dt_KhoaThucHien, DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong);
         Laydanhmucthuoc();
     }
     catch (Exception)
     {
         Utility.ShowMsg("Có lỗi trong quá trình lấy thông tin khoa");
     }
 }
        private void AutocompleteLoaithuoc()
        {
            DataTable dtLoaithuoc = null;
            dtLoaithuoc = new Select().From(DmucLoaithuoc.Schema)
             .Where(DmucLoaithuoc.KieuThuocvattuColumn).IsEqualTo(txtKieuthuocVT.myCode)
             .ExecuteDataSet().Tables[0];
            if (dtLoaithuoc == null) return;
            if (!dtLoaithuoc.Columns.Contains("ShortCut"))
                dtLoaithuoc.Columns.Add(new DataColumn("ShortCut", typeof(string)));
            DataTable m_dtLoaithuoc_new = dtLoaithuoc.Clone();
            if (globalVariables.gv_dtQuyenNhanvien_Dmuc.Select(QheNhanvienDanhmuc.Columns.Loai + "= 1").Length <= 0)
                m_dtLoaithuoc_new = dtLoaithuoc.Copy();
            else
            {

                foreach (DataRow dr in dtLoaithuoc.Rows)
                {
                    if (Utility.CoquyenTruycapDanhmuc(Utility.sDbnull(dr[DmucLoaithuoc.Columns.IdLoaithuoc]), "1"))
                    {
                        m_dtLoaithuoc_new.ImportRow(dr);
                    }
                }
            }
            txtLoaithuoc.Init(m_dtLoaithuoc_new, new List<string>() { DmucLoaithuoc.Columns.IdLoaithuoc, DmucLoaithuoc.Columns.MaLoaithuoc, DmucLoaithuoc.Columns.TenLoaithuoc });
        }