예제 #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
            });
        }
예제 #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 = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN();
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE();
            }
            else
            {
                m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
                m_dtKhoNhap = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                });
            }

            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);
            //   txtKhonhap.Init(m_dtDataKhoNhap, new List<string>() { TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho });
            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(KIEU_THUOC_VT),
                             new List <string>()
            {
                DmucThuoc.Columns.IdThuoc, DmucThuoc.Columns.MaThuoc, DmucThuoc.Columns.TenThuoc
            });
        }
예제 #3
0
 /// <summary>
 /// hàm thực hiện việc khởi tạo thông tin của Form
 /// </summary>
 private void InitData()
 {
     txtNhacungcap.Init();
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhoThuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN();
     }
     else
     {
         m_dtKhoThuoc = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
     }
     if (m_dtKhoThuoc.Rows.Count > 1)
     {
         txtkhonhap.Init(m_dtKhoThuoc,
                         new List <string>()
         {
             TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
         });
     }
     //DataBinding.BindDataCombobox(cboKhoThuoc, m_dtKhoThuoc,
     //                           TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
     //                           "---Chọn kho---",false);
     else
     {
         //DataBinding.BindDataCombobox(cboKhoThuoc, m_dtKhoThuoc,
         //                       TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Chọn---", true);
         txtkhonhap.Init(m_dtKhoThuoc,
                         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(KIEU_THUOC_VT),
                      new List <string>()
     {
         DmucThuoc.Columns.IdThuoc, DmucThuoc.Columns.MaThuoc, DmucThuoc.Columns.TenThuoc
     });
 }