当前位置: 首页>>代码示例>>C#>>正文


C# KcbLuotkham.MarkOld方法代码示例

本文整理汇总了C#中KcbLuotkham.MarkOld方法的典型用法代码示例。如果您正苦于以下问题:C# KcbLuotkham.MarkOld方法的具体用法?C# KcbLuotkham.MarkOld怎么用?C# KcbLuotkham.MarkOld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KcbLuotkham的用法示例。


在下文中一共展示了KcbLuotkham.MarkOld方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateLanKham

        public ActionResult UpdateLanKham(KcbDanhsachBenhnhan objPatientInfo, KcbLuotkham objLuotkham, KcbDangkyKcb objRegExam, int KieuKham, decimal PtramBhytCu, decimal PtramBhytgoc )
        {
            ActionResult _ActionResult = ActionResult.Success;
            try
            {
                using (var scope = new TransactionScope())
                {
                    using (var dbscope = new SharedDbConnectionScope())
                    {
                        SqlQuery query =
                            new Select().From(KcbLuotkham.Schema).Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(
                                objLuotkham.MaLuotkham).And(KcbLuotkham.Columns.IdBenhnhan).IsEqualTo(
                                    objLuotkham.IdBenhnhan);
                        KcbLuotkham objExam = query.ExecuteSingle<KcbLuotkham>();
                        UpdatePatientInfo(objPatientInfo);
                        //decimal PtramBHYT = THU_VIEN_CHUNG.TinhPtramBHYT(objLuotkham);
                        //if (PtramBHYT != Utility.DecimaltoDbnull(objLuotkham.PtramBhyt))
                        //{
                        //    objLuotkham.PtramBhyt = PtramBHYT;
                        //}
                        objLuotkham.MarkOld();
                        objLuotkham.IsNew = false;
                        objLuotkham.Save();
                        //int recordExam = new Update(KcbLuotkham.Schema)
                        //    .Set(KcbLuotkham.Columns.NguoiLienhe).EqualTo(objLuotkham.NguoiLienhe)
                        //    .Set(KcbLuotkham.Columns.TrangthaiCapcuu).EqualTo(objLuotkham.TrangthaiCapcuu)
                        //    .Set(KcbLuotkham.Columns.LuongCoban).EqualTo(objLuotkham.LuongCoban)
                        //    .Set(KcbLuotkham.Columns.TthaiChuyendi).EqualTo(objLuotkham.TthaiChuyendi)
                        //    .Set(KcbLuotkham.Columns.DienthoaiLienhe).EqualTo(objLuotkham.DienthoaiLienhe)
                        //    .Set(KcbLuotkham.Columns.DiachiLienhe).EqualTo(objLuotkham.DiachiLienhe)
                        //    .Set(KcbLuotkham.Columns.TrieuChung).EqualTo(objLuotkham.TrieuChung)
                        //    .Set(KcbLuotkham.Columns.MatheBhyt).EqualTo(objLuotkham.MatheBhyt)
                        //    .Set(KcbLuotkham.Columns.MaNoicapBhyt).EqualTo(objLuotkham.MaNoicapBhyt)
                        //    .Set(KcbLuotkham.Columns.MaQuyenloi).EqualTo(objLuotkham.MaQuyenloi)
                        //    .Set(KcbLuotkham.Columns.NgaybatdauBhyt).EqualTo(objLuotkham.NgaybatdauBhyt)
                        //    .Set(KcbLuotkham.Columns.NgayketthucBhyt).EqualTo(objLuotkham.NgayketthucBhyt)
                        //    .Set(KcbLuotkham.Columns.NoicapBhyt).EqualTo(objLuotkham.NoicapBhyt)
                        //    .Set(KcbLuotkham.Columns.IdDoituongKcb).EqualTo(objLuotkham.IdDoituongKcb)
                        //    .Set(KcbLuotkham.Columns.IdLoaidoituongKcb).EqualTo(objLuotkham.IdLoaidoituongKcb)
                        //    .Set(KcbLuotkham.Columns.TrangthaiNgoaitru).EqualTo(objLuotkham.TrangthaiNgoaitru)
                        //    .Set(KcbLuotkham.Columns.MaKcbbd).EqualTo(objLuotkham.MaKcbbd)
                        //    .Set(KcbLuotkham.Columns.NoiDongtrusoKcbbd).EqualTo(objLuotkham.NoiDongtrusoKcbbd)
                        //    .Set(KcbLuotkham.Columns.MaDoituongBhyt).EqualTo(objLuotkham.MaDoituongBhyt)
                        //    .Set(KcbLuotkham.Columns.IdKhoatiepnhan).EqualTo(objLuotkham.IdKhoatiepnhan)
                        //    .Set(KcbLuotkham.Columns.DungTuyen).EqualTo(objLuotkham.DungTuyen)
                        //    .Set(KcbLuotkham.Columns.NgayTiepdon).EqualTo(objLuotkham.NgayTiepdon)
                        //    .Set(KcbLuotkham.Columns.MaDoituongKcb).EqualTo(objLuotkham.MaDoituongKcb)
                        //    .Set(KcbLuotkham.Columns.MaKhoaThuchien).EqualTo(objLuotkham.MaKhoaThuchien)
                        //    .Set(KcbLuotkham.Columns.NguoiSua).EqualTo(globalVariables.UserName)
                        //    .Set(KcbLuotkham.Columns.NgaySua).EqualTo(globalVariables.SysDate)
                        //    .Set(KcbLuotkham.Columns.PtramBhyt).EqualTo(objLuotkham.PtramBhyt)
                        //    .Set(KcbLuotkham.Columns.SoBenhAn).EqualTo(objLuotkham.SoBenhAn)
                        //    .Set(KcbLuotkham.Columns.DiaChi).EqualTo(objLuotkham.DiaChi)
                        //    .Set(KcbLuotkham.Columns.DiachiBhyt).EqualTo(objLuotkham.DiachiBhyt)
                        //    .Set(KcbLuotkham.Columns.Cmt).EqualTo(objLuotkham.Cmt)
                        //    .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham)
                        //    .And(KcbLuotkham.Columns.IdBenhnhan).IsEqualTo(objLuotkham.IdBenhnhan)
                        //    .Execute();
                        //Kiểm tra nếu % bị thay đổi thì cập nhật lại tất cả các bảng
                        if (PtramBhytCu != Utility.DecimaltoDbnull(objLuotkham.PtramBhyt, 0) || PtramBhytgoc != Utility.DecimaltoDbnull(objLuotkham.PtramBhytGoc, 0))
                           _ActionResult= THU_VIEN_CHUNG.UpdatePtramBHYT(objLuotkham, -1);
                        if (_ActionResult == ActionResult.Cancel)//Báo không cho phép thay đổi phần trăm BHYT do đã có dịch vụ đã thanh toán
                        {
                            return _ActionResult;
                        }

                        if (objRegExam != null)
                        {
                            objRegExam.MaLuotkham = Utility.sDbnull(objLuotkham.MaLuotkham);
                            objRegExam.IdBenhnhan = Utility.Int32Dbnull(objLuotkham.IdBenhnhan);
                            AddRegExam(objRegExam,objLuotkham, false, KieuKham);
                        }
                        scope.Complete();
                        return ActionResult.Success;
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("Loi trong qua trinh update thong tin benh nhan {0}", ex);
                return ActionResult.Error;
            }
        }
开发者ID:khaha2210,项目名称:VXIS,代码行数:83,代码来源:KCB_DANGKY.cs

示例2: CreatePatientExam

        /// <summary>
        /// hàm thực hiện việc khwoir tạo thoog tin PatietnExam
        /// </summary>
        /// <returns></returns>
        private KcbLuotkham CreatePatientExam()
        {
            objLuotkham = new KcbLuotkham();
            if (m_enAction == action.Insert || m_enAction == action.Add)
            {
                //Bỏ đi do đã sinh theo cơ chế bảng danh mục mã lượt khám. Nếu ko sẽ mất mã lượt khám hiện thời.
               // txtMaLankham.Text = THU_VIEN_CHUNG.KCB_SINH_MALANKHAM();
                objLuotkham.IsNew = true;
            }
            else
            {
                objLuotkham.MarkOld();
                objLuotkham.IsNew = false;
            }

            objLuotkham.MaKhoaThuchien = globalVariables.MA_KHOA_THIEN;
            objLuotkham.Noitru = 0;
            objLuotkham.IdDoituongKcb = _IdDoituongKcb;
            objLuotkham.IdLoaidoituongKcb = _IdLoaidoituongKcb;
            objLuotkham.Locked = 0;
            objLuotkham.HienthiBaocao = 1;
            objLuotkham.TrangthaiCapcuu = chkCapCuu.Checked ? 1 : 0;
            objLuotkham.IdKhoatiepnhan = globalVariables.idKhoatheoMay;
            objLuotkham.NguoiTao = globalVariables.UserName;
            objLuotkham.NgayTao = globalVariables.SysDate;
            objLuotkham.Cmt = Utility.sDbnull(txtCMT.Text, "");
            objLuotkham.DiaChi = txtDiachi.Text;
            objLuotkham.Email = txtEmail.Text;
            objLuotkham.NoiGioithieu = txtNoigioithieu.Text;
            objLuotkham.NhomBenhnhan = txtLoaiBN.myCode;
            objLuotkham.IdBenhvienDen = Utility.Int16Dbnull(txtNoichuyenden.MyID, -1);
            objLuotkham.TthaiChuyenden = (byte)(chkChuyenVien.Checked ? 1 : 0);
            if (THU_VIEN_CHUNG.IsBaoHiem(_IdLoaidoituongKcb))
            {
                Laymathe_BHYT();
                objLuotkham.MaKcbbd = Utility.sDbnull(txtNoiDKKCBBD.Text, "");
                objLuotkham.NoiDongtrusoKcbbd = Utility.sDbnull(txtNoiDongtrusoKCBBD.Text, "");
                objLuotkham.MaNoicapBhyt = Utility.sDbnull(txtNoiphattheBHYT.Text);
                objLuotkham.LuongCoban = globalVariables.LUONGCOBAN;
                objLuotkham.MatheBhyt = Laymathe_BHYT();
                objLuotkham.MaDoituongBhyt = Utility.sDbnull(txtMaDtuong_BHYT.Text);
                objLuotkham.MaQuyenloi = Utility.Int32Dbnull(txtMaQuyenloi_BHYT.Text, null);
                objLuotkham.DungTuyen= !chkTraiTuyen.Visible ? 1 : (((byte?)(chkTraiTuyen.Checked ? 0 : 1)));

                objLuotkham.MadtuongSinhsong = txtMaDTsinhsong.myCode;
                objLuotkham.GiayBhyt = Utility.Bool2byte(chkGiayBHYT.Checked);

                objLuotkham.NgayketthucBhyt = dtInsToDate.Value.Date;
                objLuotkham.NgaybatdauBhyt = dtInsFromDate.Value.Date;
                objLuotkham.NoicapBhyt = Utility.GetValue(lblNoiCapThe.Text, false);
                objLuotkham.DiachiBhyt = Utility.sDbnull(txtDiachi_bhyt.Text);

            }
            else
            {
                objLuotkham.GiayBhyt = 0;
                objLuotkham.MadtuongSinhsong = "";
                objLuotkham.MaKcbbd = "";
                objLuotkham.NoiDongtrusoKcbbd = "";
                objLuotkham.MaNoicapBhyt = "";
                objLuotkham.LuongCoban = globalVariables.LUONGCOBAN;
                objLuotkham.MatheBhyt = "";
                objLuotkham.MaDoituongBhyt = "";
                objLuotkham.MaQuyenloi = -1;
                objLuotkham.DungTuyen = 0;

                objLuotkham.NgayketthucBhyt = null;
                objLuotkham.NgaybatdauBhyt = null;
                objLuotkham.NoicapBhyt = "";
                objLuotkham.DiachiBhyt = "";

            }

            objLuotkham.SolanKham = Utility.Int16Dbnull(txtSolankham.Text, 0);
            objLuotkham.TrieuChung = Utility.ReplaceStr(txtTrieuChungBD.Text);
            //Tránh lỗi khi update người dùng nhập mã lần khám lung tung
            if (m_enAction == action.Update) txtMaLankham.Text = m_strMaluotkham;
            objLuotkham.MaLuotkham = Utility.sDbnull(txtMaLankham.Text, "");
            objLuotkham.IdBenhnhan = Utility.Int64Dbnull(txtMaBN.Text, -1);
            DmucDoituongkcb objectType = DmucDoituongkcb.FetchByID(_IdDoituongKcb);
            if (objectType != null)
            {
                objLuotkham.MaDoituongKcb = Utility.sDbnull(objectType.MaDoituongKcb, "");
            }
            if (m_enAction == action.Update)
            {
                objLuotkham.NgayTiepdon = dtCreateDate.Value;
                objLuotkham.NguoiSua = globalVariables.UserName;
                objLuotkham.NgaySua = globalVariables.SysDate;
                objLuotkham.IpMaysua = globalVariables.gv_strIPAddress;
                objLuotkham.TenMaysua = globalVariables.gv_strComputerName;
            }
            if (m_enAction == action.Add || m_enAction == action.Insert)
            {
                objLuotkham.NgayTiepdon = dtCreateDate.Value;
                objLuotkham.NguoiTiepdon = globalVariables.UserName;
//.........这里部分代码省略.........
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:101,代码来源:frm_KCB_DANGKY.cs

示例3: Payment4SelectedItems_Ao

        public ActionResult Payment4SelectedItems_Ao(KcbThanhtoan objThanhtoan, KcbLuotkham objLuotkham, List<KcbThanhtoanChitiet> objArrPaymentDetail, ref int id_thanhtoan, long IdHdonLog, bool Layhoadondo)
        {
            decimal PtramBHYT = 0;
            ///tổng tiền hiện tại truyền vào của lần payment đang thực hiện
            decimal v_dblTongtienDCT = 0;
            ///tổng tiền đã thanh toán
            decimal v_TotalPaymentDetail = 0;
            try
            {
                using (var scope = new TransactionScope())
                {
                    using (var dbscope = new SharedDbConnectionScope())
                    {
                        ///lấy tổng số Payment của mang truyền vào của pay ment hiện tại
                        v_dblTongtienDCT = TongtienKhongTutuc(objArrPaymentDetail);
                        KcbThanhtoanCollection paymentCollection =
                            new KcbThanhtoanController()
                            .FetchByQuery(
                                KcbThanhtoan.CreateQuery()
                                .AddWhere(KcbThanhtoan.Columns.MaLuotkham, Comparison.Equals, objLuotkham.MaLuotkham)
                                .AND(KcbThanhtoan.Columns.IdBenhnhan, Comparison.Equals, objLuotkham.IdBenhnhan)
                                .AND(KcbThanhtoan.Columns.KieuThanhtoan, Comparison.Equals, objThanhtoan.KieuThanhtoan)
                                .AND(KcbThanhtoan.Columns.TrangThai, Comparison.Equals, 0));
                        //Lấy tổng tiền của các lần thanh toán trước
                        List<KcbThanhtoanChitiet> lstKcbThanhtoanChitiet = new List<KcbThanhtoanChitiet>();
                        foreach (KcbThanhtoan Payment in paymentCollection)
                        {
                            KcbThanhtoanChitietCollection paymentDetailCollection = new Select().From(KcbThanhtoanChitiet.Schema)
                                .Where(KcbThanhtoanChitiet.Columns.IdThanhtoan).IsEqualTo(Payment.IdThanhtoan)
                                .And(KcbThanhtoanChitiet.Columns.TrangthaiHuy).IsEqualTo(0).ExecuteAsCollection
                                <KcbThanhtoanChitietCollection>();

                            foreach (KcbThanhtoanChitiet paymentDetail in paymentDetailCollection)
                            {
                                if (paymentDetail.TuTuc == 0)
                                {
                                    lstKcbThanhtoanChitiet.Add(paymentDetail);

                                    v_TotalPaymentDetail += Utility.Int32Dbnull(paymentDetail.SoLuong) *
                                                            Utility.DecimaltoDbnull(paymentDetail.DonGia);
                                }

                            }
                        }

                        //Tính toán lại phần trăm BHYT chủ yếu liên quan đến phần lương cơ bản.
                        //Phần trăm này có thể bị biến đổi và khác với % trong bảng lượt khám
                        LayThongtinPtramBHYT(v_dblTongtienDCT + v_TotalPaymentDetail, objLuotkham, ref PtramBHYT);
                        objThanhtoan.MaThanhtoan = THU_VIEN_CHUNG.TaoMathanhtoan(Convert.ToDateTime(objThanhtoan.NgayThanhtoan));
                        objThanhtoan.IsNew = true;
                        objThanhtoan.Save();
                        //Tính lại Bnhan chi trả và BHYT chi trả
                         THU_VIEN_CHUNG.TinhPhamTramBHYT(objLuotkham, ref objArrPaymentDetail,ref lstKcbThanhtoanChitiet, PtramBHYT);
                         foreach (KcbThanhtoanChitiet objThanhtoanDetail in lstKcbThanhtoanChitiet)
                         {
                             objThanhtoanDetail.IsNew = false;
                             objThanhtoanDetail.MarkOld();
                             objThanhtoanDetail.Save();
                         }
                        decimal TT_BN = 0m;
                        decimal TT_BHYT = 0m;
                        decimal TT_Chietkhau_Chitiet = 0m;
                        foreach (KcbThanhtoanChitiet objThanhtoanDetail in objArrPaymentDetail)
                        {
                            TT_BN += (objThanhtoanDetail.BnhanChitra + objThanhtoanDetail.PhuThu) * objThanhtoanDetail.SoLuong;
                            TT_BHYT += objThanhtoanDetail.BhytChitra * objThanhtoanDetail.SoLuong;
                            TT_Chietkhau_Chitiet += Utility.DecimaltoDbnull(objThanhtoanDetail.TienChietkhau, 0);
                            objThanhtoanDetail.IdThanhtoan = Utility.Int32Dbnull(objThanhtoan.IdThanhtoan, -1);
                            objThanhtoanDetail.IsNew = true;
                            objThanhtoanDetail.Save();
                            UpdatePaymentStatus(objThanhtoan, objThanhtoanDetail);
                        }

                        #region Hoadondo

                        if (Layhoadondo)
                        {
                            int record = -1;
                            if (IdHdonLog > 0)
                            {
                                record =
                                    new Delete().From(HoadonLog.Schema)
                                        .Where(HoadonLog.Columns.IdHdonLog)
                                        .IsEqualTo(IdHdonLog)
                                        .Execute();
                                if (record <= 0)
                                {
                                    Utility.ShowMsg("Có lỗi trong quá trình xóa thông tin serie hóa đơn đã hủy để cấp lại cho lần thanh toán này.");
                                    return ActionResult.Error;
                                }
                            }
                            var obj = new HoadonLog();
                            obj.IdThanhtoan = objThanhtoan.IdThanhtoan;
                            obj.TongTien = objThanhtoan.TongTien - Utility.DecimaltoDbnull(objThanhtoan.TongtienChietkhau, 0);
                            obj.IdBenhnhan = objThanhtoan.IdBenhnhan;
                            obj.MaLuotkham = objThanhtoan.MaLuotkham;
                            obj.MauHoadon = objThanhtoan.MauHoadon;
                            obj.KiHieu = objThanhtoan.KiHieu;
                            obj.IdCapphat = objThanhtoan.IdCapphat.Value;
                            obj.MaQuyen = objThanhtoan.MaQuyen;
//.........这里部分代码省略.........
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:101,代码来源:KCB_THANHTOAN.cs

示例4: TaoLuotkham

        /// <summary>
        /// hàm thực hiện việc khwoir tạo thoog tin PatietnExam
        /// </summary>
        /// <returns></returns>
        private KcbLuotkham TaoLuotkham()
        {
            objLuotkham = new KcbLuotkham();
            if (m_enAction == action.Insert || m_enAction == action.Add)
            {
                //Bỏ đi do đã sinh theo cơ chế bảng danh mục mã lượt khám. Nếu ko sẽ mất mã lượt khám hiện thời.
                // txtMaLankham.Text = THU_VIEN_CHUNG.KCB_SINH_MALANKHAM();
                objLuotkham.IsNew = true;
            }
            else
            {
                objLuotkham = KcbLuotkham.FetchByID(m_strMaluotkham);
                if (objLuotkham == null) return null;
                objLuotkham.MarkOld();
                objLuotkham.IsNew = false;
            }
            objLuotkham.KieuKham = txtLoaikham.myCode;
            objLuotkham.MaKhoaThuchien = globalVariables.MA_KHOA_THIEN;
            objLuotkham.Noitru = 0;
            objLuotkham.IdDoituongKcb = _IdDoituongKcb;
            objLuotkham.IdLoaidoituongKcb = _IdLoaidoituongKcb;
            objLuotkham.Locked = 0;
            objLuotkham.HienthiBaocao = 1;
            objLuotkham.TrangthaiCapcuu = 0;
            objLuotkham.IdKhoatiepnhan = globalVariables.idKhoatheoMay;
            objLuotkham.NguoiTao = globalVariables.UserName;
            objLuotkham.NgayTao = globalVariables.SysDate;
            objLuotkham.Cmt = "";
            objLuotkham.DiaChi = txtDiachi.Text;
            objLuotkham.CachTao = 0;
            objLuotkham.Email = txtEmail.Text;
            objLuotkham.NoiGioithieu = "";
            objLuotkham.TraKQPhongchuyenmon = Utility.Bool2byte(chkPhongchuyenmon.Checked);
            objLuotkham.TraKQFax = Utility.Bool2byte(chkFax.Checked);
            objLuotkham.TraKQMail = Utility.Bool2byte(chkMail.Checked);
            objLuotkham.TraKQEmail = Utility.Bool2byte(chkEmail.Checked);
            objLuotkham.SosanhQcvn = Utility.Bool2byte(chkSosanh.Checked);
            objLuotkham.MotaThem = Utility.DoTrim(txtMotathem.Text);
            objLuotkham.NhomBenhnhan = "-1";
            objLuotkham.IdBenhvienDen = -1;
            objLuotkham.TthaiChuyenden = 0;

            objLuotkham.GiayBhyt = 0;
            objLuotkham.MadtuongSinhsong = "";
            objLuotkham.MaKcbbd = "";
            objLuotkham.NoiDongtrusoKcbbd = "";
            objLuotkham.MaNoicapBhyt = "";
            objLuotkham.LuongCoban = globalVariables.LUONGCOBAN;
            objLuotkham.MatheBhyt = "";
            objLuotkham.MaDoituongBhyt = "";
            objLuotkham.MaQuyenloi = -1;
            objLuotkham.DungTuyen = 0;

            objLuotkham.NgayketthucBhyt = null;
            objLuotkham.NgaybatdauBhyt = null;
            objLuotkham.NoicapBhyt = "";
            objLuotkham.DiachiBhyt = "";
            objLuotkham.SolanKham = Utility.Int16Dbnull(txtSolankham.Text, 0);
            objLuotkham.TrieuChung = "";
            //Tránh lỗi khi update người dùng nhập Mã đăng ký lung tung
            if (m_enAction == action.Update) txtMaLankham.Text = m_strMaluotkham;
            objLuotkham.MaLuotkham = Utility.sDbnull(txtMaLankham.Text, "");
            objLuotkham.IdBenhnhan = Utility.Int64Dbnull(txtMaBN.Text, -1);
            DmucDoituongkcb objectType = DmucDoituongkcb.FetchByID(_IdDoituongKcb);
            if (objectType != null)
            {
                objLuotkham.MaDoituongKcb = Utility.sDbnull(objectType.MaDoituongKcb, "");
            }
            if (m_enAction == action.Update)
            {
                objLuotkham.NgayTiepdon = dtCreateDate.Value;
                objLuotkham.NguoiSua = globalVariables.UserName;
                objLuotkham.NgaySua = globalVariables.SysDate;
                objLuotkham.IpMaysua = globalVariables.gv_strIPAddress;
                objLuotkham.TenMaysua = globalVariables.gv_strComputerName;
            }
            if (m_enAction == action.Add || m_enAction == action.Insert)
            {
                objLuotkham.NgayTiepdon = dtCreateDate.Value;
                objLuotkham.NguoiTiepdon = globalVariables.UserName;

                objLuotkham.IpMaytao = globalVariables.gv_strIPAddress;
                objLuotkham.TenMaytao = globalVariables.gv_strComputerName;
            }
            objLuotkham.PtramBhytGoc = 0;
            objLuotkham.PtramBhyt = 0;
            return objLuotkham;
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:92,代码来源:frm_Dangky_Kiemnghiem.cs

示例5: Update

        public void Update(long IdBenhnhan,string MaLuotkham,DateTime NgayTiepdon,string NguoiTiepdon,short IdDoituongKcb,string MadoituongGia,string MaDoituongKcb,byte? IdLoaidoituongKcb,string NguoiLienhe,string DienthoaiLienhe,string DiachiLienhe,decimal? PtramBhytGoc,decimal? PtramBhyt,string MatheBhyt,DateTime? NgaybatdauBhyt,DateTime? NgayketthucBhyt,string NoicapBhyt,string MaNoicapBhyt,string MaDoituongBhyt,int? MaQuyenloi,string NoiDongtrusoKcbbd,string MaKcbbd,byte? DungTuyen,string Cmt,DateTime? NgayThanhtoan,decimal? LuongCoban,int? TrangthaiCapcuu,string TrieuChung,string ChanDoan,string KetLuan,string HuongDieutri,string MabenhChinh,string MabenhPhu,byte HienthiBaocao,string SoBenhAn,int? SongayDieutri,short? IdKhoatiepnhan,short? SolanKham,int? SttKham,byte? Noitru,string MaKhoaThuchien,string ChandoanKemtheo,string NguoiKetthuc,DateTime? NgayKetthuc,string LydoKetthuc,string DiaChi,string DiachiBhyt,short? IdBenhvienDen,short? IdBenhvienDi,byte? TthaiChuyenden,byte? TthaiChuyendi,short? IdBacsiChuyenvien,byte? TrangthaiNgoaitru,byte TrangthaiNoitru,byte Locked,byte? TthaiThopNoitru,byte? TthaiThanhtoannoitru,int? IdNhapvien,DateTime? NgayNhapvien,DateTime? NgayRavien,int? SoRavien,string MotaNhapvien,int? IdRavien,short? IdKhoanoitru,short? IdBuong,short? IdGiuong,DateTime? NgayKedon,DateTime? NgayNhanthuoc,DateTime? NgayNhanketquaCls,string NoiGioithieu,byte? BoVien,string Email,string NhomBenhnhan,byte? GiayBhyt,string MadtuongSinhsong,string IpMaytao,string IpMaysua,string TenMaytao,string TenMaysua,DateTime NgayTao,string NguoiTao,DateTime? NgaySua,string NguoiSua)
        {
            KcbLuotkham item = new KcbLuotkham();
            item.MarkOld();
            item.IsLoaded = true;

            item.IdBenhnhan = IdBenhnhan;

            item.MaLuotkham = MaLuotkham;

            item.NgayTiepdon = NgayTiepdon;

            item.NguoiTiepdon = NguoiTiepdon;

            item.IdDoituongKcb = IdDoituongKcb;

            item.MadoituongGia = MadoituongGia;

            item.MaDoituongKcb = MaDoituongKcb;

            item.IdLoaidoituongKcb = IdLoaidoituongKcb;

            item.NguoiLienhe = NguoiLienhe;

            item.DienthoaiLienhe = DienthoaiLienhe;

            item.DiachiLienhe = DiachiLienhe;

            item.PtramBhytGoc = PtramBhytGoc;

            item.PtramBhyt = PtramBhyt;

            item.MatheBhyt = MatheBhyt;

            item.NgaybatdauBhyt = NgaybatdauBhyt;

            item.NgayketthucBhyt = NgayketthucBhyt;

            item.NoicapBhyt = NoicapBhyt;

            item.MaNoicapBhyt = MaNoicapBhyt;

            item.MaDoituongBhyt = MaDoituongBhyt;

            item.MaQuyenloi = MaQuyenloi;

            item.NoiDongtrusoKcbbd = NoiDongtrusoKcbbd;

            item.MaKcbbd = MaKcbbd;

            item.DungTuyen = DungTuyen;

            item.Cmt = Cmt;

            item.NgayThanhtoan = NgayThanhtoan;

            item.LuongCoban = LuongCoban;

            item.TrangthaiCapcuu = TrangthaiCapcuu;

            item.TrieuChung = TrieuChung;

            item.ChanDoan = ChanDoan;

            item.KetLuan = KetLuan;

            item.HuongDieutri = HuongDieutri;

            item.MabenhChinh = MabenhChinh;

            item.MabenhPhu = MabenhPhu;

            item.HienthiBaocao = HienthiBaocao;

            item.SoBenhAn = SoBenhAn;

            item.SongayDieutri = SongayDieutri;

            item.IdKhoatiepnhan = IdKhoatiepnhan;

            item.SolanKham = SolanKham;

            item.SttKham = SttKham;

            item.Noitru = Noitru;

            item.MaKhoaThuchien = MaKhoaThuchien;

            item.ChandoanKemtheo = ChandoanKemtheo;

            item.NguoiKetthuc = NguoiKetthuc;

            item.NgayKetthuc = NgayKetthuc;

            item.LydoKetthuc = LydoKetthuc;

            item.DiaChi = DiaChi;

            item.DiachiBhyt = DiachiBhyt;

//.........这里部分代码省略.........
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:101,代码来源:KcbLuotkhamController.cs

示例6: UpdateLanKham

        public ActionResult UpdateLanKham(SysTrace mytrace, KcbDanhsachBenhnhan objKcbDanhsachBenhnhan, KcbLuotkham objLuotkham, KcbDangkyKcb objKcbDangkyKcb, KcbDangkySokham objSoKCB, int KieuKham, decimal PtramBhytCu, decimal PtramBhytgoc, ref string Msg)
        {
            ActionResult _ActionResult = ActionResult.Success;
            try
            {
                using (var scope = new TransactionScope())
                {
                    using (var dbscope = new SharedDbConnectionScope())
                    {

                        UpdatePatientInfo(objKcbDanhsachBenhnhan);
                        long IdLichsuDoituongKcb = KcbLayIdDoituongKCBHientai(objLuotkham.IdBenhnhan, objLuotkham.MaLuotkham);
                        KcbLichsuDoituongKcb objLichsuKcb = null;
                        if (IdLichsuDoituongKcb > 0)
                        {
                            objLichsuKcb = KcbLichsuDoituongKcb.FetchByID(IdLichsuDoituongKcb);
                            objLichsuKcb.MarkOld();
                            objLichsuKcb.IsNew = false;
                        }
                        else
                        {
                            objLichsuKcb = new KcbLichsuDoituongKcb();
                            objLichsuKcb.IsNew = true;
                        }
                        if (objLichsuKcb == null)
                        {
                            Msg = "NULL-->Không lấy được thông tin lịch sử đối tượng KCB của Bệnh nhân";
                            return ActionResult.Error;
                        }

                        objLichsuKcb.IdBenhnhan = objLuotkham.IdBenhnhan;
                        objLichsuKcb.MaLuotkham = objLuotkham.MaLuotkham;
                        objLichsuKcb.NgayHieuluc = objLuotkham.NgayTiepdon;
                        objLichsuKcb.IdDoituongKcb = objLuotkham.IdDoituongKcb;
                        objLichsuKcb.MaDoituongKcb = objLuotkham.MaDoituongKcb;
                        objLichsuKcb.IdLoaidoituongKcb = objLuotkham.IdLoaidoituongKcb;
                        objLichsuKcb.MatheBhyt = objLuotkham.MatheBhyt;
                        objLichsuKcb.PtramBhyt = objLuotkham.PtramBhyt;
                        objLichsuKcb.PtramBhytGoc = objLuotkham.PtramBhytGoc;
                        objLichsuKcb.NgaybatdauBhyt = objLuotkham.NgaybatdauBhyt;
                        objLichsuKcb.NgayketthucBhyt = objLuotkham.NgayketthucBhyt;
                        objLichsuKcb.NoicapBhyt = objLuotkham.NoicapBhyt;
                        objLichsuKcb.MaNoicapBhyt = objLuotkham.MaNoicapBhyt;
                        objLichsuKcb.MaDoituongBhyt = objLuotkham.MaDoituongBhyt;
                        objLichsuKcb.MaQuyenloi = objLuotkham.MaQuyenloi;
                        objLichsuKcb.NoiDongtrusoKcbbd = objLuotkham.NoiDongtrusoKcbbd;

                        objLichsuKcb.MaKcbbd = objLuotkham.MaKcbbd;
                        objLichsuKcb.TrangthaiNoitru = 0;
                        objLichsuKcb.DungTuyen = objLuotkham.DungTuyen;
                        objLichsuKcb.Cmt = objLuotkham.Cmt;
                        objLichsuKcb.IdRavien = -1;
                        objLichsuKcb.IdBuong = -1;
                        objLichsuKcb.IdGiuong = -1;
                        objLichsuKcb.IdKhoanoitru = -1;
                        objLichsuKcb.NguoiTao = globalVariables.UserName;
                        objLichsuKcb.NgayTao = globalVariables.SysDate;
                        objLichsuKcb.Save();

                        objLuotkham.IdLichsuDoituongKcb = objLichsuKcb.IdLichsuDoituongKcb;
                        objLuotkham.MarkOld();
                        objLuotkham.IsNew = false;
                        objLuotkham.Save();
                        if (objSoKCB != null)
                        {
                            //Kiểm tra xem có sổ KCB hay chưa
                            objSoKCB.MaLuotkham = Utility.sDbnull(objLuotkham.MaLuotkham);
                            objSoKCB.IdBenhnhan = Utility.Int32Dbnull(objLuotkham.IdBenhnhan);
                            KcbDangkySokham _temp = new Select().From(KcbDangkySokham.Schema).Where(KcbDangkySokham.Columns.IdBenhnhan).IsEqualTo(objLuotkham.IdBenhnhan)
                                .And(KcbDangkySokham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham)
                                .ExecuteSingle<KcbDangkySokham>();
                            if (_temp == null)
                            {
                                objSoKCB.IdLichsuDoituongKcb = objLichsuKcb.IdLichsuDoituongKcb;
                                objSoKCB.NgayTao = globalVariables.SysDate;
                                objSoKCB.NguoiTao = globalVariables.UserName;
                                objSoKCB.IsNew = true;
                                objSoKCB.Save();
                            }
                            else
                            {
                                if (Utility.Int64Dbnull(_temp.IdThanhtoan, 0) > 0)//Ko làm gì cả
                                {
                                    Msg = "Đã thu tiền sổ khám của Bệnh nhân nên không được phép xóa hoặc cập nhật lại";
                                }
                                else//Update lại sổ KCB
                                {
                                    _temp.DonGia = objSoKCB.DonGia;
                                    _temp.BnhanChitra = objSoKCB.BnhanChitra;
                                    _temp.BhytChitra = objSoKCB.BhytChitra;
                                    _temp.PtramBhyt = objSoKCB.PtramBhyt;
                                    _temp.PtramBhytGoc = objSoKCB.PtramBhytGoc;
                                    _temp.PhuThu = objSoKCB.PhuThu;
                                    _temp.TuTuc = objSoKCB.TuTuc;
                                    _temp.NguonThanhtoan = objSoKCB.NguonThanhtoan;
                                    _temp.IdLoaidoituongkcb = objSoKCB.IdLoaidoituongkcb;
                                    _temp.IdDoituongkcb = objSoKCB.IdDoituongkcb;
                                    _temp.MaDoituongkcb = objSoKCB.MaDoituongkcb;
                                    _temp.IdLichsuDoituongKcb = objLichsuKcb.IdLichsuDoituongKcb;
                                    _temp.Noitru = objSoKCB.Noitru;
//.........这里部分代码省略.........
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:101,代码来源:KCB_DANGKY.cs

示例7: CapnhatDangkymauKiemnghiem

        public ActionResult CapnhatDangkymauKiemnghiem(SysTrace mytrace, KcbDanhsachBenhnhan objKcbDanhsachBenhnhan, KcbLuotkham objLuotkham,  ref string Msg)
        {
            ActionResult _ActionResult = ActionResult.Success;
            try
            {
                using (var scope = new TransactionScope())
                {
                    using (var dbscope = new SharedDbConnectionScope())
                    {

                        objKcbDanhsachBenhnhan.Save();
                        objLuotkham.MarkOld();
                        objLuotkham.IsNew = false;
                        objLuotkham.Save();
                        mytrace.Desc = string.Format("Cập nhật  Bệnh nhân ID={0}, Code={1}, Name={2}", objKcbDanhsachBenhnhan.IdBenhnhan.ToString(), objLuotkham.MaLuotkham, objKcbDanhsachBenhnhan.TenBenhnhan);
                        mytrace.Lot = 0;
                        mytrace.IsNew = true;
                        mytrace.Save();
                        scope.Complete();
                        return ActionResult.Success;
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error("Loi trong qua trinh update thong tin benh nhan {0}", ex);
                return ActionResult.Error;
            }
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:29,代码来源:KCB_DANGKY.cs


注:本文中的KcbLuotkham.MarkOld方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。