private void ChonBuong()
        {
            string idBuong = Utility.sDbnull(grdBuong.GetValue(NoitruDmucBuong.Columns.IdBuong), -1);

            txtRoom_code.SetId(idBuong);
            _mDtDatabed = THU_VIEN_CHUNG.NoitruTimkiemgiuongTheobuong(Utility.Int32Dbnull(txtDepartment_ID.Text),
                                                                      Utility.Int32Dbnull(idBuong));
            Utility.SetDataSourceForDataGridEx_Basic(grdGiuong, _mDtDatabed, true, true, "1=1",
                                                     "isFull asc,dang_nam ASC,ten_giuong");
            string oldBed = txtBedCode.MyCode;

            txtBedCode.Init(_mDtDatabed,
                            new List <string>
            {
                NoitruDmucGiuongbenh.Columns.IdGiuong,
                NoitruDmucGiuongbenh.Columns.MaGiuong,
                NoitruDmucGiuongbenh.Columns.TenGiuong
            });
            txtBedCode.SetCode(oldBed);
            if (grdGiuong.DataSource != null)
            {
                grdGiuong.MoveFirst();
            }
            if (txtBedCode.MyCode == "-1")
            {
                string idGiuong = Utility.sDbnull(grdGiuong.GetValue(NoitruDmucGiuongbenh.Columns.IdGiuong), -1);
                txtBedCode.SetId(idGiuong);
            }
        }
        private void Frm_Sokhambenh_NoiTru_Load(object sender, EventArgs e)
        {
            try
            {
                Autocompletenhanvien();
                DataBinding.BindDataCombobox(cboDoituongKCB, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                             DmucDoituongkcb.Columns.IdDoituongKcb,
                                             DmucDoituongkcb.Columns.TenDoituongKcb, "Chọn đối tượng KCB", true);

                m_dtKhoathucHien = THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 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;
                dtNgayInPhieu.Value = globalVariables.SysDate;
                dtToDate.Value      = dtNgayInPhieu.Value = dtFromDate.Value = globalVariables.SysDate;
                if (query.Any())
                {
                    cboKhoa.SelectedValue = globalVariables.MA_KHOA_THIEN;
                }
            }
            catch (Exception ex)
            {
                Utility.CatchException("Lỗi khi load chức năng!", ex);
            }
        }
Exemple #3
0
 bool isValidXoatamung()
 {
     objLuotkham = Utility.getKcbLuotkham(objLuotkham.IdBenhnhan, objLuotkham.MaLuotkham);
     if (objLuotkham == null)
     {
         Utility.SetMsg(lblMsg, "Bạn cần chọn Bệnh nhân cần tạm ứng", true);
         return(false);
     }
     if (objTamung.TrangThai == 1)
     {
         Utility.SetMsg(lblMsg, "Đã hoàn ứng cho phần tạm ứng đang chọn nên bạn không thể hủy tạm ứng", true);
         return(false);
     }
     if (objLuotkham.TrangthaiNoitru <= 0 && THU_VIEN_CHUNG.Laygiatrithamsohethong("KCB_THANHTOAN_KICHHOAT_TAMUNG_NGOAITRU", true) == "1")
     {
         return(true);
     }
     if (objLuotkham.TrangthaiNoitru == 6)
     {
         Utility.ShowMsg("Bệnh nhân đã xuất viện nên bạn không thể hủy tiền tạm ứng");
         return(false);
     }
     if (objLuotkham.TrangthaiNoitru == 5)
     {
         Utility.ShowMsg("Bệnh nhân đã được tài chính duyệt nên bạn không thể hủy tiền tạm ứng");
         return(false);
     }
     if (objLuotkham.TrangthaiNoitru == 4)
     {
         Utility.ShowMsg("Bệnh nhân đã được tổng hợp xuất viện nên bạn không thể hủy tiền tạm ứng");
         return(false);
     }
     return(true);
 }
        /// <summary>
        /// hà thực hiện việc in phiêu xuat kho
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdInPhieuNhapKho_Click(object sender, EventArgs e)
        {
            int IDPhieuNhap = Utility.Int32Dbnull(grdList.GetValue(TPhieuNhapxuatthuoc.Columns.IdPhieu), -1);

            TPhieuNhapxuatthuoc objPhieuNhap = TPhieuNhapxuatthuoc.FetchByID(IDPhieuNhap);

            if (objPhieuNhap != null)
            {
                if (Utility.Byte2Bool(objPhieuNhap.DuTru.Value))
                {
                    VNS.HIS.UI.Baocao.thuoc_phieuin_nhapxuat.InphieuDutru(IDPhieuNhap, "PHIẾU DỰ TRÙ", globalVariables.SysDate);
                }
                else
                {
                    if (THU_VIEN_CHUNG.Laygiatrithamsohethong("THUOC_INPHIEUXUATKHO _2LIEN", "0", false) == "1")
                    {
                        VNS.HIS.UI.Baocao.thuoc_phieuin_nhapxuat.InphieuXuatkho_2lien(IDPhieuNhap, "phiếu trả thuốc THUỐC TỦ TRỰC", globalVariables.SysDate);
                    }
                    else
                    {
                        VNS.HIS.UI.Baocao.thuoc_phieuin_nhapxuat.InphieuXuatkho(IDPhieuNhap, "phiếu trả thuốc THUỐC TỦ TRỰC", globalVariables.SysDate);
                    }
                }
            }
        }
        private void frm_baocaothutientheokhoaphong_Load(object sender, EventArgs e)
        {
            try
            {
                DataTable dtNhomdichvu = THU_VIEN_CHUNG.LayDulieuDanhmucChung("NHOMBAOCAOCLS", true);
                cboNhomdichvuCLS.DropDownDataSource    = dtNhomdichvu;
                cboNhomdichvuCLS.DropDownDataMember    = DmucChung.Columns.Ma;
                cboNhomdichvuCLS.DropDownDisplayMember = DmucChung.Columns.Ten;
                cboNhomdichvuCLS.DropDownValueMember   = DmucChung.Columns.Ma;

                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;
                }
                DataBinding.BindDataCombobox(cboPhong, THU_VIEN_CHUNG.LaydanhmucPhong(-1), DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "Chọn phòng thực hiện", true);
                m_blnhasLoaded = true;
            }
            catch (Exception ex)
            {
                Utility.CatchException("Lỗi khi load chức năng!", ex);
            }
        }
 private void BindDoctorAssignInfo()
 {
     try
     {
         _mDtDoctorAssign = THU_VIEN_CHUNG.LaydanhsachBacsi(-1, -1);
         DataBinding.BindDataCombox(cboDoctorAssign, _mDtDoctorAssign, DmucNhanvien.Columns.IdNhanvien,
                                    DmucNhanvien.Columns.TenNhanvien, "---Bác sỹ chỉ định---", true);
         if (globalVariables.gv_intIDNhanvien <= 0)
         {
             if (cboDoctorAssign.Items.Count > 0)
             {
                 cboDoctorAssign.SelectedIndex = 0;
             }
         }
         else
         {
             if (cboDoctorAssign.Items.Count > 0)
             {
                 cboDoctorAssign.SelectedIndex = Utility.GetSelectedIndex(cboDoctorAssign,
                                                                          globalVariables.gv_intIDNhanvien.ToString(CultureInfo.InvariantCulture));
             }
         }
     }
     catch (Exception exception)
     {
         Utility.ShowMsg("Lỗi:" + exception.Message);
     }
 }
Exemple #7
0
        private void LoadTh()
        {
            try
            {
                if (chktuyen.Checked)
                {
                    m_dataTH =
                        new BAOCAO_BHYT().BHYT_21A_PHANTUYEN(dtpFromDate.Value, dtpToDate.Value,
                                                             "BHYT", -1, txtNhomBHYT.myCode, Utility.Int32Dbnull(cboTuyen.SelectedIndex - 1, -1),
                                                             Utility.sDbnull(globalVariables.gv_strNoiDKKCBBD, "01"), globalVariables.gv_strNoicapBHYT, Utility.sDbnull(txtKCBBDCode.Text, -1),
                                                             chkKhacMa.Checked ? "KHAC" : "BANG");

                    THU_VIEN_CHUNG.CreateXML(m_dataTH, "BHYT21A.xml");
                    Utility.SetDataSourceForDataGridEx(grdListPhanTuyen, m_dataTH, true, true, "1=1", "");
                    grdExcel.DataSource = m_dataTH;
                }
                else
                {
                    m_dataTH =
                        new BAOCAO_BHYT().BHYT_21A(dtpFromDate.Value, dtpToDate.Value,
                                                   "BHYT", -1, txtNhomBHYT.myCode, Utility.Int32Dbnull(cboTuyen.SelectedIndex - 1, -1),
                                                   Utility.sDbnull(globalVariables.gv_strNoiDKKCBBD, "01"), globalVariables.gv_strNoicapBHYT, Utility.sDbnull(txtKCBBDCode.Text, -1),
                                                   chkKhacMa.Checked ? "KHAC" : "BANG");

                    THU_VIEN_CHUNG.CreateXML(m_dataTH, "BHYT21A.xml");
                    Utility.SetDataSourceForDataGridEx(grdList, m_dataTH, true, true, "1=1", "");
                    grdExcel.DataSource = m_dataTH;
                }
            }
            catch (Exception ex)
            {
                Utility.CatchException(ex);
            }
        }
Exemple #8
0
        /// <summary>
        /// hàm thực hiện xóa thông tin của hiếu nhập chi tiết
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdXoaPhieuNhap_Click(object sender, EventArgs e)
        {
            int    IdPhieu = Utility.Int32Dbnull(grdList.GetValue(TPhieuNhapxuatthuoc.Columns.IdPhieu), -1);
            string khoxuat = Utility.sDbnull(grdList.CurrentRow.Cells["ten_khoxuat"].Value, "");
            string khonhap = Utility.sDbnull(grdList.CurrentRow.Cells["ten_khonhap"].Value, "");

            if (!IsValid4UpdateDelete())
            {
                return;
            }
            if (Utility.AcceptQuestion(string.Format("Bạn có chắc chắn muốn xóa thông tin phiếu chuyển kho với mã phiếu {0} hay không?", IdPhieu), "Thông báo", true))
            {
                ActionResult actionResult = new THUOC_NHAPKHO().XoaPhieuNhapKho(IdPhieu);
                switch (actionResult)
                {
                case ActionResult.Success:
                    grdList.CurrentRow.Delete();
                    grdList.UpdateData();
                    m_dtDataNhapKho.AcceptChanges();
                    THU_VIEN_CHUNG.Log(this.Name, globalVariables.UserName,
                                       string.Format(
                                           "Xóa phiếu chuyển kho tuyến huyện với số phiếu là :{0} - Từ kho {1} đến kho {2}",
                                           id_PhieuNhap, khoxuat, khonhap), action.Delete);
                    Utility.ShowMsg("Bạn xóa thông tin phiếu chuyển kho thành công", "Thông báo", MessageBoxIcon.Information);
                    break;

                case ActionResult.Error:
                    break;
                }
            }
            ModifyCommand();
        }
Exemple #9
0
 void txtTieuDe_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter && cmdSave.Visible)
     {
         THU_VIEN_CHUNG.CapnhatgiatriTieudebaocao(MA_BAOCAO, Utility.DoTrim(txtTieuDe.Text));
     }
 }
        public static void InphieuDieuTri(DataTable dtPrint, DateTime ngayin)
        {
            string tieude = "", reportname = "";
            var    crpt = Utility.GetReport("noitru_phieudieutri", ref tieude, ref reportname);

            if (crpt == null)
            {
                return;
            }
            //var crpt = new crpt_PhieuDieuTri();
            var objForm = new frmPrintPreview("IN PHIẾU ĐIỀU TRỊ", crpt, true, true);

            crpt.SetDataSource(dtPrint);
            objForm.mv_sReportFileName = Path.GetFileName(reportname);
            objForm.mv_sReportCode     = "noitru_phieudieutri";
            Utility.SetParameterValue(crpt, "ParentBranchName", globalVariables.ParentBranch_Name);
            Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
            Utility.SetParameterValue(crpt, "CurrentDate", Utility.FormatDateTime(ngayin));
            Utility.SetParameterValue(crpt, "sTitleReport", tieude);
            Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());

            objForm.crptViewer.ReportSource = crpt;
            objForm.ShowDialog();
            objForm.Dispose();
        }
        /// <summary>
        /// hàm thực hiện việc load thông tin của Form hiện tại
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frm_InPhieudieutri_Load(object sender, EventArgs e)
        {
            DataBinding.BindDataCombox(cboKhoanoitru,
                                       THU_VIEN_CHUNG.LaydanhsachKhoanoitruTheoBacsi(globalVariables.UserName, Utility.Bool2byte(globalVariables.IsAdmin), (byte)1),
                                       DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong,
                                       "---Chọn khoa nội trú---", false);
            cboKhoanoitru.SelectedIndex = Utility.GetSelectedIndex(cboKhoanoitru, globalVariables.idKhoatheoMay.ToString());
            m_blnLoaded = true;

            string department_id = Utility.sDbnull(cboKhoanoitru.SelectedValue, globalVariables.idKhoatheoMay.ToString());
            bool   IsAdmin       = Utility.Coquyen("quyen_xemphieudieutricuabacsinoitrukhac");

            m_dtPhieudieutri = new KCB_THAMKHAM().NoitruTimkiemphieudieutriTheoluotkham(Utility.Bool2byte(IsAdmin), "01/01/1900", objLuotkham.MaLuotkham,
                                                                                        (int)objLuotkham.IdBenhnhan, department_id, 0);

            _rowFilter = "1=1";
            if (!chkHienthiCaDaIn.Checked)
            {
                _rowFilter = string.Format("{0}={1}", NoitruPhieudieutri.Columns.TthaiIn, 0);
            }
            Utility.SetDataSourceForDataGridEx_Basic(grdList, m_dtPhieudieutri, false, true, _rowFilter, NoitruPhieudieutri.Columns.NgayDieutri + " desc");
            grdList.MoveFirst();

            grdList.CheckAllRecords();
        }
Exemple #12
0
 /// <summary>
 /// hàm thực hiện việc lấy thôn gtin của dữ liệu
 /// </summary>
 private void getData()
 {
     objLuotkham = new Select().From(KcbLuotkham.Schema)
                   .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham)
                   .And(KcbLuotkham.Columns.IdBenhnhan).IsEqualTo(objLuotkham.IdBenhnhan).ExecuteSingle <KcbLuotkham>();
     if (objLuotkham != null)
     {
         txtKhoanoitru.SetId(objLuotkham.IdKhoanoitru);
         if (!string.IsNullOrEmpty(objLuotkham.NgayNhapvien.ToString()))
         {
             dtNgayNhapVien.Value = Convert.ToDateTime(objLuotkham.NgayNhapvien);
         }
         else
         {
             dtNgayNhapVien.Value = globalVariables.SysDate;
         }
         txtGhiChu.Text = Utility.sDbnull(objLuotkham.MotaNhapvien);
         //txtSoBenhAn.Text = objLuotkham.SoBenhAn;
         txtSoBenhAn.Text = string.IsNullOrEmpty(Utility.sDbnull(objLuotkham.SoBenhAn, ""))
            ? THU_VIEN_CHUNG.LaySoBenhAn()
            : Utility.sDbnull(objLuotkham.SoBenhAn, "");
     }
     else
     {
         Utility.SetMsg(lblMsg, "Chưa chọn bệnh nhân để nhập viện", true);
     }
 }
Exemple #13
0
 void InitData()
 {
     try
     {
         m_dtLoaiDichvuCLS = THU_VIEN_CHUNG.LayDulieuDanhmucChung("LOAIDICHVUCLS", true);
         DataTable m_dtLoaiDichvuCLS_new = m_dtLoaiDichvuCLS.Clone();
         if (globalVariables.gv_dtQuyenNhanvien_Dmuc.Select(QheNhanvienDanhmuc.Columns.Loai + "= 0").Length <= 0)
         {
             m_dtLoaiDichvuCLS_new = m_dtLoaiDichvuCLS.Copy();
         }
         else
         {
             foreach (DataRow dr in m_dtLoaiDichvuCLS.Rows)
             {
                 if (Utility.CoquyenTruycapDanhmuc(Utility.sDbnull(dr[DmucChung.Columns.Ma]), "0"))
                 {
                     hanchequyendanhmuc = true;
                     m_dtLoaiDichvuCLS_new.ImportRow(dr);
                 }
             }
         }
         DataBinding.BindDataCombox(cboServiceType, m_dtLoaiDichvuCLS_new, DmucChung.Columns.Ma, DmucChung.Columns.Ten, "---Chọn---", false);
         DataTable m_dtNhomDichVu = THU_VIEN_CHUNG.LayDulieuDanhmucChung("NHOMBAOCAOCLS", true);
         DataBinding.BindDataCombox(cbonhombaocao, m_dtNhomDichVu, DmucChung.Columns.Ma, DmucChung.Columns.Ten);
         DataTable m_dtKhoaChucNang = THU_VIEN_CHUNG.Laydanhmuckhoa("ALL", 1);
         DataBinding.BindDataCombobox(cboDepartment, m_dtKhoaChucNang, DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "---Chọn---", true);
     }
     catch (Exception ex)
     {
         Utility.ShowMsg("InitData()-->\n" + ex.Message);
     }
 }
Exemple #14
0
 /// <summary>
 /// hàm thực hiện việc đăng nhập thông tin của khi đăng nhập Login
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frm_Login_Load(object sender, EventArgs e)
 {
     try
     {
         DataTable dtKhoaphong = THU_VIEN_CHUNG.Laydanhmuckhoa("ALL", 0);
         DataBinding.BindDataCombobox(cboKhoaKCB, dtKhoaphong, DmucKhoaphong.Columns.MaKhoaphong, DmucKhoaphong.Columns.TenKhoaphong, "---Khoa làm việc---", false);
         PropertyLib._AppProperties = PropertyLib.GetAppPropertiess();
         cbogiaodien.SelectedIndex  = PropertyLib._AppProperties.MenuStype;
         txtUserName.Text           = PropertyLib._AppProperties.UID;
         oldUID = txtUserName.Text;
         chkRemember.Checked      = PropertyLib._AppProperties.REM;
         cboKhoaKCB.SelectedIndex = Utility.GetSelectedIndex(cboKhoaKCB, PropertyLib._AppProperties.Makhoathien);
         if (PropertyLib._AppProperties.AutoLogin)
         {
             txtPassWord.Text = PropertyLib._AppProperties.PWD;
             cmdLogin_Click(cmdLogin, e);
         }
     }
     catch (Exception)
     {
     }
     finally
     {
     }
 }
Exemple #15
0
 /// <summary>
 ///     hàm thực hiện việc đăng nhập thông tin của khi đăng nhập Login
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frm_Login_Load(object sender, EventArgs e)
 {
     try
     {
         globalVariables.StringLicense = GetRequestLicenseCode() + THU_VIEN_CHUNG.GetMACAddress();
         DataTable dtKhoaphong = THU_VIEN_CHUNG.Laydanhmuckhoa("ALL", 0);
         DataBinding.BindDataCombobox(cboKhoaKCB, dtKhoaphong, DmucKhoaphong.Columns.MaKhoaphong,
                                      DmucKhoaphong.Columns.TenKhoaphong, "---Khoa làm việc---", false);
         PropertyLib._AppProperties    = PropertyLib.GetAppPropertiess();
         PropertyLib._ConfigProperties = PropertyLib.GetConfigProperties();
         cbogiaodien.SelectedIndex     = PropertyLib._AppProperties.MenuStype;
         txtUserName.Text         = PropertyLib._AppProperties.UID;
         _oldUid                  = txtUserName.Text;
         chkRemember.Checked      = PropertyLib._AppProperties.REM;
         lblMsg.Text              = "";
         cboKhoaKCB.SelectedIndex = Utility.GetSelectedIndex(cboKhoaKCB, PropertyLib._ConfigProperties.MaKhoa);
         if (cboKhoaKCB.SelectedIndex <= 0)
         {
             cboKhoaKCB.SelectedIndex = Utility.GetSelectedIndex(cboKhoaKCB, PropertyLib._AppProperties.Makhoathien);
         }
         if (PropertyLib._AppProperties.AutoLogin)
         {
             txtPassWord.Text = PropertyLib._AppProperties.PWD;
             cmdLogin_Click(cmdLogin, e);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg("Lỗi:" + ex);
     }
 }
        /// <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>
 /// hà thực hiện khởi tạo thông tin của Form
 /// </summary>
 private void InitalData()
 {
     try
     {
         dtDept = THU_VIEN_CHUNG.Laydanhmuckhoa("NGOAI", 0);
         //Khởi tạo danh mục Loại khám
         DataTable v_ExamTypeList = new DmucKieukhamCollection().Load().ToDataTable();
         Utility.AddColumnAlltoDataTable(ref v_ExamTypeList, DmucDichvukcb.Columns.IdKieukham, DmucKieukham.Columns.TenKieukham, "====Chọn====");
         v_ExamTypeList.DefaultView.Sort = DmucKieukham.Columns.SttHthi + " ASC";
         cboLoaiKham.DataSource          = v_ExamTypeList.DefaultView;
         cboLoaiKham.ValueMember         = DmucDichvukcb.Columns.IdKieukham;
         cboLoaiKham.DisplayMember       = DmucKieukham.Columns.TenKieukham;
         cboLoaiKham.SelectedValue       = -1;
         //Khởi tạo danh mục Loại khám
         DataTable v_ObjectTypeList = new DmucDoituongkcbCollection().Load().ToDataTable();
         Utility.AddColumnAlltoDataTable(ref v_ObjectTypeList, DmucDichvukcb.Columns.IdDoituongKcb, DmucDoituongkcb.Columns.TenDoituongKcb, "====Chọn====");
         v_ObjectTypeList.DefaultView.Sort = DmucDoituongkcb.Columns.SttHthi + " ASC";
         cboDoituong.DataSource            = v_ObjectTypeList.DefaultView;
         cboDoituong.ValueMember           = DmucDichvukcb.Columns.IdDoituongKcb;
         cboDoituong.DisplayMember         = DmucDoituongkcb.Columns.TenDoituongKcb;
         //Phòng ban
         BindDepartment();
     }
     catch
     {
     }
 }
        /// <summary>
        /// HÀM THỰC HIỆN VIỆC XÁC NHẬN NHẬP KHO THUỐC
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdNhapKho_Click(object sender, EventArgs e)
        {
            try
            {
                cmdNhapKho.Enabled = false;
                Utility.SetMsg(uiStatusBar1.Panels["MSG"], "", false);
                if (THU_VIEN_CHUNG.Laygiatrithamsohethong("THUOC_HIENTHI_NGAYXACNHAN", "0", false) == "0")
                {
                    if (!Utility.AcceptQuestion("Bạn có chắc chắn muốn xác nhận phiếu nhập kho đang chọn hay không?\nSau khi xác nhận, thuốc sẽ được cộng vào trong kho nhập", "Thông báo", true))
                    {
                        return;
                    }
                }

                int ITPhieuNhapxuatthuoc = Utility.Int32Dbnull(grdList.GetValue(TPhieuNhapxuatthuoc.Columns.IdPhieu), -1);
                TPhieuNhapxuatthuoc objTPhieuNhapxuatthuoc = TPhieuNhapxuatthuoc.FetchByID(ITPhieuNhapxuatthuoc);
                if (objTPhieuNhapxuatthuoc != null)
                {
                    DateTime _ngayxacnhan = globalVariables.SysDate;
                    if (THU_VIEN_CHUNG.Laygiatrithamsohethong("THUOC_HIENTHI_NGAYXACNHAN", "0", false) == "1")
                    {
                        frm_ChonngayXacnhan _ChonngayXacnhan = new frm_ChonngayXacnhan();
                        _ChonngayXacnhan.pdt_InputDate = objTPhieuNhapxuatthuoc.NgayHoadon;
                        _ChonngayXacnhan.ShowDialog();
                        if (_ChonngayXacnhan.b_Cancel)
                        {
                            return;
                        }
                        else
                        {
                            _ngayxacnhan = _ChonngayXacnhan.pdt_InputDate;
                        }
                    }
                    ActionResult actionResult =
                        _NHAPKHO.XacNhanPhieuNhapKho(objTPhieuNhapxuatthuoc, _ngayxacnhan);
                    switch (actionResult)
                    {
                    case ActionResult.Success:
                        Utility.SetMsg(uiStatusBar1.Panels["MSG"], "Xác nhận phiếu nhập kho thành công", false);
                        grdList.CurrentRow.BeginEdit();
                        grdList.CurrentRow.Cells[TPhieuNhapxuatthuoc.Columns.TrangThai].Value    = 1;
                        grdList.CurrentRow.Cells[TPhieuNhapxuatthuoc.Columns.NgayXacnhan].Value  = _ngayxacnhan;
                        grdList.CurrentRow.Cells[TPhieuNhapxuatthuoc.Columns.NguoiXacnhan].Value = globalVariables.UserName;
                        grdList.CurrentRow.EndEdit();
                        break;

                    case ActionResult.Error:
                        Utility.ShowMsg("Lỗi khi xác nhận phiếu nhập kho thuốc", "Thông báo lỗi", MessageBoxIcon.Error);
                        break;
                    }
                }
            }
            catch (Exception)
            {
            }
            finally
            {
                ModifyCommand();
            }
        }
        private void frm_KCB_Tracuu_lichsu_kcb_Load(object sender, EventArgs e)
        {
            try
            {
                AllowTextChanged   = false;
                _lstVisibleColumns = Utility.GetVisibleColumns(grdAssignDetail);
                Load_DSach_ICD();
                txtBacsikham.Init(THU_VIEN_CHUNG.LaydanhsachBacsi(-1, -1));
                BindDoctorAssignInfo();
                // SearchPatient();

                AllowTextChanged = true;
                CauHinhThamKham();
                InitData();
                ClearControl();
            }
            catch (Exception exception)
            {
                Utility.ShowMsg("Lỗi:" + exception.Message);
            }
            finally
            {
                txtPatient_Code.Focus();
                txtPatient_Code.Select();
            }
        }
Exemple #20
0
 /// <summary>
 /// hàm thực hiện việc thêm phiếu nhập kho thuốc
 /// </summary>
 /// <param name="objPhieuNhap"></param>
 /// <param name="arrPhieuNhapCts"></param>
 /// <returns></returns>
 public ActionResult ThemPhieuTraLaiKho(TPhieutrathuocKholeVekhochan objPhieuNhap, TPhieutrathuocKholeVekhochanChitiet[] arrPhieuNhapCts)
 {
     try
     {
         using (var Scope = new TransactionScope())
         {
             using (var dbScope = new SharedDbConnectionScope())
             {
                 objPhieuNhap.NgayTao  = globalVariables.SysDate;
                 objPhieuNhap.NguoiTao = globalVariables.UserName;
                 objPhieuNhap.MaPhieu  = Utility.sDbnull(THU_VIEN_CHUNG.MaTraLaiKho());
                 objPhieuNhap.IsNew    = true;
                 objPhieuNhap.Save();
                 if (objPhieuNhap != null)
                 {
                     foreach (TPhieutrathuocKholeVekhochanChitiet objPhieuNhapTraCt in arrPhieuNhapCts)
                     {
                         objPhieuNhapTraCt.ThanhTien = Utility.DecimaltoDbnull(objPhieuNhapTraCt.GiaNhap) *
                                                       Utility.Int32Dbnull(objPhieuNhapTraCt.SoLuong);
                         objPhieuNhapTraCt.IdPhieu = Utility.Int32Dbnull(objPhieuNhap.IdPhieu, -1);
                         objPhieuNhapTraCt.IsNew   = true;
                         objPhieuNhapTraCt.Save();
                     }
                 }
             }
             Scope.Complete();
             return(ActionResult.Success);
         }
     }
     catch (Exception exception)
     {
         log.Error("Loi trong qua trinh them phieu nhap kho :{0}", exception);
         return(ActionResult.Error);
     }
 }
Exemple #21
0
        private void frm_BAOCAO_TONGHOP_TAI_KKB_DTUONG_THUPHI_Load(object sender, EventArgs eventArgs)
        {
            try
            {
                AutocompleICD10();

                DataBinding.BindDataCombobox(cboDoituongKCB, THU_VIEN_CHUNG.LaydanhsachDoituongKcb(),
                                             DmucDoituongkcb.Columns.IdDoituongKcb,
                                             DmucDoituongkcb.Columns.TenDoituongKcb, "Chọn đối tượng KCB", 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);
                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;
                }
            }
            catch (Exception ex)
            {
                Utility.CatchException("Lỗi khi load chức năng!", ex);
            }
        }
        /// <summary>
        /// hàm thực hiện việc xóa thông tin chi tiết của phiếu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdXoaPhieuNhap_Click(object sender, EventArgs e)
        {
            Utility.SetMsg(uiStatusBar1.Panels["MSG"], "", false);
            int    ITPhieuNhapxuatthuoc = Utility.Int32Dbnull(grdList.GetValue(TPhieuNhapxuatthuoc.Columns.IdPhieu), -1);
            string khoxuat = Utility.sDbnull(grdList.CurrentRow.Cells["ten_khoxuat"].Value, "");
            string khonhap = Utility.sDbnull(grdList.CurrentRow.Cells["ten_khonhap"].Value, "");

            if (!InValiUpdateXoa())
            {
                return;
            }
            if (Utility.AcceptQuestion(string.Format("Bạn có chắc chắn muốn xóa thông tin phiếu nhập kho với mã phiếu {0} hay không?", ITPhieuNhapxuatthuoc), "Thông báo", true))
            {
                ActionResult actionResult = _NHAPKHO.XoaPhieuNhapKho(ITPhieuNhapxuatthuoc);
                switch (actionResult)
                {
                case ActionResult.Success:
                    grdList.CurrentRow.Delete();
                    grdList.UpdateData();
                    m_dtDataNhapKho.AcceptChanges();
                    m_dtDataNhapKho.AcceptChanges();
                    THU_VIEN_CHUNG.Log(this.Name, globalVariables.UserName,
                                       string.Format(
                                           "Xóa phiếu nhập kho với số phiếu là :{0} -Tại kho {1}}",
                                           ITPhieuNhapxuatthuoc, khoxuat), action.Delete);
                    Utility.SetMsg(uiStatusBar1.Panels["MSG"], "Bạn xóa thông tin phiếu nhập kho thành công", false);
                    break;

                case ActionResult.Error:
                    Utility.ShowMsg("Lỗi trong quá trình xóa thông tin của phiếu nhập kho", "Thông báo lỗi", MessageBoxIcon.Error);
                    break;
                }
            }
            ModifyCommand();
        }
Exemple #23
0
 private void InitData()
 {
     m_dtKhoaNoiTru =
         THU_VIEN_CHUNG.Laydanhmuckhoa("NOI", 0);
     DataBinding.BindDataCombobox(cboKhoaNoiTru, m_dtKhoaNoiTru, DmucKhoaphong.Columns.IdKhoaphong,
                                  DmucKhoaphong.Columns.TenKhoaphong, "", true);
 }
        /// <summary>
        /// hàm thực hiện việc in phiếu dịch vụ
        /// </summary>
        /// <param name="m_dtReportPhieuThu"></param>
        /// <param name="NgayInPhieu"></param>
        /// <param name="sTitleReport"></param>
        public void LAOKHOA_INPHIEU_DICHVU(DataTable m_dtReportPhieuThu, DateTime NgayInPhieu, string sTitleReport)
        {
            Utility.UpdateLogotoDatatable(ref m_dtReportPhieuThu);
            string tieude = "", reportname = "";
            var    crpt = Utility.GetReport("thanhtoan_crpt_PhieuDV_A5", ref tieude, ref reportname);

            if (crpt == null)
            {
                return;
            }
            var objForm = new frmPrintPreview("", crpt, true, true);

            //try
            //{
            crpt.SetDataSource(m_dtReportPhieuThu);
            //crpt.DataDefinition.FormulaFields["Formula_1"].Text = Strings.Chr(34) + "                                                                      ".Replace("#$X$#", Strings.Chr(34) + "&Chr(13)&" + Strings.Chr(34)) + Strings.Chr(34);
            Utility.SetParameterValue(crpt, "ParentBranchName", globalVariables.ParentBranch_Name);
            Utility.SetParameterValue(crpt, "BranchName", globalVariables.Branch_Name);
            Utility.SetParameterValue(crpt, "Telephone", globalVariables.Branch_Phone);
            Utility.SetParameterValue(crpt, "Address", globalVariables.Branch_Address);
            //  Utility.SetParameterValue(crpt,"DateTime", Utility.FormatDateTime(dtCreateDate.Value));
            Utility.SetParameterValue(crpt, "CurrentDate", Utility.FormatDateTime(NgayInPhieu));
            Utility.SetParameterValue(crpt, "sTitleReport", sTitleReport);
            Utility.SetParameterValue(crpt, "sMoneyCharacter",
                                      new MoneyByLetter().sMoneyToLetter(SumOfTotal(m_dtReportPhieuThu).ToString()));
            Utility.SetParameterValue(crpt, "BottomCondition", THU_VIEN_CHUNG.BottomCondition());
            objForm.crptViewer.ReportSource = crpt;
            objForm.ShowDialog();
        }
Exemple #25
0
        private void LoadData()
        {
            try
            {
                m_dtObjectType = THU_VIEN_CHUNG.LayDulieuDanhmucChung("MAQUYENLOIBHYT", true);
                if (!m_dtObjectType.Columns.Contains(QheDautheQloiBhyt.Columns.PhantramBhyt))
                {
                    Utility.AddColumToDataTable(ref m_dtObjectType, QheDautheQloiBhyt.Columns.PhantramBhyt, typeof(Int16));
                }

                foreach (DataRowView drv in m_dtqhe.DefaultView)
                {
                    DataRow[] arrDr = m_dtObjectType.Select(DmucChung.Columns.Ma + "='" + Utility.sDbnull(drv[QheDautheQloiBhyt.Columns.MaQloi], "-1") + "'");
                    if (arrDr.GetLength(0) > 0)
                    {
                        m_dtObjectType.Rows.Remove(arrDr[0]);
                        m_dtObjectType.AcceptChanges();
                    }
                }
                grdList.DataSource = m_dtObjectType;
            }
            catch
            {
            }
        }
 private void frm_baocaothuvienphi_Load(object sender, EventArgs e)
 {
     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;
         }
         m_blnhasLoaded = true;
     }
     catch (Exception ex)
     {
         Utility.CatchException("Lỗi khi load chức năng!", ex);
     }
 }
        private void frm_thongke_danhsachbenhnhanh_sieuam_Load(object sender, EventArgs e)
        {
            try
            {
                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;
            }
            catch (Exception ex)
            {
                Utility.ShowMsg(ex.Message);
            }
        }
Exemple #28
0
        void grdVTTH_tronggoi_CellUpdated(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                decimal BHYT_PTRAM_TRAITUYENNOITRU = Utility.DecimaltoDbnull(THU_VIEN_CHUNG.Laygiatrithamsohethong("BHYT_PTRAM_TRAITUYENNOITRU", "0", false), 0m);
                new Update(KcbDonthuocChitiet.Schema).Set(KcbDonthuocChitiet.Columns.SoLuong).EqualTo(Utility.Int32Dbnull(Utility.getValueOfGridCell(grdVTTH_tronggoi, KcbDonthuocChitiet.Columns.SoLuong)))
                .Where(KcbDonthuocChitiet.Columns.IdChitietdonthuoc).IsEqualTo(Utility.Int32Dbnull(Utility.getValueOfGridCell(grdVTTH_tronggoi, KcbDonthuocChitiet.Columns.IdChitietdonthuoc))).Execute();
                DataRow row = ((DataRowView)grdVTTH_tronggoi.CurrentRow.DataRow).Row;

                if (!Utility.Byte2Bool(row[KcbDonthuocChitiet.Columns.TuTuc]))
                {
                    decimal BHCT = 0m;
                    if (objLuotkham.TrangthaiNoitru <= 0)
                    {
                        BHCT = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhyt, 0) / 100);
                    }
                    else//Nội trú cần tính=đơn giá * % đầu thẻ * % tuyến
                    {
                        BHCT = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhytGoc, 0) / 100) * (BHYT_PTRAM_TRAITUYENNOITRU / 100);
                    }

                    //decimal num2 = (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) * Utility.DecimaltoDbnull(this.objLuotkham.PtramBhyt, 0)) / 100M;
                    decimal num3 = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0) - BHCT;
                    row[KcbDonthuocChitiet.Columns.BhytChitra]  = BHCT;
                    row[KcbDonthuocChitiet.Columns.BnhanChitra] = num3;
                }
                else
                {
                    row[KcbDonthuocChitiet.Columns.PtramBhyt] = 0;

                    row[KcbDonthuocChitiet.Columns.BhytChitra]  = 0;
                    row[KcbDonthuocChitiet.Columns.BnhanChitra] = Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia], 0);
                }

                row["TT_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]);
                row["TT"]                 = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu]));
                row["TT_BHYT"]            = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BhytChitra]);
                row["TT_BN"]              = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0));
                row["TT_PHUTHU"]          = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0);
                row["TT_BN_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0);
                if (Utility.Byte2Bool(row[KcbDonthuocChitiet.Columns.TrongGoi]))
                {
                    row[KcbDonthuocChitiet.Columns.DonGia]      = 0;
                    row[KcbDonthuocChitiet.Columns.BnhanChitra] = 0;
                    row[KcbDonthuocChitiet.Columns.BhytChitra]  = 0;
                    row["TT_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]);
                    row["TT"]                 = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.DonGia]) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu]));
                    row["TT_BHYT"]            = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BhytChitra]);
                    row["TT_BN"]              = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * (Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0) + Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0));
                    row["TT_PHUTHU"]          = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.PhuThu], 0);
                    row["TT_BN_KHONG_PHUTHU"] = Utility.Int32Dbnull(row[KcbDonthuocChitiet.Columns.SoLuong]) * Utility.DecimaltoDbnull(row[KcbDonthuocChitiet.Columns.BnhanChitra], 0);
                }
                m_dtVTTH_tronggoi.AcceptChanges();
                m_blnCancel = false;
            }
            catch (Exception ex)
            {
                Utility.SetMsg(lblMsg, ex.Message, true);
            }
        }
        private void cboUpLevel_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dataTable = new DataTable();

            dataTable = THU_VIEN_CHUNG.Laydanhsachphongthuockhoa(Utility.Int32Dbnull(cboUpLevel.SelectedValue, -1), -1);
            DataBinding.BindData(cboDepart, dataTable, DmucKhoaphong.Columns.IdKhoaphong, DmucKhoaphong.Columns.TenKhoaphong);
        }
Exemple #30
0
 void _CheckedChanged(object sender, EventArgs e)
 {
     if (!hasLoaded)
     {
         return;
     }
     try
     {
         string _value = "STT";
         if (optFIFO.Checked)
         {
             _value = "FIFO";
         }
         if (optLIFO.Checked)
         {
             _value = "LIFO";
         }
         if (optExpireDate.Checked)
         {
             _value = "EXP";
         }
         if (optUutien.Checked)
         {
             _value = "STT";
         }
         THU_VIEN_CHUNG.Capnhatgiatrithamsohethong("THUOC_KIEUXUATTHUOC", _value);
         ChangeOutType();
     }
     catch
     {
     }
 }