Esempio n. 1
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 (KieuThuocVt == "THUOC")
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOXUATTHUOC_XAHUYEN();
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_XAHUYEN();
            }
            else
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOXUATTHUOC_XAHUYEN();
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOVT_XAHUYEN();
            }

            if (m_dtKhoXuat.Rows.Count > 1)
            {
                txtKhoxuat.Init(m_dtKhoXuat, new List <string>()
                {
                    TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
                });
            }
            //DataBinding.BindDataCombobox(cboKhoXuat, m_dtKhoXuat,
            //                       TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
            //                       "---Kho xuất---",false);
            else
            {
                txtKhoxuat.Init(m_dtKhoXuat, new List <string>()
                {
                    TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
                });
            }
            //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);
            txtKhoNhap.Init(m_dtKhoNhap, new List <string>()
            {
                TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
            });
            //DataBinding.BindDataCombobox(cboKhoNhap, m_dtKhoNhap,
            //                          TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
            //                          "---Kho nhập---",false);
            txtNhanvien.Init(CommonLoadDuoc.LAYTHONGTIN_NHANVIEN());
            txtTenthuoc.Init(CommonLoadDuoc.LayThongTinThuoc(KieuThuocVt),
                             new List <string>()
            {
                DmucThuoc.Columns.IdThuoc, DmucThuoc.Columns.MaThuoc, DmucThuoc.Columns.TenThuoc
            });
        }