/// <summary> /// load thông tin /// của form hiện tai /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frm_Sochitietvatlieu_Load(object sender, EventArgs e) { if (KIEU_THUOC_VT == "THUOC") { baocaO_TIEUDE1.Init("thuoc_sochitietvatlieu"); } else { baocaO_TIEUDE1.Init("vt_sochitietvatlieu"); } DataBinding.BindData(cboKho, KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE()), TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho); DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema) .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0]; allowChanged = true; cboKho_SelectedIndexChanged(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_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) { 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); }
private void LoadKho() { try { if (KIEU_THUOC_VT == "THUOC") { m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN(); m_dtKhoTraLai = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE(); } else { m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN(); m_dtKhoTraLai = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> { "TATCA", "NGOAITRU", "NOITRU" }); } cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien; DataBinding.BindDataCombobox(cboKhoLinh, m_dtKhoLinh, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho lĩnh---", false); DataBinding.BindDataCombobox(cboKhoTra, m_dtKhoTraLai, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho trả---", false); }catch (Exception exception) { } }
/// <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 }); }
/// <summary> /// hàm thực hiện việc load form hiện tại /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> private void frm_baocao_tonghopthuoc_hangngay_Load(object sender, EventArgs e) { if (kieuthuoc_vt == "THUOC") { baocaO_TIEUDE1.Init("thuoc_baocao_danhsachBenhnhan_linhthuoc"); } else { baocaO_TIEUDE1.Init("vt_baocao_danhsachBenhnhan_linhvt"); } DataBinding.BindDataCombobox(cboDoiTuong, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(), DmucDoituongkcb.Columns.IdDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "---Chọn đối tượng---", false); DataBinding.BindDataCombobox(cboStock, kieuthuoc_vt == "THUOC" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> { "TATCA", "NGOAITRU" }), TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Chọn kho ---", false); m_dtKhoathucHien = THU_VIEN_CHUNG.Laydanhmuckhoa("NGOAI", 0); }
private void frm_phatthuoc_ngoaitru_Load(object sender, EventArgs e) { if (kieuthuoc_vt == "THUOC") { m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE(); } else { m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> { "TATCA", "NGOAITRU" }); } DataBinding.BindData(cboKho, m_dtKhothuoc, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho); dtNgayPhatThuoc.Value = globalVariables.SysDate; TimKiemThongTinDonThuoc(); txtPID.Focus(); txtPID.SelectAll(); }
/// <summary> /// load thông tin /// của form hiện tai /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frm_tonghopphatsinh_nhapxuat_Load(object sender, EventArgs e) { modifyTieude(); txtKho.Init(KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE()), new List <string>() { TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho }); txtKhoXuat.Init(KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE()), new List <string>() { TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho }); //DataBinding.BindData(cboKho, // KieuKho == "ALL" // ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() // : (KieuKho == "CHAN" // ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() // : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE()), TDmucKho.Columns.IdKho, // TDmucKho.Columns.TenKho); DataTable m_dtNhomThuoc = new Select().From(DmucLoaithuoc.Schema) .OrderAsc(DmucLoaithuoc.Columns.SttHthi).ExecuteDataSet().Tables[0]; allowChanged = true; // cboKho_SelectedIndexChanged(cboKho, e); cboThang.SelectedIndex = globalVariables.SysDate.Month - 1; cboKieubangke.SelectedIndex = 0; cboKieutonghop.SelectedIndex = 0; }
private void frm_PhieuTraLai_Kho_Load(object sender, EventArgs e) { CauHinh(); cmdCauHinh.Visible = globalVariables.IsAdmin; if (KIEU_THUOC_VT == "THUOC") { m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN(); m_dtKhoTraLai = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE(); } else { m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN(); m_dtKhoTraLai = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> { "TATCA", "NGOAITRU", "NOITRU" }); } DataBinding.BindDataCombobox(cboKhoTra, m_dtKhoTraLai, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho trả lại---", false); DataBinding.BindDataCombobox(cboKhoLinh, m_dtKhoLinh, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "----Kho lĩnh", false); TimKiemThongTinDonThuoc(); b_Hasloaded = 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_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> /// load thông tin /// của form hiện tai /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frm_baocao_tonkho_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" })); } 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); }
/// <summary> /// load thông tin /// của form hiện tai /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void frm_baocao_phanungnang_sautiemchung_Load(object sender, EventArgs e) { DataTable dtkho = null; txtGioitinh.Init(); if (KIEU_THUOC_VT.Contains("THUOC")) { baocaO_TIEUDE1.Init("vacxin_baocao_phanungnang_sautiemchung"); dtkho = KieuKho == "ALL" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA() : (KieuKho == "CHAN" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE()); } else { baocaO_TIEUDE1.Init("vacxin_baocao_phanungnang_sautiemchung"); 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; }