/// <summary>
        /// load thông tin
        /// của form hiện tai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_baocao_nhapxuaton_Load(object sender, EventArgs e)
        {
            DataTable dtkho = null;

            if (KIEU_THUOC_VT == "THUOC")
            {
                baocaO_TIEUDE1.Init("thuoc_baocao_nhapxuatton_khochan");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE());
            }
            else
            {
                baocaO_TIEUDE1.Init("vt_baocao_nhapxuatton_khochan");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                }));
            }
            txtKho.Init(dtkho, new List <string>()
            {
                TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
            });
            //    DataBinding.BindData(cboKho, dtkho, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
            DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema).Where(DmucLoaithuoc.Columns.KieuThuocvattu).IsEqualTo(KIEU_THUOC_VT)
                                      .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0];

            allowChanged = true;

            cboKho_SelectedIndexChanged(cboKho, e);
        }
Пример #2
0
        /// <summary>
        /// load thông tin
        /// của form hiện tai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_baocao_nhapxuathuoc_Load(object sender, EventArgs e)
        {
            DataTable dtkho = null;

            modifyTieude();

            if (KIEU_THUOC_VT == "THUOC")
            {
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE());
            }
            else
            {
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                }));
            }
            cboKho.DropDownDataSource    = dtkho;
            cboKho.DropDownDataMember    = TDmucKho.Columns.IdKho;
            cboKho.DropDownDisplayMember = TDmucKho.Columns.TenKho;
            cboKho.DropDownValueMember   = TDmucKho.Columns.IdKho;

            //DataBinding.BindData(cboKho, dtkho, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
            DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema).Where(DmucLoaithuoc.Columns.KieuThuocvattu).IsEqualTo(KIEU_THUOC_VT)
                                      .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0];

            allowChanged = true;
            cboKho_CheckedValuesChanged(cboKho, e);
            cboThang.SelectedIndex = globalVariables.SysDate.Month - 1;
        }
 /// <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_TATCA();
     }
     else
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA();
     }
     DataBinding.BindDataCombobox(cboKhohuy, m_dtKhoXuat,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---Kho thanh lý---", true);
 }
Пример #4
0
 private void InitData()
 {
     DataBinding.BindDataCombobox(cboNhanVien, CommonLoadDuoc.LAYTHONGTIN_NHANVIEN(),
                                  DmucNhanvien.Columns.IdNhanvien, DmucNhanvien.Columns.TenNhanvien, "---Nhân viên---", false);
     cboNhanVien.Enabled = false;
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhohuy = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA();
     }
     else
     {
         m_dtKhohuy = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA();
     }
     cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien;
     DataBinding.BindDataCombobox(cboKhohuy, m_dtKhohuy,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho nhập---", false);
 }
Пример #5
0
        private void frm_baocao_tonthuoc_trongkho_Load(object sender, EventArgs e)
        {
            if (KIEU_THUOC_VT.Contains("THUOC"))
            {
                dt_KhoThuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA();
                baocaO_TIEUDE1.Init("thuoc_baocaothuocton_theokho");
            }
            else
            {
                dt_KhoThuoc = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA();
                baocaO_TIEUDE1.Init("vt_baocaovtton_theokho");
            }

            cboKhoThuoc.DropDownDataSource    = dt_KhoThuoc;
            cboKhoThuoc.DropDownDataMember    = TDmucKho.Columns.IdKho;
            cboKhoThuoc.DropDownDisplayMember = TDmucKho.Columns.TenKho;
            cboKhoThuoc.DropDownValueMember   = TDmucKho.Columns.IdKho;
            AutocompleteLoaithuoc();
            AutocompleteThuoc();
        }
        /// <summary>
        /// load thông tin
        /// của form hiện tai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_baocao_phanungthongthuong_sautiemchung_Load(object sender, EventArgs e)
        {
            DataTable dtkho = null;

            if (KIEU_THUOC_VT.Contains("THUOC"))
            {
                baocaO_TIEUDE1.Init("vacxin_baocao_phanungthongthuong_sautiemchung");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE());
            }
            else
            {
                baocaO_TIEUDE1.Init("vt_baocao_tinhinhsudungvacxin");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                }));
            }
            DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema).Where(DmucLoaithuoc.Columns.KieuThuocvattu).IsEqualTo(KIEU_THUOC_VT)
                                      .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0];

            allowChanged = true;
        }
        /// <summary>
        /// load thông tin
        /// của form hiện tai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_baocao_xuatthuoc_khoanoitru_Load(object sender, EventArgs e)
        {
            DataTable dtkho = null;

            if (KIEU_THUOC_VT == "THUOC")
            {
                baocaO_TIEUDE1.Init("thuoc_baocao_xuatthuocnoitru");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE());
            }
            else
            {
                baocaO_TIEUDE1.Init("thuoc_baocao_xuatthuocnoitru");
                dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                    "TATCA", "NGOAITRU", "NOITRU"
                }));
            }

            cboKho.DropDownDataSource    = dtkho;
            cboKho.DropDownDataMember    = TDmucKho.Columns.IdKho;
            cboKho.DropDownDisplayMember = TDmucKho.Columns.TenKho;
            cboKho.DropDownValueMember   = TDmucKho.Columns.IdKho;
            DataTable dtKhoaNoitru = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);

            cboKhoalinh.DropDownDataSource    = dtKhoaNoitru;
            cboKhoalinh.DropDownDataMember    = DmucKhoaphong.Columns.IdKhoaphong;
            cboKhoalinh.DropDownDisplayMember = DmucKhoaphong.Columns.TenKhoaphong;
            cboKhoalinh.DropDownValueMember   = DmucKhoaphong.Columns.IdKhoaphong;
            //DataBinding.BindData(cboKho, dtkho, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
            DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema).Where(DmucLoaithuoc.Columns.KieuThuocvattu).IsEqualTo(KIEU_THUOC_VT)
                                      .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0];

            allowChanged = true;
            cboKho_CheckedValuesChanged(cboKho, e);
            cboKhoalinh_CheckedValuesChanged(cboKhoalinh, e);
            cboThang.SelectedIndex = globalVariables.SysDate.Month - 1;
        }
Пример #8
0
 /// <summary>
 /// load thông tin
 /// của form hiện tai
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frm_baocao_thanhlythuoc_Load(object sender, EventArgs e)
 {
     if (KIEU_THUOC_VT == "THUOC")
     {
         baocaO_TIEUDE1.Init("thuoc_baocao_thanhly");
     }
     else
     {
         baocaO_TIEUDE1.Init("vt_baocao_thanhly");
     }
     txtLydothanhly.Init();
     DataBinding.BindDataCombobox(cboKho, KIEU_THUOC_VT == "THUOC" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA(), TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "Chọn kho thanh lý", true);
     AutocompleteThuoc();
 }
Пример #9
0
 /// <summary>
 /// load thông tin
 /// của form hiện tai
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frm_baocao_tranhacungcap_Load(object sender, EventArgs e)
 {
     if (KIEU_THUOC_VT == "THUOC")
     {
         baocaO_TIEUDE1.Init("thuoc_baocaotrathuocnhacungcap");
     }
     else
     {
         baocaO_TIEUDE1.Init("vt_baocaotravtnhacungcap");
     }
     txtLydohuy.Init();
     txtNhacungcap.Init();
     DataBinding.BindData(cboKho, KIEU_THUOC_VT == "THUOC" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_TATCA(), TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
     AutocompleteThuoc();
 }