Exemplo n.º 1
0
        private void LoadKho()
        {
            if (KIEU_THUOC_VT == "THUOC")
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
                m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_TUTHUOC();
            }
            else
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
                m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NOITRU"
                });
            }
            DataBinding.BindDataCombobox(cboKhonhan, m_dtKhoLinh,
                                         TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                         "---Kho nhận---", true);
            cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien;

            DataBinding.BindDataCombobox(cboKhoxuat, m_dtKhoXuat,
                                         TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                         "---Kho xuất---", true);

            DataBinding.BindDataCombobox(cboKhoalinh, m_KhoaLinh,
                                         DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "--Khoa lĩnh--", true);
        }
        private void LoadKho()
        {
            if (KIEU_THUOC_VT == "THUOC")
            {
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
                m_dtKhoTra  = CommonLoadDuoc.LAYTHONGTIN_TUTHUOC();
            }
            else
            {
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
                m_dtKhoTra  = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE_TUTRUC();//new List<string> { "TATCA", "NOITRU" });
            }

            //m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE();
            //m_dtKhoTra = m_dtKhoNhap.Copy();

            cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien;
            DataBinding.BindDataCombobox(cboKhoNhap, m_dtKhoNhap,
                                         TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho nhập---", false);
            DataBinding.BindDataCombobox(cboKhoaTra, m_KhoaTra,
                                         DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong,
                                         "---Khoa trả---", false);
        }
 /// <summary>
 /// hàm thực hiện việc khởi tạo thông tin của Form
 /// </summary>
 private void InitData()
 {
     m_KhoaLinh = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhoNhan = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
         m_dtKhoTra  = CommonLoadDuoc.LAYTHONGTIN_TUTHUOC();
     }
     else
     {
         m_dtKhoNhan = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
         m_dtKhoTra  = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
             "TATCA", "NOITRU"
         });
     }
     DataBinding.BindDataCombobox(cboKhoNhan, m_dtKhoNhan,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---kho nhận---", true);
     DataBinding.BindDataCombobox(cboKhoaLinh, m_KhoaLinh,
                                  DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong,
                                  "---Khoa trả---", true);
     b_Hasloaded = true;
 }
Exemplo n.º 4
0
 private void LoadKho()
 {
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
         m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_TUTHUOC();
     }
     else
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
         m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
             "TATCA", "NOITRU"
         });
     }
     DataBinding.BindDataCombobox(cboKhonhan, m_dtKhoLinh,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---Kho nhận---", true);
     DataBinding.BindDataCombobox(cboKhoxuat, m_dtKhoXuat,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---Kho xuất---", true);
     m_KhoaLinh = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
     DataBinding.BindDataCombobox(cboKhoalinh, m_KhoaLinh,
                                  DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "--Khoa lĩnh--", true);
 }