private void frm_BAOCAO_TONGHOP_TAI_KKB_DTUONG_THUPHI_Load(object sender, EventArgs eventArgs)
 {
     try
     {
         DataBinding.BindDataCombobox(cboDoituongKCB, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                      DmucDoituongkcb.Columns.MaDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "Chọn đối tượng KCB", true);
         DataBinding.BindDataCombobox(cboNhanvien, THU_VIEN_CHUNG.LaydanhsachThunganvien(),
                                      DmucNhanvien.Columns.UserName, DmucNhanvien.Columns.TenNhanvien, "Chọn nhân viên thu ngân", true);
         m_dtKhoathucHien = THU_VIEN_CHUNG.Laydanhmuckhoa("NGOAI", 0);
         DataBinding.BindDataCombobox(cboKhoa, m_dtKhoathucHien,
                                      DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "Chọn khoa KCB", true);
         var query = from khoa in m_dtKhoathucHien.AsEnumerable()
                     where Utility.sDbnull(khoa[DmucKhoaphong.Columns.MaKhoaphong]) == globalVariables.MA_KHOA_THIEN
                     select khoa;
         if (query.Count() > 0)
         {
             cboKhoa.SelectedValue = globalVariables.MA_KHOA_THIEN;
         }
     }
     catch (Exception ex)
     {
         Utility.CatchException("Lỗi khi load chức năng!", ex);
     }
 }
        /// <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)
            {
                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);
            }
        }
 private void LoadKho()
 {
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
         m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_TUTHUOC();
     }
     else
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
         m_dtKhoLinh = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
             "TATCA", "NOITRU"
         });
     }
     DataBinding.BindDataCombobox(cboKhonhan, m_dtKhoLinh,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---Kho nhận---", true);
     DataBinding.BindDataCombobox(cboKhoxuat, m_dtKhoXuat,
                                  TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                  "---Kho xuất---", true);
     m_KhoaLinh = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
     DataBinding.BindDataCombobox(cboKhoalinh, m_KhoaLinh,
                                  DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "--Khoa lĩnh--", true);
 }
Example #4
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;
        }
        private void frm_thongke_danhsachbenhnhanh_sieuam_Load(object sender, EventArgs e)
        {
            try
            {
                DataBinding.BindDataCombobox(cboDoituongKCB, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                             DmucDoituongkcb.Columns.IdDoituongKcb,
                                             DmucDoituongkcb.Columns.TenDoituongKcb,
                                             "Chọn đối tượng KCB", true);
                DataTable m_dtKhoathucHien = THU_VIEN_CHUNG.Laydanhmuckhoa("NGOAI", 0);
                DataBinding.BindDataCombobox(cboKhoa, m_dtKhoathucHien,
                                             DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong,
                                             "Chọn khoa KCB", true);

                EnumerableRowCollection <DataRow> query = from khoa in m_dtKhoathucHien.AsEnumerable()
                                                          where
                                                          Utility.sDbnull(khoa[DmucKhoaphong.Columns.MaKhoaphong]) ==
                                                          globalVariables.MA_KHOA_THIEN
                                                          select khoa;
                if (query.Any())
                {
                    cboKhoa.SelectedValue = globalVariables.MA_KHOA_THIEN;
                }
                dtFromDate.Value = dtToDate.Value = dtNgayInPhieu.Value = DateTime.Now;
                string reportcode = "";
                baocaO_TIEUDE1.TIEUDE = "";
                switch (Args.Substring(0, 2))
                {
                case "SA":
                    reportcode = "baocao_thongkedanhsach_sieuam";
                    break;

                case "XQ":
                    reportcode = "baocao_thongkedanhsach_xquang";
                    break;

                case "DT":
                    reportcode = "baocao_thongkedanhsach_dientim";
                    break;

                case "NS":
                    reportcode = "baocao_thongkedanhsach_noisoi";
                    break;

                case "PTTT":
                    reportcode = "baocao_thongkedanhsach_pttt";
                    break;

                default:
                    reportcode = "baocao_thongkedanhsach_noisoi";
                    break;
                }
                Utility.GetReport(reportcode, ref tieude, ref reportname);
                baocaO_TIEUDE1.TIEUDE = tieude;
                LoaddanhmucCLS();
                // txtdichvu.dtData =
            }
            catch (Exception ex)
            {
                Utility.ShowMsg(ex.Message);
            }
        }
 private void LayDsach_DoituongKCB()
 {
     DataBinding.BindDataCombobox(cboObjectType, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                  DmucDoituongkcb.Columns.IdDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "---Chọn đối tượng KCB---", true);
 }