Esempio n. 1
0
 private void frm_ChotcapphatThuoc_ngoaitru_Load(object sender, EventArgs e)
 {
     DataBinding.BindDataCombobox(cboObjectType, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                  DmucDoituongkcb.Columns.MaDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "---Chọn---", true);
     if (kieuthuoc_vt == "THUOC")
     {
         m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NGOAITRU();
     }
     else
     {
         m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
             "NGOAITRU"
         });
     }
     DataBinding.BindData(cboKho, m_dtKhothuoc,
                          TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
     TimKiemThongTinDonThuoc();
     ModifyCommand();
     CauHinh();
 }
Esempio n. 2
0
        /// <summary>
        /// hàm thực hiện việc khởi tạo thông tin của Form
        /// </summary>
        private void InitData()
        {
            if (KIEU_THUOC_VT == "THUOC")
            {
                m_dtKhoXuat = Noitru ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NGOAITRU();
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_AO(Noitru);
            }
            else
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                });
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_AO(Noitru);
            }

            if (m_dtKhoXuat.Rows.Count > 1)
            {
                DataBinding.BindDataCombobox(cboKhoXuat, m_dtKhoXuat,
                                             TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                             "---Kho xuất---", false);
            }
            else
            {
                DataBinding.BindDataCombobox(cboKhoXuat, m_dtKhoXuat,
                                             TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Chọn---", true);
            }
            DataBinding.BindDataCombobox(cboKhoNhap, m_dtKhoNhap,
                                         TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                         "---Kho nhập---", false);
        }