Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        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);
            cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien;

            DataBinding.BindDataCombobox(cboKhoxuat, m_dtKhoXuat,
                                         TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                         "---Kho xuất---", true);

            DataBinding.BindDataCombobox(cboKhoalinh, m_KhoaLinh,
                                         DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "--Khoa lĩnh--", true);
        }
Exemplo n.º 3
0
 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 load form hiện tại
        /// </summary>
        private void InitData()
        {
            try
            {
                DataTable m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_TUTRUC_NOITRU();
                DataBinding.BindDataCombobox(cboKhoxuat, m_dtKhoXuat,
                                             TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Chọn kho xuất thuốc---", true);


                if (globalVariables.IsAdmin || Noisudung == "KHO" || Noisudung == "ALL")
                {
                    m_dtDataDepartment = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
                    //log.Info("Lay thong tin khoa noi tru cua admin");
                }
                else
                {
                    m_dtDataDepartment = THU_VIEN_CHUNG.Laydanhmuckhoa(globalVariablesPrivate.objKhoaphong.IdKhoaphong);
                    //log.Info("Lay thong tin khoa noi tru cua theo nguoi su dung voi Department_ID=" + globalVariables.DepartmentID + " and nguoi dang nhap ten=" + globalVariables.gv_sStaffName);
                }
                DataBinding.BindDataCombobox(cboDepartment, m_dtDataDepartment, DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "Chọn khoa phòng", true);
                LoadThongTinNhanVienTheoKhoa();
                //log.Info("lay thong tin cua nhan vien theo khoa");
            }
            catch
            {
            }
            finally
            {
                bln_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_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);
        }
Exemplo n.º 6
0
 private void InitData()
 {
     DataBinding.BindDataCombobox(cboNhanVien, CommonLoadDuoc.LAYTHONGTIN_NHANVIEN(),
                                  DmucNhanvien.Columns.IdNhanvien, DmucNhanvien.Columns.TenNhanvien, "---Nhân viên---", false);
     cboNhanVien.Enabled = false;
     LoadKho();
 }
Exemplo n.º 7
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>
        /// load thông tin
        /// của form hiện tai
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_baocao_nhapkho_chitiet_Load(object sender, EventArgs e)
        {
            baocaO_TIEUDE1.Init("thuoc_baocaochitiet_nhapkho");

            DataBinding.BindData(cboKho, KIEU_THUOC_VT == "THUOC" ? CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN() : CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN(), TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
            AutocompleteThuoc();
        }
        /// <summary>
        /// hàm thực hiện việc khởi tạo thông tin của Form
        /// </summary>
        private void InitData()
        {
            DataTable m_dtKhoaNoitru = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);

            txtKhoanoitru.Init(m_dtKhoaNoitru, new List <string>()
            {
                DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong
            });
            if (KIEU_THUOC_VT == "THUOC")
            {
                m_dtKhoNhan = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NOITRU();
            }
            else
            {
                m_dtKhoNhan = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
            }
            txtKhothuoc.Init(m_dtKhoNhan, new List <string>()
            {
                TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
            });
            DataTable dtnhanvien = THU_VIEN_CHUNG.Laydanhsachnhanvien("ALL");

            txtNguoinhan.Init(dtnhanvien, new List <string>()
            {
                DmucNhanvien.Columns.IdNhanvien, DmucNhanvien.Columns.MaNhanvien, DmucNhanvien.Columns.TenNhanvien
            });
            txtNguoitra.Init(dtnhanvien, new List <string>()
            {
                DmucNhanvien.Columns.IdNhanvien, DmucNhanvien.Columns.MaNhanvien, DmucNhanvien.Columns.TenNhanvien
            });
            b_Hasloaded = true;
        }
Exemplo n.º 10
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)
            {
                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);
        }
Exemplo n.º 11
0
        /// <summary>
        /// phím tắt
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        private void frm_DanhmucKhothuoc_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.KeyCode == Keys.N)
            {
                cmdThemMoi.PerformClick();
            }
            if (e.Control && e.KeyCode == Keys.E)
            {
                cmdSua.PerformClick();
            }
            if (e.Control && e.KeyCode == Keys.D)
            {
                cmdXoa.PerformClick();
            }
            if (e.KeyCode == Keys.F5)
            {
                m_dtKhoThuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOCVaTuThuoc();
                Utility.SetDataSourceForDataGridEx(grdKhoThuoc, m_dtKhoThuoc, true, true, "1=1", TDmucKho.Columns.SttHthi + "," + TDmucKho.Columns.TenKho);
                ModifyCommand();
            }
            if (e.KeyCode == Keys.Escape)
            {
                cmdThoat.PerformClick();
            }
        }
 private void InitData()
 {
     m_KhoaTra = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
     DataBinding.BindDataCombobox(cboNhanVien, CommonLoadDuoc.LAYTHONGTIN_NHANVIEN(),
                                  DmucNhanvien.Columns.IdNhanvien, DmucNhanvien.Columns.TenNhanvien, "---Nhân viên---", true);
     cboNhanVien.Enabled = false;
     LoadKho();
 }
Exemplo n.º 13
0
 /// <summary>
 /// hàm thực hiện việc load lại thông tin
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frm_UpdateSoLuongTon_Load(object sender, EventArgs e)
 {
     DataBinding.BindDataCombobox(cboKho, CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA(), TDmucKho.Columns.IdKho,
                                  TDmucKho.Columns.TenKho, "--Chọn kho thuốc--", true);
     SetOutType();
     LoadThuocTrongKho();
     CauHinh();
     hasLoaded = true;
 }
 private void LoadKho()
 {
     if (KIEU_THUOC_VT == "THUOC")
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_CHAN();
     }
     else
     {
         m_dtKhoXuat = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_CHAN();
     }
     cboNhanVien.SelectedValue = globalVariables.gv_intIDNhanvien;
     DataBinding.BindDataCombobox(cboKhoXuat, m_dtKhoXuat, TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Kho trả---", false);
 }
Exemplo n.º 15
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();
 }
 /// <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);
 }
Exemplo n.º 17
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
            });
        }
Exemplo n.º 18
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
            });
        }
Exemplo n.º 19
0
        private void frm_baocaochidinhCLS_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dtNhomdichvu = new Select().From(VDmucDichvucl.Schema).ExecuteDataSet().Tables[0];
                cboNhomdichvuCLS.DropDownDataSource    = dtNhomdichvu;
                cboNhomdichvuCLS.DropDownDataMember    = VDmucDichvucl.Columns.IdDichvu;
                cboNhomdichvuCLS.DropDownDisplayMember = VDmucDichvucl.Columns.TenDichvu;
                cboNhomdichvuCLS.DropDownValueMember   = VDmucDichvucl.Columns.IdDichvu;

                DataBinding.BindDataCombobox(cboDoituongKCB, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                             DmucDoituongkcb.Columns.MaDoituongKcb,
                                             DmucDoituongkcb.Columns.TenDoituongKcb, "Chọn đối tượng KCB", true);

                txtNhanvien.Init(CommonLoadDuoc.LAYTHONGTIN_NHANVIEN());
                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.Count() > 0)
                {
                    cbokhoa.SelectedValue = globalVariables.MA_KHOA_THIEN;
                }
                DataTable dtdmuc = new Select().From(DmucDichvuclsChitiet.Schema).Where(DmucDichvuclsChitiet.Columns.TrangThai).IsEqualTo(1).ExecuteDataSet().Tables[0];
                txtchitietdichvu.Init(dtdmuc
                                      ,
                                      new List <string>
                {
                    DmucDichvuclsChitiet.Columns.IdChitietdichvu,
                    DmucDichvuclsChitiet.Columns.MaChitietdichvu,
                    DmucDichvuclsChitiet.Columns.TenChitietdichvu
                });
                DataTable dtBacsi = THU_VIEN_CHUNG.LaydanhsachBacsi(-1, -1);
                cboBacSyChiDinh.DropDownDataSource    = dtBacsi;
                cboBacSyChiDinh.DropDownDataMember    = DmucNhanvien.Columns.IdNhanvien;
                cboBacSyChiDinh.DropDownDisplayMember = DmucNhanvien.Columns.TenNhanvien;
                cboBacSyChiDinh.DropDownValueMember   = DmucNhanvien.Columns.UserName;
                m_blnhasLoaded = true;
            }
            catch (Exception ex)
            {
                Utility.CatchException("Lỗi khi load chức năng!", ex);
            }
        }
Exemplo n.º 20
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();
 }
Exemplo n.º 21
0
        /// <summary>
        /// hàm hực hiện việc load lại danh mục khởi tạo thông tni
        /// </summary>
        private void InitData()
        {
            try
            {
                cboDepartment.Enabled   = cboStaff.Enabled = globalVariables.IsAdmin;
                dtTuNgay.Value          = DateTime.Now.AddDays(-2);
                dtDenNgay.Value         = DateTime.Now.AddDays(2);
                cboStatus.SelectedIndex = 0;
                DataTable dtKho = new DataTable();
                if (KIEUTHUOC_VT == "THUOC")
                {
                    dtKho = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_TUTRUC_NOITRU();
                }
                else
                {
                    dtKho = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
                        "TATCA", "NOITRU"
                    });
                }

                DataBinding.BindDataCombobox(cboKhoxuat, dtKho,
                                             TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho,
                                             "---Chọn kho xuất---", false);

                DataTable dtDoctorAssign = THU_VIEN_CHUNG.Laydanhsachnhanvien("ALL");
                DataBinding.BindDataCombox(cboStaff, dtDoctorAssign, DmucNhanvien.Columns.IdNhanvien,
                                           DmucNhanvien.Columns.TenNhanvien, "---Bác sỹ chỉ định---", true);
                if (globalVariables.gv_intIDNhanvien <= 0)
                {
                    if (cboStaff.Items.Count > 0)
                    {
                        cboStaff.SelectedIndex = 0;
                    }
                }
                else
                {
                    if (cboStaff.Items.Count > 0)
                    {
                        cboStaff.SelectedIndex = Utility.GetSelectedIndex(cboStaff,
                                                                          globalVariables.gv_intIDNhanvien.ToString());
                    }
                }
                LoadDepartments();
            }
            catch
            {
            }
        }
Exemplo n.º 22
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_xuatvacxin_tuyenhuyen_Load(object sender, EventArgs e)
 {
     baocaO_TIEUDE1.Init("thuoc_baocao_xuatvacxin_tuyenhuyen");
     txtKho.Init(KIEU_THUOC_VT == "THUOC"
                              ? CommonLoadDuoc.LAYTHONGTIN_KHOAO_THUOC()
                              : CommonLoadDuoc.LAYTHONGTIN_KHOAO_VT(), new List <string>()
     {
         TDmucKho.Columns.IdKho, TDmucKho.Columns.MaKho, TDmucKho.Columns.TenKho
     });
     //DataBinding.BindDataCombobox(cboKho,
     //                     KIEU_THUOC_VT == "THUOC"
     //                         ? CommonLoadDuoc.LAYTHONGTIN_KHOAO_THUOC()
     //                         : CommonLoadDuoc.LAYTHONGTIN_KHOAO_VT(), TDmucKho.Columns.IdKho,
     //                     TDmucKho.Columns.TenKho, "---Chọn huyện nhập vắc xin---", false);
     AutocompleteThuoc();
 }
Exemplo n.º 23
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);
 }
Exemplo n.º 24
0
 /// <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);
 }
Exemplo n.º 25
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();
 }
Exemplo n.º 26
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
     });
 }
Exemplo n.º 27
0
        ActionResult Kiemtrasoluongthuoctrongkho(TPhieuCapphatChitiet pres, int ID_KHO)
        {
            int       id_thuoc = pres.IdThuoc;
            DmucThuoc _drug    = new Select().From(DmucThuoc.Schema).Where(DmucThuoc.IdThuocColumn).IsEqualTo(id_thuoc).ExecuteSingle <DmucThuoc>();

            if (_drug == null)
            {
                return(ActionResult.UNKNOW);
            }
            string Drug_name  = _drug.TenThuoc;
            int    so_luong   = pres.SoLuong;
            int    SoLuongTon = CommonLoadDuoc.SoLuongTonTrongKho(pres.IdDonthuoc, ID_KHO, id_thuoc, (int)pres.IdThuockho.Value, 1, (byte)1);

            if (SoLuongTon < so_luong)
            {
                Utility.ShowMsg(string.Format("Bạn không thể xác nhận đơn thuốc,Vì thuốc :{0} số lượng tồn hiện tại trong kho({1}) không đủ cấp cho số lượng yêu cầu({2})\n Mời bạn xem lại số lượng", Drug_name, SoLuongTon.ToString(), so_luong.ToString()));
                return(ActionResult.NotEnoughDrugInStock);
            }
            return(ActionResult.Success);
        }
Exemplo n.º 28
0
 private void frm_ChotcapphatThuoc_ngoaitru_Load(object sender, EventArgs e)
 {
     DataBinding.BindDataCombobox(cboObjectType, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                  DmucDoituongkcb.Columns.MaDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "---Chọn---", true);
     if (kieuthuoc_vt == "THUOC")
     {
         m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_LE_NGOAITRU();
     }
     else
     {
         m_dtKhothuoc = CommonLoadDuoc.LAYTHONGTIN_KHOVATTU_LE(new List <string> {
             "NGOAITRU"
         });
     }
     DataBinding.BindData(cboKho, m_dtKhothuoc,
                          TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho);
     TimKiemThongTinDonThuoc();
     ModifyCommand();
     CauHinh();
 }
Exemplo n.º 29
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();
        }
 private void frm_baocao_thuockedon_theobacsy_Load(object sender, EventArgs e)
 {
     try
     {
         baocaO_TIEUDE1.Init();
         AutocompleteThuoc();
         DataBinding.BindDataCombobox(cboDoiTuong, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                      DmucDoituongkcb.Columns.IdDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb,
                                      "---Chọn đối tượng---", false);
         DataBinding.BindDataCombobox(cboStock, CommonLoadDuoc.LAYTHONGTIN_KHOTHUOC_TATCA(),
                                      TDmucKho.Columns.IdKho, TDmucKho.Columns.TenKho, "---Chọn kho ---", false);
         DataTable dtBacsi = THU_VIEN_CHUNG.LaydanhsachBacsi(-1, -1);
         cboBacSyChiDinh.DropDownDataSource    = dtBacsi;
         cboBacSyChiDinh.DropDownDataMember    = DmucNhanvien.Columns.IdNhanvien;
         cboBacSyChiDinh.DropDownDisplayMember = DmucNhanvien.Columns.TenNhanvien;
         cboBacSyChiDinh.DropDownValueMember   = DmucNhanvien.Columns.IdNhanvien;
     }
     catch
     {
     }
 }