Example #1
0
        private void FrmCardSavingCash_Load(object sender, EventArgs e)
        {
            string projectType = SkyComm.getvalue("项目版本标识");

            if (!string.IsNullOrEmpty(projectType) && projectType == "锡林郭勒盟医院")
            {
                SkyComm.ShowMessageInfo("提示:系统可接受50元、100元的纸币。");
            }

            ucTime1.Sec = 60;
            ucTime1.timer1.Start();

            try
            {
                if (!BindPage() || !CheckInHosSaving())
                {
                    SkyComm.CloseWin(this);
                }
            }
            catch (Exception ex)
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("调用现金预存LOAD失败:" + ex.Message);
                throw ex;
            }
        }
Example #2
0
 private void lblOK_Click(object sender, EventArgs e)
 {
     try
     {
         GetScore();
         TEvaluationResultData   entity = new TEvaluationResultData();
         TEvaluationResultFacade facade = new TEvaluationResultFacade();
         foreach (DataRow dr in dtEvaluation.Rows)
         {
             entity.Evaluationid = dr["EVALUATIONID"].ToString();
             entity.Resultid     = Guid.NewGuid().ToString();
             entity.Resultscore  = Convert.ToInt32(dr["DEFAULTSCORE"].ToString());
             entity.Diagnoseid   = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
             entity.Operatetime  = DateTime.Now;
             facade.Insert(entity);
         }
         SkyComm.ShowMessageInfo("满意度调查信息提交成功,谢谢!");
     }
     catch (Exception ex)
     {
         Skynet.LoggingService.LogService.GlobalInfoMessage("满意度调查保存失败:" + ex.Message);
         SkyComm.ShowMessageInfo("保存满意度调查信息失败!");
     }
     finally
     {
         SkyComm.CloseWin(this);
     }
 }
 private void FrmReIssueCardInfo_Load(object sender, EventArgs e)
 {
     ucTime1.Sec = 60;
     ucTime1.timer1.Start();
     if (AutoHostConfig.SendCardType == "XUHUI")
     {
         SendCard = new AutoServiceSDK.SdkService.SendCard_XH();
     }
     else if (AutoHostConfig.SendCardType == "XUHUI_PH")            //省医院
     {
         SendCard = new AutoServiceSDK.SdkService.SendCardNew_XH(); //射频卡
     }
     else if (AutoHostConfig.SendCardType == "XUHUI_XM")
     {
         SendCard = new AutoServiceSDK.SdkService.SendCardNew_XH();//射频卡
     }
     if (!BindPageList())
     {
         SkyComm.CloseWin(this);
     }
 }
        private void FrmCardSavingBank_Load(object sender, EventArgs e)
        {
            try
            {
                if (BindPage() && CheckInHosSaving())
                {
                    if (!backgroundWorker1.IsBusy)
                    {
                        backgroundWorker1.RunWorkerAsync();
                    }
                    ucTime1.Sec = 60;

                    ucTime1.timer1.Start();
                }
                else
                {
                    SkyComm.CloseWin(this);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #5
0
        private void lblOK_Click(object sender, EventArgs e)
        {
            this.AnsyWorker(ui =>
            {
                ui.UpdateTitle("正在缴费中,请稍等...");

                ui.SynUpdateUI(() =>
                {
                    #region 验证缴费处方信息

                    DataTable dtMain = dsRecipe.Tables[0].DefaultView.ToTable();

                    IEnumerable <string> _CLINICRECIPEIDs = dtMain.AsEnumerable().Where(b => b.Field <bool>("PITCHON1") == true).Select(a => a.Field <string>("CLINICRECIPEID")).Distinct();
                    if (_CLINICRECIPEIDs.Count() == 0)
                    {
                        SkyComm.ShowMessageInfo("请选择要缴费的处方!");
                        return;
                    }
                    this.ucTime1.timer1.Stop();
                    //选中处方的金额
                    decimal sumMoney = DecimalRound.Round(Convert.ToDecimal(dtMain.Compute("SUM(TOTALMONEY)", "PITCHON1 = true")), 2);

                    ClinicPhysicianRecipeFacade clinicPhysicianRecipeFacade = new ClinicPhysicianRecipeFacade();
                    DataSet dsTemp = clinicPhysicianRecipeFacade.FindRecipeDetailByDiagnoseID(SkyComm.DiagnoseID, string.Empty, "3");

                    DataSet ds = dsTemp.Clone();
                    foreach (DataRow row in dsTemp.Tables[0].Rows)
                    {
                        if (_CLINICRECIPEIDs.Contains(row["CLINICRECIPEID"].ToString()))
                        {
                            ds.Tables[0].ImportRow(row);
                        }
                    }
                    if (ds.Tables[0].Rows.Count < 1)
                    {
                        SkyComm.ShowMessageInfo("没有找到可进行缴费的处方记录,请检查处方号");
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }
                    //调用大通审方系统
                    if (!CheckDTPass(ds))
                    {
                        return;
                    }
                    #endregion

                    #region 组织缴费处方信息
                    CommonFacade commonFacade = new CommonFacade();
                    DateTime ServerTime       = commonFacade.GetServerDateTime();

                    LeechdomCharge charge = new LeechdomCharge(SkyComm.DiagnoseID, SysOperatorInfo.OperatorID);
                    charge.AddRecipeCharge(ds);

                    decimal decHisMoney = DecimalRound.Round(Convert.ToDecimal(charge.detailAccountData.Tables[0].Compute("SUM(MONEY)", "")), 2);

                    if (decHisMoney != sumMoney)
                    {
                        charge.detailAccountData.Clear();
                        charge.ecipeMedicineData.Clear();
                        SkyComm.ShowMessageInfo("选择的处方金额不正确,请在门诊窗口进行缴费!");
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }

                    if (decHisMoney > SkyComm.cardBlance)
                    {
                        charge.detailAccountData.Clear();
                        charge.ecipeMedicineData.Clear();
                        SkyComm.ShowMessageInfo("余额不足,请先进行自助预存,再进行缴费!");
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }
                    #endregion

                    #region 缴费
                    try
                    {
                        //验证西北妇幼高值耗材
                        if (!CheckHValueMaterial(charge.detailAccountData))
                        {
                            throw new Exception("缴费信息中有高值耗材,请在门诊窗口进行缴费!");
                        }

                        DetailAccountFacade detailAccountFacade = new DetailAccountFacade();
                        DataSet dads = detailAccountFacade.insertEntityNoInvoice(charge.detailAccountData, ref charge.ecipeMedicineData);
                        SkyComm.GetCardBalance();
                        SkyComm.ShowMessageInfo("缴费成功!");

                        //根据“药房自动配药接口类型”配置为2时,调用西北妇幼的派昂接口 19797
                        string AutoDoseConfig = SystemInfo.SystemConfigs["药房自动配药接口类型"].DefaultValue;
                        string strCK          = string.Empty;
                        if (AutoDoseConfig == "2" && charge.ecipeMedicineData.Tables[0].Rows.Count > 0)
                        {
                            strCK = UploadAngPaiData(dads, charge.ecipeMedicineData, dsTemp);
                        }

                        PrintReport(dads, strCK, dsRecipe);//打印交费凭证
                    }
                    catch (Exception err)
                    {
                        charge.detailAccountData.Clear();
                        charge.ecipeMedicineData.Clear();
                        Skynet.LoggingService.LogService.GlobalInfoMessage(SkyComm.DiagnoseID + "缴费失败:" + err.Message);
                        SkyComm.ShowMessageInfo("缴费失败:" + err.Message);
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }

                    dsRecipe = GetRecipeInfo();
                    if (dsRecipe == null || dsRecipe.Tables[0].Rows.Count == 0)
                    {
                        SkyComm.CloseWin(this);
                    }
                    else
                    {
                        this.gdcMain.DataSource = dsRecipe.Tables[0].DefaultView;

                        lblYE.Text = SkyComm.cardBlance.ToString();

                        refreshUI();
                    }
                    #endregion
                });
            });
        }
Example #6
0
        public void NetPay(string hisno, string payMethod)
        {
            this.AnsyWorker(ui =>
            {
                ui.UpdateTitle("正在缴费中,请稍等...");

                ui.SynUpdateUI(() =>
                {
                    #region 验证缴费处方信息

                    DataTable dtMain = dsRecipe.Tables[0].DefaultView.ToTable();

                    IEnumerable <string> _CLINICRECIPEIDs = dtMain.AsEnumerable().Where(b => b.Field <bool>("PITCHON1") == true).Select(a => a.Field <string>("CLINICRECIPEID")).Distinct();
                    if (_CLINICRECIPEIDs.Count() == 0)
                    {
                        SkyComm.ShowMessageInfo("请选择要缴费的处方!");
                        return;
                    }
                    this.ucTime1.timer1.Stop();
                    //选中处方的金额
                    decimal sumMoney = DecimalRound.Round(Convert.ToDecimal(dtMain.Compute("SUM(TOTALMONEY)", "PITCHON1 = true")), 2);

                    ClinicPhysicianRecipeFacade clinicPhysicianRecipeFacade = new ClinicPhysicianRecipeFacade();
                    DataSet dsTemp = clinicPhysicianRecipeFacade.FindRecipeDetailByDiagnoseID(SkyComm.DiagnoseID, string.Empty, "3");

                    DataSet ds = dsTemp.Clone();
                    foreach (DataRow row in dsTemp.Tables[0].Rows)
                    {
                        if (_CLINICRECIPEIDs.Contains(row["CLINICRECIPEID"].ToString()))
                        {
                            ds.Tables[0].ImportRow(row);
                        }
                    }
                    if (ds.Tables[0].Rows.Count < 1)
                    {
                        SkyComm.ShowMessageInfo("没有找到可进行缴费的处方记录,请检查处方号");
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }
                    //调用大通审方系统
                    if (!CheckDTPass(ds))
                    {
                        return;
                    }
                    #endregion

                    #region 组织缴费处方信息
                    CommonFacade commonFacade = new CommonFacade();
                    DateTime ServerTime       = commonFacade.GetServerDateTime();

                    LeechdomCharge charge = new LeechdomCharge(SkyComm.DiagnoseID, SysOperatorInfo.OperatorID);
                    charge.AddRecipeCharge(ds);

                    decimal decHisMoney = DecimalRound.Round(Convert.ToDecimal(charge.detailAccountData.Tables[0].Compute("SUM(MONEY)", "")), 2);

                    if (decHisMoney != sumMoney)
                    {
                        charge.detailAccountData.Clear();
                        charge.ecipeMedicineData.Clear();
                        SkyComm.ShowMessageInfo("选择的处方金额不正确,请在门诊窗口进行缴费!");
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }


                    #endregion

                    #region 缴费
                    try
                    {
                        //验证西北妇幼高值耗材
                        if (!CheckHValueMaterial(charge.detailAccountData))
                        {
                            throw new Exception("缴费信息中有高值耗材,请在门诊窗口进行缴费!");
                        }

                        DetailAccountFacade detailAccountFacade = new DetailAccountFacade();


                        DataSet data = new DataSet();

                        Hashtable hashtable = new Hashtable();

                        hashtable.Add("@HISSEQNO", hisno);

                        string mSql = "SELECT * FROM T_BANKHISEXCHANGE_TRANS where HISSEQNO = @HISSEQNO";// and BANKSTATE = '1'

                        QuerySolutionFacade querySolutionFacade = new QuerySolutionFacade();

                        data = querySolutionFacade.ExeQuery(mSql, hashtable);

                        TBankhisexchangeTransData transData = new TBankhisexchangeTransData();

                        transData.Bankseqno    = data.Tables[0].Rows[0]["BANKSEQNO"].ToString();
                        transData.Hisseqno     = data.Tables[0].Rows[0]["HISSEQNO"].ToString();
                        transData.Ohisseqno    = data.Tables[0].Rows[0]["OHISSEQNO"].ToString();
                        transData.Bankstate    = data.Tables[0].Rows[0]["BANKSTATE"].ToString();
                        transData.Hisstate     = data.Tables[0].Rows[0]["HISSTATE"].ToString();
                        transData.Buscd        = data.Tables[0].Rows[0]["BUSCD"].ToString();
                        transData.Hisid        = data.Tables[0].Rows[0]["HISID"].ToString();
                        transData.Trfamt       = data.Tables[0].Rows[0]["TRFAMT"].ToString();
                        transData.Usetype      = data.Tables[0].Rows[0]["USETYPE"].ToString();
                        transData.Operatorid   = data.Tables[0].Rows[0]["OPERATORID"].ToString();
                        transData.Operatetime  = Convert.ToDateTime(data.Tables[0].Rows[0]["OPERATETIME"].ToString());
                        transData.Diagnoseid   = data.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
                        transData.BusinessType = data.Tables[0].Rows[0]["BUSINESSTYPE"].ToString();
                        transData.DataSources  = data.Tables[0].Rows[0]["DATASOURCES"].ToString();
                        transData.DataSources  = data.Tables[0].Rows[0]["DATASOURCES"].ToString();
                        transData.RefundType   = Convert.ToInt32(data.Tables[0].Rows[0]["REFUNDTYPE"].ToString());
                        transData.RefundMoney  = Convert.ToDecimal(data.Tables[0].Rows[0]["REFUNDMONEY"].ToString());
                        transData.Remark       = "_FromPayForRecipeForm";


                        foreach (DataRow Row in charge.detailAccountData.Tables[0].Rows)
                        {
                            Row.BeginEdit();

                            Row["ISBANKCARD"]          = 1;
                            Row["BALANCEMODE"]         = payMethod;
                            Row["BANKTRANSNO"]         = transData.Hisseqno;
                            Row["IS_FEECHARGING_CARD"] = "1";
                            Row.EndEdit();
                            decHisMoney += Convert.ToDecimal(Row["MONEY"]);
                        }



                        DataSet dads = detailAccountFacade.insertEntityNoInvoiceZZZD(charge.detailAccountData, ref charge.ecipeMedicineData, transData);

                        //DataSet dads = detailAccountFacade.insertEntityNoInvoice(charge.detailAccountData, ref charge.ecipeMedicineData);
                        SkyComm.GetCardBalance();
                        SkyComm.ShowMessageInfo("缴费成功!");

                        //根据“药房自动配药接口类型”配置为2时,调用西北妇幼的派昂接口 19797
                        string AutoDoseConfig = SystemInfo.SystemConfigs["药房自动配药接口类型"].DefaultValue;
                        string strCK          = string.Empty;
                        if (AutoDoseConfig == "2" && charge.ecipeMedicineData.Tables[0].Rows.Count > 0)
                        {
                            strCK = UploadAngPaiData(dads, charge.ecipeMedicineData, dsTemp);
                        }

                        PrintReport(dads, strCK, dsRecipe);//打印交费凭证
                    }
                    catch (Exception err)
                    {
                        charge.detailAccountData.Clear();
                        charge.ecipeMedicineData.Clear();
                        Skynet.LoggingService.LogService.GlobalInfoMessage(SkyComm.DiagnoseID + "缴费失败:" + err.Message);
                        SkyComm.ShowMessageInfo("缴费失败:" + err.Message);
                        this.ucTime1.Sec = 60;
                        this.ucTime1.timer1.Start();
                        return;
                    }

                    dsRecipe = GetRecipeInfo();
                    if (dsRecipe == null || dsRecipe.Tables[0].Rows.Count == 0)
                    {
                        SkyComm.CloseWin(this);
                    }
                    else
                    {
                        this.gdcMain.DataSource = dsRecipe.Tables[0].DefaultView;

                        lblYE.Text = SkyComm.cardBlance.ToString();

                        refreshUI();
                    }
                    #endregion
                });
            });
        }
Example #7
0
        private void lblOK_Click(object sender, EventArgs e)
        {
            try
            {
                decimal ye        = Convert.ToDecimal(this.lblYE.Text.Trim());
                decimal costMoney = Convert.ToDecimal(this.lblTotalMoney.Text.Trim());
                if (ye < costMoney)
                {
                    SkyComm.ShowMessageInfo("卡余额不足!");
                    ucTime1.timer1.Start();
                    return;
                }
            }
            catch
            { }
            ucTime1.timer1.Stop();
            using (FrmReserveInfo frm = new FrmReserveInfo())
            {
                frm.GroupID      = sourceGroupID;
                frm.GroupName    = sourceGroupName;
                frm.OfficeID     = OfficeID;
                frm.CostMoney    = this.lblTotalMoney.Text;
                frm.exOfficeName = dtRecipe.Rows[0]["OFFICE"].ToString();

                if (!SelectItem())
                {
                    ucTime1.timer1.Start();
                    return;
                }
                if (dtRev.Rows.Count == 0)
                {
                    SkyComm.ShowMessageInfo("请选择处方信息后再进行预约!");
                    ucTime1.timer1.Start();
                    return;
                }
                else
                {
                    frm.dtRev      = dtRev;
                    frm.DiagnoseID = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
                    if (frm.ShowDialog(this) == DialogResult.OK)
                    {
                        using (FrmReserveAlert frmAlert = new FrmReserveAlert())
                        {
                            frmAlert.reserveDate = frm.reserveDateNew;
                            frmAlert.GroupName   = sourceGroupName;
                            frmAlert.queueNO     = frm.queueNO;
                            frmAlert.CostMoney   = frm.CostMoney;
                            frmAlert.ShowDialog();
                        }
                        for (int i = this.dtRecipe.Rows.Count - 1; i >= 0; i--)
                        {
                            if ((Boolean)dtRecipe.Rows[i]["PITCHON1"])
                            {
                                dtRecipe.Rows.RemoveAt(i);
                            }
                        }
                        //清空预约组信息
                        sourceGroupID   = "";
                        sourceGroupName = "";

                        SelectAllRecipe(false);
                        gdcMain.DataSource      = null;
                        this.gdcMain.DataSource = dtRecipe;

                        //
                        frm.Dispose();
                        if (dtRecipe.Rows.Count == 0)
                        {
                            ucTime1.timer1.Stop();
                            SkyComm.CloseWin(this);
                        }
                        SkyComm.GetCardBalance();
                        lblYE.Text = SkyComm.cardBlance.ToString();
                    }
                    else
                    {
                        ucTime1.timer1.Start();
                        return;
                    }
                }
            }
        }
        private void btnExit_Click(object sender, EventArgs e)
        {
            MoneyServer.NotAllowCashin();
            timer2.Stop();
            timer1.Stop();

            //wangchao 点击返回或退出之后,将按钮置为不可用状态,防止反复点击。
            btnClose.Enabled = false;
            btnExit.Enabled  = false;

            //拍照,纸币器
            switch (AutoHostConfig.ReadCardType)
            {
            case "XUHUI":
                AutoServiceSDK.SdkService.Common_XH camera = new AutoServiceSDK.SdkService.Common_XH();
                camera.TakeCameraEnd();
                camera.DoorLightClose(LightTypeenum.纸币器);
                break;

            default:
                break;
            }

            if (btnStart.Enabled == false)
            {
                #region 休眠3秒以后重新获取纸币金额
                Thread.Sleep(3000);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后休眠2秒重新获取存钞明细,开始获取状态");
                int intCheckStatus = MoneyServer.GetStatus();
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后休眠2秒重新获取存钞明细,状态:" + intCheckStatus);
                int InMoney = MoneyServer.GetInMoney(AutoHostConfig.Machineno, SysOperatorInfo.OperatorID);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后重新获取存钞明细金额:" + InMoney);
                if (InMoney > 0)
                {
                    //投入数量
                    int intOld = Convert.ToInt32(lblAmount.Text) + 1;
                    lblAmount.Text = intOld.ToString();

                    //投入金额
                    RechargeMoney += Convert.ToDecimal(InMoney);
                    RechargeMoney  = DecimalRound.Round(RechargeMoney, 2);
                    lblMoney.Text  = RechargeMoney.ToString();
                    MoneyServer.AllowCashin();

                    btnClose.Enabled = false;
                    btnExit.Enabled  = false;
                    btnEnd.Enabled   = true;
                    timer1.Start();
                    timer2.Start();

                    return;
                }
                MoneyServer.ClosePort();
                #endregion
            }

            if (RechargeMoney == 0)
            {
                SkyComm.CloseWin(this);
            }
        }
Example #9
0
        private void lblOK_Click(object sender, EventArgs e)
        {
            bool isAll = false;

            for (int i = 0; i < this.gdvMain.RowCount; i++)
            {
                if ((Boolean)gdvMain.GetDataRow(i)["PITCHON1"])
                {
                    isAll = true;
                }
            }
            if (isAll)
            {
                #region
                CLINICMtQueueFacade queueFacade = new CLINICMtQueueFacade();
                CLINICMtQueueData   queue       = new CLINICMtQueueData();
                queue = queueFacade.GetByReserveID(tempeserveid);
                if (!string.IsNullOrEmpty(queue.Exitnooff))
                {
                    #region
                    reserveFacade = new CLINICMtReserveFacade();
                    DataSet ds = reserveFacade.ReserveRecipeToGroup(tempID, tempNO);
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        sourceGroupID   = ds.Tables[0].Rows[0]["GROUPID"].ToString();
                        sourceGroupName = ds.Tables[0].Rows[0]["GROUPNAME"].ToString();
                        sourceOfficeID  = ds.Tables[0].Rows[0]["OFFICEID"].ToString();
                    }
                    if (!SelectItem(sourceOfficeID))
                    {
                        ucTime1.timer1.Start();
                        return;
                    }

                    ucTime1.timer1.Stop();
                    using (FrmReserveInfo frm = new FrmReserveInfo())
                    {
                        frm.isupdatereserve = true;     //是否修改
                        frm.reserveOldTime  = tempTime; //预约时间
                        frm.streserveid     = tempeserveid;
                        frm.stregisterid    = tempregisterid;
                        frm.GroupID         = sourceGroupID;
                        frm.GroupName       = sourceGroupName;
                        frm.OfficeID        = sourceOfficeID;
                        frm.CostMoney       = string.Format("{0:0.00}", ReturnTotalMoney(sourceOfficeID));
                        frm.exOfficeName    = dtRecipe.Rows[0]["OFFICEID"].ToString();

                        if (dtRev.Rows.Count == 0)
                        {
                            SkyComm.ShowMessageInfo("请选择处方信息后再进行预约!");
                            ucTime1.timer1.Start();
                            return;
                        }
                        else
                        {
                            frm.dtRev      = dtRev;
                            frm.DiagnoseID = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString();
                            if (frm.ShowDialog(this) == DialogResult.OK)
                            {
                                using (FrmReserveAlert frmAlert = new FrmReserveAlert())
                                {
                                    frmAlert.reserveDate = frm.reserveDateNew;
                                    frmAlert.GroupName   = sourceGroupName;
                                    frmAlert.queueNO     = frm.queueNO;
                                    frmAlert.CostMoney   = frm.CostMoney;
                                    frmAlert.queueNO     = frm.QueueID;
                                    frmAlert.ShowDialog();
                                }
                                for (int i = this.dtRecipe.Rows.Count - 1; i >= 0; i--)
                                {
                                    if ((Boolean)dtRecipe.Rows[i]["PITCHON1"])
                                    {
                                        dtRecipe.Rows.RemoveAt(i);
                                    }
                                }
                                //清空预约组信息
                                sourceGroupID   = "";
                                sourceGroupName = "";

                                SelectAllRecipe(false);
                                gdcMain.DataSource      = null;
                                this.gdcMain.DataSource = dtRecipe;

                                //
                                frm.Dispose();
                                if (dtRecipe.Rows.Count == 0)
                                {
                                    ucTime1.timer1.Stop();
                                    SkyComm.CloseWin(this);
                                }
                                SkyComm.GetCardBalance();
                                //  lblYE.Text = SkyComm.cardBlance.ToString();
                            }
                            else
                            {
                                ucTime1.timer1.Start();
                                return;
                            }
                        }
                    }
                    #endregion
                }
                else
                {
                    SkyComm.ShowMessageInfo("您好:当前预约数据需要去窗口进行改签,谢谢。");
                }
                #endregion
            }
            else
            {
                SkyComm.ShowMessageInfo("您好:请选择预约改签项目,谢谢。");
            }
        }
Example #10
0
        private void lblCashStored_Click(object sender, EventArgs e)
        {
            btnEnd.Enabled = false;
            bool           errorFlag = false;//错误标识
            WaitDialogForm form      = new WaitDialogForm("正在存钞中,请稍候...", "正在组织数据,请稍候......", new Size(240, 60));

            try
            {
                MoneyServer.NotAllowCashin();

                //拍照,纸币器
                switch (AutoHostConfig.ReadCardType)
                {
                case "XUHUI":
                case "XUHUIM1":
                    AutoServiceSDK.SdkService.Common_XH camera = new AutoServiceSDK.SdkService.Common_XH();
                    camera.TakeCameraEnd();
                    camera.DoorLightClose(LightTypeenum.纸币器);
                    break;

                default:
                    break;
                }

                timer2.Stop();
                timer1.Stop();

                #region 休眠3秒以后重新获取纸币金额
                Thread.Sleep(5000);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后休眠2秒重新获取存钞明细");
                int InMoney = MoneyServer.GetInMoney(AutoHostConfig.Machineno, SysOperatorInfo.OperatorID);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后重新获取存钞明细金额:" + InMoney);
                if (InMoney > 0)
                {
                    //投入数量
                    int intOld = Convert.ToInt32(lblAmount.Text) + 1;
                    lblAmount.Text = intOld.ToString();

                    //投入金额
                    RechargeMoney += Convert.ToDecimal(InMoney);
                    RechargeMoney  = DecimalRound.Round(RechargeMoney, 2);
                    lblMoney.Text  = RechargeMoney.ToString();
                }
                #endregion

                if (RechargeMoney == 0)
                {
                    btnClose_Click(null, null);
                    return;
                }

                ucTime1.timer1.Stop();

                #region 预交金充值
                AdvanceRecordData AdvData = new AdvanceRecordData();
                string            strlsh  = DateTime.Now.ToString("yyMMddHHmmss") + SysOperatorInfo.OperatorID + GenValidateCode();
                DataRow           dr      = AdvData.Tables[0].NewRow();
                dr[AdvanceRecordData.H_ADVANCE_RECORD_ADVANCEID]        = "新增";
                dr[AdvanceRecordData.H_ADVANCE_RECORD_BUSINESSBANK]     = strlsh;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_CANCELMARK]       = 0;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_CHEQUEID]         = "";
                dr[AdvanceRecordData.H_ADVANCE_RECORD_CURRENTINHOSMARK] = inHosData.Tables[0].Rows[0]["CURRENTINHOSMARK"].ToString();;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_INHOSID]          = inHosData.Tables[0].Rows[0]["INHOSID"].ToString();
                dr[AdvanceRecordData.H_ADVANCE_RECORD_OFFICEID]         = inHosData.Tables[0].Rows[0]["INHOSOFFICEID"].ToString();//this.txtZyks.Text;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_OPERATEDATE]      = new CommonFacade().GetServerDateTime();
                dr[AdvanceRecordData.H_ADVANCE_RECORD_OPERATORID]       = SysOperatorInfo.OperatorID;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_PAYMODEID]        = SkyComm.getvalue("住院预交金充值方式_现金").ToString();
                dr[AdvanceRecordData.H_ADVANCE_RECORD_PAYMONEY]         = RechargeMoney;
                dr[AdvanceRecordData.H_ADVANCE_RECORD_RECEIPTID]        = string.Empty;
                AdvData.Tables[0].Rows.Add(dr);
                AdvanceRecordFacade theAdvanceRecordFacade = new AdvanceRecordFacade();
                string advanceid = string.Empty;
                try
                {
                    advanceid = theAdvanceRecordFacade.insertEntity(AdvData, false);
                    if (advanceid == "")
                    {
                        SkyComm.ShowMessageInfo("住院预交金充值失败,请与医院相关人员联系!");
                        errorFlag = true;
                    }
                }
                catch (Exception ex)
                {
                    LogService.GlobalInfoMessage("收预交款失败:" + ex.Message);
                    if (ex.Message.IndexOf("您已经没有可用发票") >= 0)
                    {
                        SkyComm.ShowMessageInfo("住院预交金充值失败,请与医院相关人员联系!");
                        errorFlag = true;
                    }
                }
                #endregion
                Skynet.LoggingService.LogService.GlobalInfoMessage("充值成功");
                if (advanceid != "")
                {
                    string receiptID = theAdvanceRecordFacade.GetReceiptIDByAdvanceID(advanceid);

                    //打印充值凭证
                    PrintInfo("住院预交金充值凭证", receiptID, RechargeMoney.ToString(), advanceid);
                }
            }
            catch (Exception ex)
            {
                SkyComm.ShowMessageInfo("存钞失败:" + ex.Message);
                errorFlag = true;
                Skynet.LoggingService.LogService.GlobalInfoMessage("存钞失败:" + ex.Message);
            }
            finally
            {
                MoneyServer.ClosePort();
                form.Close();
                form.Dispose();

                btnEnd.Enabled = true;
            }
            if (!errorFlag)
            {
                decimal old_YE = Convert.ToDecimal(inHosData.Tables[0].Rows[0]["BALANCEMONEY"].ToString());
                SkyComm.ShowMessageInfo("您成功充值" + RechargeMoney + "元!住院预交金余额" + (RechargeMoney + old_YE).ToString("0.00##") + "元!");
            }
            else
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("住院预交金现金充值操作失败:患者诊疗号【" + SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["DIAGNOSEID"].ToString() + "】,患者姓名【" + SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["PATIENTNAME"].ToString() + "】,现金充值金额【" + RechargeMoney + "】元");
            }
            SkyComm.CloseWin(this);
        }
Example #11
0
 private void label1_Click(object sender, EventArgs e)
 {
     SkyComm.CloseWin(this);
 }
        private void Saving(decimal money)
        {
            if (eCardSavingFacade == null)
            {
                eCardSavingFacade = new CardSavingFacade();
            }

            if (SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows.Count <= 0)
            {
                MyAlert frm = new MyAlert(AlertTypeenum.信息, "此操作没有找到所要充值的卡信息!");
                frm.ShowDialog();
                return;
            }

            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0].BeginEdit();
            //卡号
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CARDID] = SkyComm.cardInfoStruct.CardNo;
            //充值时间
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATETIME] = new CommonFacade().GetServerDateTime();
            ////操作员
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATOR] = SysOperatorInfo.OperatorID;
            ////充值类型
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_SAVINGMODE] = 1;

            Skynet.LoggingService.LogService.GlobalInfoMessage("发卡保存数据设置押金之前");
            ////Add money
            if (CallType == 2)
            {
                Decimal deposit = Convert.ToDecimal(SkyComm.getvalue("发卡工本费"));
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEY] = money - Convert.ToDecimal(SkyComm.dsCardType.Tables[0].Rows[0]["FEES"]) - deposit;
            }
            else
            {
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEY] = money;  //此处需调接口
            }
            Skynet.LoggingService.LogService.GlobalInfoMessage("发卡保存数据设置押金之后");
            //业务类型
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BUSSNESSTYPE] = "充值";
            //支付方式
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_MODETYPE] = SkyComm.AddMoneyPosMode;
            //单位
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_UNIT] = "";
            //支票号
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CHECKLOT] = "";

            //充值数据来源
            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEYSOURCE] = AutoHostConfig.BankName;

            eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0].EndEdit();

            ReckonAccountTimeFacade reckonAccountsTimeFacade = new ReckonAccountTimeFacade();
            DateTime accountTime = reckonAccountsTimeFacade.GetEndTime(SysOperatorInfo.OperatorID, "门诊");

            if (Convert.ToDateTime(eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATETIME]) < accountTime)
            {
                SkyComm.ShowMessageInfo("该时间段已经结帐,不能办理预交金业务,请重试!");
                return;
            }
            DataSet cardSavingData = new DataSet();
            POSBase Posfac         = IPOSFactory.CreateIPOS(AutoHostConfig.PosInterfaceType);

            if (Posfac == null)
            {
                SkyComm.ShowMessageInfo("银联POS接口配置不正确,请与管理员联系!");
                return;
            }
            ValidateCode vc       = new ValidateCode();
            string       HisSeqNo = string.Empty;

            HisSeqNo = DateTime.Now.ToString("yyMMddHHmmss") + SysOperatorInfo.OperatorID + vc.GenValidateCode(4);
            Hashtable BankTranht = new Hashtable();

            BankTranht.Add("SEQNO", HisSeqNo);
            BankTranht.Add("MONEY", money);
            BankTranht.Add("OPERATORID", SysOperatorInfo.OperatorCode);
            BankTranht.Add("POSNO", AutoHostConfig.PosNo);
            BankTranht.Add("DIAGNOSEID", SkyComm.DiagnoseID);
            BankTranht.Add("CARDID", SkyComm.cardInfoStruct.CardNo);
            Posfac.Trans("1", BankTranht);
            if (BankTranht["CARDNO"] != null)
            {
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CHECKLOT]    = BankTranht["CARDNO"].ToString();
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BANKCARDNO]  = BankTranht["CARDNO"].ToString();
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BANKTRANSNO] = BankTranht["BANKSEQNO"].ToString();
            }

            try
            {
                //if (SkynetMessage.MsgInfo("是否要充值成功?", true) == false)
                //{
                //    throw new Exception("操作操作测试放弃充值!");
                //}
                cardSavingData = eCardSavingFacade.insertEntity(eCardAuthorizationData);
                Posfac.Trans("2", BankTranht);
                Savingsucceed = 1;
            }
            catch (Exception ex)
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("POS接口调用成功,HIS保存失败:" + ex.Message + "\r\n开始调用撤消方法");
                SkynetMessage.MsgInfo("HIS充值失败,需要撤消银行交易,请按POS机提示操作!");
                Posfac.Trans("-2", BankTranht);
                Skynet.LoggingService.LogService.GlobalInfoMessage("POS接口调用成功,HIS失败,调用银行撤消完成!");
                //SkynetMessage.MsgInfo("HIS充值失败:"+ex.Message);
                return;
            }
            SkyComm.GetCardBalance();

            if (CallType != 2)
            {
                //打印充值凭证
                PrintInfo("自助充值凭证", cardSavingData.Tables[0].Rows[0]["TRANSACTION_ID"].ToString(), money.ToString());

                if (CallType == 0)
                {
                    FrmRechargeSuccessful frmRecharge = new FrmRechargeSuccessful();
                    frmRecharge.RechargeMoney = money;
                    frmRecharge.ShowDialog(this);
                    frmRecharge.Dispose();
                    SkyComm.CloseWin(this);
                }
                else
                {
                    SkyComm.ShowMessageInfo("您成功充值" + money + "元!卡中余额" + SkyComm.cardBlance.ToString() + "");
                    SkyComm.CloseWin(this);
                }
            }
            else
            {
                DialogResult = System.Windows.Forms.DialogResult.OK;
                SkyComm.CloseWin(this);
            }
            //GetMoeny();
        }
Example #13
0
 private void pcExit_Click(object sender, EventArgs e)
 {
     DialogResult = DialogResult.Cancel;
     ucTime1.timer1.Stop();
     SkyComm.CloseWin(this);
 }
Example #14
0
 private void label6_Click(object sender, EventArgs e)
 {
     SkyComm.CardSavingType = 2;
     SkyComm.CloseWin(this);
 }
Example #15
0
 private void pcExit_Click(object sender, EventArgs e)
 {
     ucTime1.timer1.Stop();
     SkyComm.CloseWin(this);
 }
Example #16
0
        private void lblOk_Click(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date == DateTime.Now.Date) //如果预约时间为当天,则调用挂号方法,重新组织数据
                {
                    if (registerInfoData.Tables.Count > 0 && registerInfoData.Tables[0].Rows.Count > 0)
                    {
                        registerInfoData.Tables[0].Rows.Clear();
                    }
                    DataRow rowReg = registerInfoData.Tables[0].NewRow();
                    int     i      = registerInfoData.Tables[0].Rows.Count + 1;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_REGISTERID]       = "新增" + i.ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_CANCELMARK]       = "0";
                    rowReg[RegisterInfoData.T_REGISTER_INFO_OPERATORID]       = SysOperatorInfo.OperatorID;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_OPERATEDATE]      = new CommonFacade().GetServerDateTime();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_CHARGEMARK]       = 0;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_PATIENTNAME]      = patientData.Tables[0].Rows[0]["PATIENTNAME"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_SEX]              = patientData.Tables[0].Rows[0]["SEX"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_REGISTEROFFICEID] = BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_OFFICE]           = BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICENAME"].ToString();


                    rowReg[RegisterInfoData.T_REGISTER_INFO_REGISTERCLASS] = REGISTERCLASS;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_DOCTORID]      = BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORID"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_USERNAME]      = BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORNAME"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_CASECOST]      = Gbf;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_BESPEAKMONEY]  = 0;//预约费
                    rowReg[RegisterInfoData.T_REGISTER_INFO_REGISTERFEE]   = Ghf;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_CARDID]        = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["CARDID"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_EXAMINEMONEY]  = Zj;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_BESPEAKID]     = "";
                    rowReg[RegisterInfoData.T_REGISTER_INFO_DIAGNOSEID]    = SkyComm.DiagnoseID;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_AGE]           = patientData.Tables[0].Rows[0]["AGE"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_AGEUNIT]       = patientData.Tables[0].Rows[0]["AGEUNIT"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_ADDRESS]       = patientData.Tables[0].Rows[0]["ADDRESS"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_TELEPHONE]     = patientData.Tables[0].Rows[0]["TELEPHONE"].ToString();

                    OfficeFacade officeFacade = new OfficeFacade();
                    DataSet      officeSet    = officeFacade.QueryByOfficeType(26, "");
                    DataRow      officeRow    = officeSet.Tables[0].AsEnumerable().FirstOrDefault(o => o.Field <string>("OFFICEID") == BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString());
                    rowReg[RegisterInfoData.T_REGISTER_INFO_OFFICEADDRESS] = officeRow["OFFICEADDRESS"].ToString().Trim();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_DIAGNOSESTATE] = 0;

                    rowReg[RegisterInfoData.T_REGISTER_INFO_CHECKFEE]         = jcf;
                    rowReg[RegisterInfoData.T_REGISTER_INFO_WORKTYPE]         = BespeakDataset.Tables[0].Rows[0]["WORKTYPE"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_ARRANAGERECORDID] = BespeakDataset.Tables[0].Rows[0]["ARRANAGERECORDID"].ToString();
                    //if (SystemInfo.SystemConfigs["是否启用分时预约"] != null && SystemInfo.SystemConfigs["是否启用分时预约"].DefaultValue == "1")
                    //{
                    rowReg[RegisterInfoData.T_REGISTER_INFO_QUEUEID] = BespeakDataset.Tables[0].Rows[0]["QUEUEID"].ToString();
                    //}
                    rowReg[RegisterInfoData.T_REGISTER_INFO_BIRTHDAY] = patientData.Tables[0].Rows[0]["BIRTHDAY"].ToString();
                    rowReg[RegisterInfoData.T_REGISTER_INFO_EXECDATE] = new CommonFacade().GetServerDateTime();
                    rowReg["BESPEAKDATE"] = Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString());
                    rowReg["BESPEAKMODE"] = "";
                    decimal decMoney = Convert.ToDecimal(Ghf) + Convert.ToDecimal(Zj) + Convert.ToDecimal(Gbf) + Convert.ToDecimal(jcf);
                    rowReg["CASHDEFRAY"]     = decMoney;
                    rowReg["ACCOUNTDEFRAY"]  = 0;
                    rowReg["DISCOUNTDEFRAY"] = 0;
                    rowReg["BALANCEMARK"]    = 2;
                    rowReg["BALANCESTATE"]   = 0;
                    rowReg["BALANCESTATE"]   = 0;
                    rowReg["BALANCEMODE"]    = "预交金";//结算方式
                    registerInfoData.Tables[0].Rows.Add(rowReg);

                    bespeakFac = new BespeakRegisterFacade();


                    //ZHOUHU ADD 20180130  CASE:29222
                    string isRegContr = new OfficeFacade().FindByOfficeID(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString()).Tables[0].Rows[0]["ISREGCONTR"].ToString();

                    //chenqiang 2017-03-09 add by Case:27423
                    if ("1" == SystemInfo.SystemConfigs["挂号、预约限制条件"].DefaultValue && isRegContr == "1")
                    {
                        if (registerFacade.FindNowDateRegisterInfo(patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date) > 0)
                        {
                            MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一位患者同天同科室限一个号,系统不允许挂号");
                            registerInfo.ShowDialog();
                            return;
                        }
                        if (bespeakFac.FindBespeakPatientInfo(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date, patientData.Tables[0].Rows[0]["IDENTITYCARD"].ToString(), patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString()) > 0)
                        {
                            MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一位患者同天同科室限一个号,当天已有预约信息,系统不允许挂号");
                            registerInfo.ShowDialog();
                            return;
                        }
                    }

                    //chenqiang 2017.06.16  add by Case:28088
                    if (registerFacade.FindNowDateRegisterInfo(registerInfoData.Tables[0].Rows[0]["DOCTORID"].ToString(), registerInfoData.Tables[0].Rows[0]["REGISTEROFFICEID"].ToString(), registerInfoData.Tables[0].Rows[0]["WORKTYPE"].ToString(), registerInfoData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), Convert.ToDateTime(registerInfoData.Tables[0].Rows[0]["OPERATEDATE"].ToString()).Date) > 0)
                    {
                        MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一个患者同一个班次只能挂一个号,系统不允许挂号");
                        registerInfo.ShowDialog();
                        return;
                    }
                    if (bespeakFac.FindBespeakPatientInfo(registerInfoData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), registerInfoData.Tables[0].Rows[0]["DOCTORID"].ToString(), registerInfoData.Tables[0].Rows[0]["REGISTEROFFICEID"].ToString(), registerInfoData.Tables[0].Rows[0]["WORKTYPE"].ToString(), Convert.ToDateTime(registerInfoData.Tables[0].Rows[0]["OPERATEDATE"].ToString()).Date) > 0)
                    {
                        MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一个患者同一个班次只能挂一个号,系统不允许挂号");
                        registerInfo.ShowDialog();
                        return;
                    }
                    string ss = SystemInfo.SystemConfigs["院内就诊卡模式"].DefaultValue.ToString();

                    DataSet ds = this.registerFacade.insertEntityForFZBD(this.registerInfoData);

                    MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "挂号成功!");
                    frmAlter.ShowDialog();

                    //输出挂号凭证
                    if (null == ds.Tables[0].Columns["EXAMINENAME"])
                    {
                        DataColumn col = new DataColumn("EXAMINENAME", typeof(System.String));
                        col.Caption = "EXAMINENAME";
                        ds.Tables[0].Columns.Add(col);
                    }

                    if (!ds.Tables[0].Columns.Contains("EXAMINELOC"))
                    {
                        ds.Tables[0].Columns.Add("EXAMINELOC");
                    }

                    UsersFacade uf = new UsersFacade();
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        string keyval = row["DOCTORID"].ToString();
                        if (keyval != "-1")
                        {
                            row["EXAMINENAME"] = uf.FindByUserInfo(keyval).Tables[0].Rows[0]["EXAMINENAME"].ToString();
                        }

                        ExamineFacade ef            = new ExamineFacade();
                        string        i_EXAMINENAME = uf.FindByPrimaryKeyString(keyval).ToString();
                        if (i_EXAMINENAME == "")
                        {
                            row["EXAMINELOC"] = "";
                        }
                        else
                        {
                            DataRow[] rw = ef.FindAllExamine().Tables[0].Select("EXAMINENAME = '" + i_EXAMINENAME + "' AND OFFICEID = '" + row["REGISTEROFFICEID"].ToString() + "'");
                            if (rw.Length > 0)
                            {
                                row["EXAMINELOC"] = rw[0]["EXAMINELOC"].ToString();
                            }
                            else
                            {
                                row["EXAMINELOC"] = "";
                            }
                        }
                    }

                    SkyComm.GetCardBalance();

                    PrintReport(ds, "自助挂号");
                    // PrintTriageInfo(ds.Tables[0], theServerTime);
                }
                else
                {
                    DataRow dr = BespeakDataset.Tables[0].Rows[0];
                    dr["PATIENTNAME"]  = patientData.Tables[0].Rows[0]["PATIENTNAME"].ToString();
                    dr["TELEPHONE"]    = patientData.Tables[0].Rows[0]["TELEPHONE"].ToString();
                    dr["IDENTITYCARD"] = patientData.Tables[0].Rows[0]["IDENTITYCARD"].ToString();
                    dr["SEX"]          = patientData.Tables[0].Rows[0]["SEX"].ToString();

                    //判断是否已经预约
                    DataSet dsBespeak = new DataSet();
                    if (!string.IsNullOrEmpty(patientData.Tables[0].Rows[0]["IDENTITYCARD"].ToString()))
                    {
                        dsBespeak = bespeakFac.FindBespeakInfoByIdentityOrDiagnoseId(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()), BespeakDataset.Tables[0].Rows[0]["WORKTYPE"].ToString(), patientData.Tables[0].Rows[0]["IDENTITYCARD"].ToString(), "", patientData.Tables[0].Rows[0]["PATIENTNAME"].ToString());
                    }
                    else
                    {
                        dsBespeak = bespeakFac.FindBespeakInfoByIdentityOrDiagnoseId(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()), BespeakDataset.Tables[0].Rows[0]["WORKTYPE"].ToString(), "", patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), "");
                    }
                    if (Convert.ToInt16(dsBespeak.Tables[0].Rows[0][0]) > 0)
                    {
                        MyAlert frm = new MyAlert(AlertTypeenum.信息, Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).ToShortDateString() + "已有预约信息,不能再次预约!");
                        frm.ShowDialog();
                        return;
                    }

                    //ZHOUHU ADD 20180130  CASE:29222
                    string isRegContr = new OfficeFacade().FindByOfficeID(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString()).Tables[0].Rows[0]["ISREGCONTR"].ToString();

                    //chenqiang 2017-03-09 add by Case:27423
                    if ("1" == SystemInfo.SystemConfigs["挂号、预约限制条件"].DefaultValue && isRegContr == "1")
                    {
                        bespeakFac = new BespeakRegisterFacade();
                        if (registerFacade.FindNowDateRegisterInfo(patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date) > 0)
                        {
                            MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一位患者同天同科室限一个号,系统不允许挂号");
                            registerInfo.ShowDialog();
                            return;
                        }
                        if (bespeakFac.FindBespeakPatientInfo(BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date, patientData.Tables[0].Rows[0]["IDENTITYCARD"].ToString(), patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString()) > 0)
                        {
                            MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一位患者同天同科室限一个号,当天已有预约信息,系统不允许挂号");
                            registerInfo.ShowDialog();
                            return;
                        }
                    }
                    //chenqiang 2017.06.16  add by Case:28088
                    if (registerFacade.FindNowDateRegisterInfo(BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["WORKTYPE"].ToString(), patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date) > 0)
                    {
                        MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一个患者同一个班次只能挂一个号,系统不允许挂号");
                        registerInfo.ShowDialog();
                        return;
                    }
                    if (bespeakFac.FindBespeakPatientInfo(patientData.Tables[0].Rows[0]["DIAGNOSEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORID"].ToString(), BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICEID"].ToString(), BespeakDataset.Tables[0].Rows[0]["WORKTYPE"].ToString(), Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["OPERATEDATE"].ToString()).Date) > 0)
                    {
                        MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "一个患者同一个班次只能挂一个号,系统不允许挂号");
                        registerInfo.ShowDialog();
                        return;
                    }
                    //chenqiang add by case:33511
                    if (SystemInfo.SystemConfigs["是否启用号源云平台接口"].DefaultValue != "0")
                    {
                        if (BespeakDataset.Tables[0].Rows.Count > 1)
                        {
                            MyAlert registerInfo = new MyAlert(AlertTypeenum.信息, "在启用号源接口时,同一次只能预约一个医生!");
                            registerInfo.ShowDialog();
                            return;
                        }
                    }
                    BespeakDataset = (BespeakRegisterData)bespeakFac.insertBespeakEntityReturn(BespeakDataset, patientData, 1);
                    //chenqiang add by case:33511
                    if (SystemInfo.SystemConfigs["是否启用号源云平台接口"].DefaultValue != "0")
                    {
                        if (arrangeSource == "1" && Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"].ToString()).Date != new CommonFacade().GetServerDateTime().Date)
                        {
                            RegisterClouldInterface theRegisterClouldInterface = new RegisterClouldInterface();
                            int intResult = theRegisterClouldInterface.BespeakRegisteInfo(BespeakDataset);
                            if (intResult < 0)
                            {
                                bespeakFac.CancelBespeak(BespeakDataset.Tables[0].Rows[0]["BESPEAKID"].ToString());
                                return;
                            }
                        }
                    }


                    MyAlert frmAlter = new MyAlert(AlertTypeenum.信息, "预约成功!");
                    frmAlter.ShowDialog();
                    PrintReport(BespeakDataset, "自助预约");

                    //预约成功后,发短信
                    try
                    {
                        Hashtable htPara = new Hashtable();
                        htPara.Add("@预约时间", Convert.ToDateTime(BespeakDataset.Tables[0].Rows[0]["BESPEAKDATE"]).ToString("MM月dd日HH时mm分"));
                        string OfficeAddress = SysOperatorInfo.OperatorAreaname + BespeakDataset.Tables[0].Rows[0]["OFFICEADDRESS"].ToString();
                        htPara.Add("@科室位置", OfficeAddress);
                        htPara.Add("@科室", BespeakDataset.Tables[0].Rows[0]["BESPEAKOFFICENAME"].ToString());
                        htPara.Add("@医生", BespeakDataset.Tables[0].Rows[0]["BESPEAKDOCTORNAME"].ToString());
                        htPara.Add("@排队号", BespeakDataset.Tables[0].Rows[0]["QUEUEID"].ToString());
                        htPara.Add("@预约号", BespeakDataset.Tables[0].Rows[0]["BESPEAKID"].ToString());
                        UMSMsgLib.UMSMsg.Instance.SendMsg(BespeakDataset.Tables[0].Rows[0]["TELEPHONE"].ToString(), "预约挂号", htPara);
                    }
                    catch (Exception ex)
                    {
                        Skynet.LoggingService.LogService.GlobalInfoMessage("预约成功后,发短信失败!" + ex.Message);
                    }
                }

                SkyComm.CloseWin(this);
            }
            catch (Exception ex)
            {
                MyAlert frm = new MyAlert(AlertTypeenum.信息, ex.Message);
                frm.ShowDialog();
            }
        }
        private void lblCashStored_Click(object sender, EventArgs e)
        {
            btnEnd.Enabled = false;
            WaitDialogForm form = new WaitDialogForm("正在存钞中,请稍候...", "正在组织数据,请稍候......", new Size(240, 60));

            try
            {
                MoneyServer.NotAllowCashin();

                //拍照,纸币器
                switch (AutoHostConfig.ReadCardType)
                {
                case "XUHUI":
                    AutoServiceSDK.SdkService.Common_XH camera = new AutoServiceSDK.SdkService.Common_XH();
                    camera.TakeCameraEnd();
                    camera.DoorLightClose(LightTypeenum.纸币器);
                    break;

                default:
                    break;
                }

                timer2.Stop();
                timer1.Stop();

                #region 休眠3秒以后重新获取纸币金额
                Thread.Sleep(5000);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后休眠2秒重新获取存钞明细");
                int InMoney = MoneyServer.GetInMoney(AutoHostConfig.Machineno, SysOperatorInfo.OperatorID);
                Skynet.LoggingService.LogService.GlobalInfoMessage("在结束预存之后重新获取存钞明细金额:" + InMoney);
                if (InMoney > 0)
                {
                    //投入数量
                    int intOld = Convert.ToInt32(lblAmount.Text) + 1;
                    lblAmount.Text = intOld.ToString();

                    //投入金额
                    RechargeMoney += Convert.ToDecimal(InMoney);
                    RechargeMoney  = DecimalRound.Round(RechargeMoney, 2);
                    lblMoney.Text  = RechargeMoney.ToString();
                }
                #endregion

                if (RechargeMoney == 0)
                {
                    btnClose_Click(null, null);
                    return;
                }

                lblNoPaymentCharge.Enabled = true;
                ucTime1.timer1.Stop();
                if (eCardSavingFacade == null)
                {
                    eCardSavingFacade = new CardSavingFacade();
                }
                if (eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows.Count <= 0)
                {
                    MyAlert frm = new MyAlert(AlertTypeenum.信息, "此操作没有找到所要充值的卡信息!");
                    frm.ShowDialog();
                    return;
                }
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0].BeginEdit();
                //卡号
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CARDID] = SkyComm.cardInfoStruct.CardNo;
                //充值时间
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATETIME] = new CommonFacade().GetServerDateTime();
                ////操作员
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATOR] = SysOperatorInfo.OperatorID;
                ////充值类型
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_SAVINGMODE] = 1;
                ////Add money

                Skynet.LoggingService.LogService.GlobalInfoMessage("现金发卡保存数据设置押金之前");
                if (CallType == 2)
                {
                    Decimal deposit = Convert.ToDecimal(SkyComm.getvalue("发卡工本费"));
                    eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEY] = RechargeMoney - Convert.ToDecimal(SkyComm.dsCardType.Tables[0].Rows[0]["FEES"]) - deposit;
                }
                else
                {
                    eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEY] = RechargeMoney;
                }
                Skynet.LoggingService.LogService.GlobalInfoMessage("现金发卡保存数据设置押金之后");
                //业务类型
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BUSSNESSTYPE] = "充值";
                //支付方式
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_MODETYPE] = SkyComm.AddMoneyCashMode;
                //单位
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_UNIT] = "";
                //支票号
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CHECKLOT] = "";

                //充值数据来源
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_ADDMONEYSOURCE] = AutoHostConfig.BankName;

                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0].EndEdit();

                ReckonAccountTimeFacade reckonAccountsTimeFacade = new ReckonAccountTimeFacade();
                DateTime accountTime = reckonAccountsTimeFacade.GetEndTime(SysOperatorInfo.OperatorID, "门诊");
                if (Convert.ToDateTime(eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_OPERATETIME]) < accountTime)
                {
                    SkyComm.ShowMessageInfo("该时间段已经结帐,不能办理预交金业务,请重试!");
                    return;
                }

                DataSet cardSavingData = eCardSavingFacade.insertEntity(eCardAuthorizationData);
                SkyComm.GetCardBalance();
                Skynet.LoggingService.LogService.GlobalInfoMessage("充值成功,调用类型:" + CallType);
                Savingsucceed = 1;
                if (CallType != 2)
                {
                    //打印充值凭证
                    PrintInfo("自助充值凭证", cardSavingData.Tables[0].Rows[0]["TRANSACTION_ID"].ToString(), RechargeMoney.ToString());
                }
            }
            catch (Exception ex)
            {
                SkyComm.ShowMessageInfo("存钞失败:" + ex.Message);
                Skynet.LoggingService.LogService.GlobalInfoMessage("存钞失败:" + ex.Message);
            }
            finally
            {
                MoneyServer.ClosePort();
                form.Close();
                form.Dispose();

                btnEnd.Enabled = true;
            }

            Skynet.LoggingService.LogService.GlobalInfoMessage("充值成功,调用类型:" + CallType);
            if (CallType == 0)
            {
                FrmRechargeSuccessful frmRecharge = new FrmRechargeSuccessful();
                frmRecharge.RechargeMoney = RechargeMoney;
                frmRecharge.ShowDialog(this);
                frmRecharge.Dispose();
                SkyComm.CloseWin(this);
            }
            else if (CallType == 2)
            {
                SkyComm.CloseWin(this);
            }
            else
            {
                SkyComm.ShowMessageInfo("您成功充值" + RechargeMoney + "元!卡中余额" + SkyComm.cardBlance.ToString() + "");
                SkyComm.CloseWin(this);
            }
            //GetMoeny();
        }
Example #18
0
 private void btnExit_Click(object sender, EventArgs e)
 {
     SkyComm.CloseWin(this);
 }
        private void Saving(decimal money)
        {
            if (eCardSavingFacade == null)
            {
                eCardSavingFacade = new CardSavingFacade();
            }

            if (SkyComm.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows.Count <= 0)
            {
                MyAlert frm = new MyAlert(AlertTypeenum.信息, "此操作没有找到所需要的患者信息!");
                frm.ShowDialog();
                return;
            }

            DataSet cardSavingData = new DataSet();
            POSBase Posfac         = IPOSFactory.CreateIPOS(AutoHostConfig.PosInterfaceType);

            if (Posfac == null)
            {
                SkyComm.ShowMessageInfo("银联POS接口配置不正确,请与管理员联系!");
                return;
            }

            ValidateCode vc       = new ValidateCode();
            string       HisSeqNo = string.Empty;

            HisSeqNo = DateTime.Now.ToString("yyMMddHHmmss") + SysOperatorInfo.OperatorID + vc.GenValidateCode(4);

            #region 住院预交金充值
            AdvanceRecordData AdvData = new AdvanceRecordData();
            DataRow           dr      = AdvData.Tables[0].NewRow();
            dr[AdvanceRecordData.H_ADVANCE_RECORD_ADVANCEID]        = "新增";
            dr[AdvanceRecordData.H_ADVANCE_RECORD_BUSINESSBANK]     = HisSeqNo;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_CANCELMARK]       = 0;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_CHEQUEID]         = "";
            dr[AdvanceRecordData.H_ADVANCE_RECORD_CURRENTINHOSMARK] = inHosData.Tables[0].Rows[0]["CURRENTINHOSMARK"].ToString();;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_INHOSID]          = inHosData.Tables[0].Rows[0]["INHOSID"].ToString();
            dr[AdvanceRecordData.H_ADVANCE_RECORD_OFFICEID]         = inHosData.Tables[0].Rows[0]["INHOSOFFICEID"].ToString();//this.txtZyks.Text;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_OPERATEDATE]      = new CommonFacade().GetServerDateTime();
            dr[AdvanceRecordData.H_ADVANCE_RECORD_OPERATORID]       = SysOperatorInfo.OperatorID;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_PAYMODEID]        = SkyComm.getvalue("住院预交金充值方式_银行卡").ToString();
            dr[AdvanceRecordData.H_ADVANCE_RECORD_PAYMONEY]         = RechargeMoney;
            dr[AdvanceRecordData.H_ADVANCE_RECORD_RECEIPTID]        = string.Empty;
            AdvData.Tables[0].Rows.Add(dr);
            AdvanceRecordFacade theAdvanceRecordFacade = new AdvanceRecordFacade();
            #endregion
            string    advanceid  = string.Empty;
            Hashtable BankTranht = new Hashtable();
            BankTranht.Add("SEQNO", HisSeqNo);
            BankTranht.Add("MONEY", money);
            BankTranht.Add("OPERATORID", SysOperatorInfo.OperatorCode);
            BankTranht.Add("POSNO", AutoHostConfig.PosNo);
            BankTranht.Add("DIAGNOSEID", SkyComm.DiagnoseID);
            BankTranht.Add("CARDID", SkyComm.cardInfoStruct.CardNo);

            if (AutoHostConfig.PosInterfaceType.Equals("锡盟新利"))//锡盟新利 弹出错误提示
            {
                try
                {
                    Posfac.Trans("1", BankTranht);
                }
                catch (Exception ex)
                {
                    SkyComm.ShowMessageInfo(ex.Message.ToString());
                    return;
                }
            }
            else
            {
                Posfac.Trans("1", BankTranht);
            }


            if (BankTranht["CARDNO"] != null)
            {
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_CHECKLOT]    = BankTranht["CARDNO"].ToString();
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BANKCARDNO]  = BankTranht["CARDNO"].ToString();
                eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows[0][CardAuthorizationData.T_CARD_AUTHORIZATION_BANKTRANSNO] = BankTranht["BANKSEQNO"].ToString();
            }

            try
            {
                advanceid = theAdvanceRecordFacade.insertEntity(AdvData, false);
                Posfac.Trans("2", BankTranht);
                Savingsucceed = 1;
            }
            catch (Exception ex)
            {
                Skynet.LoggingService.LogService.GlobalInfoMessage("POS接口调用成功,HIS保存失败:" + ex.Message + "\r\n开始调用撤消方法");
                SkyComm.ShowMessageInfo("预交金充值失败,需要撤销银行交易,请按POS机提示操作,点击确定后,请重新插入银行卡!");
                Posfac.Trans("-2", BankTranht);
                Skynet.LoggingService.LogService.GlobalInfoMessage("POS接口调用成功,HIS失败,调用银行撤消完成!");
                SkyComm.ShowMessageInfo("银行交易失败,充值金额已退回卡,请重新充值!");
                //SkynetMessage.MsgInfo("HIS充值失败:"+ex.Message);
                return;
            }
            //SkyComm.GetCardBalance();

            if (Savingsucceed == 1)
            {
                string receiptID = theAdvanceRecordFacade.GetReceiptIDByAdvanceID(advanceid);
                //打印充值凭证
                PrintInfo("住院预交金充值凭证", receiptID, money.ToString(), advanceid, HisSeqNo);



                decimal old_YE = Convert.ToDecimal(inHosData.Tables[0].Rows[0]["BALANCEMONEY"].ToString());
                SkyComm.ShowMessageInfo("您成功充值" + money + "元!卡中余额" + (old_YE + money).ToString("0.00##") + "元!");
                string _isPrint = SkyComm.getvalue("锡盟预交款打印凭证");  //Case 31629 锡盟预交款打印凭证
                _isPrint = string.IsNullOrEmpty(_isPrint) ? "0" : "1";

                if (_isPrint.Equals("0"))
                {
                    try
                    {
                        MoneyTransferPresenter moneyTransferPresenter = new MoneyTransferPresenter();

                        DataSet dataSet = moneyTransferPresenter.getBankInfo(SkyComm.DiagnoseID, HisSeqNo);
                        dataSet.WriteXml(Application.StartupPath + @"\\ReportXml\\" + "银行pos凭证" + SkyComm.DiagnoseID + ".xml");
                        if (!File.Exists(Application.StartupPath + @"\\Reports\\" + "银行pos凭证" + ".frx"))
                        {
                            SkynetMessage.MsgInfo("银行pos凭证" + ".frx报表文件不存在,无法打印.");
                            return;
                        }
                        //Common_XH theCamera_XH = new Common_XH();
                        //theCamera_XH.DoorLightOpen(LightTypeenum.凭条, LightOpenTypeenum.闪烁);
                        PrintManager print = new PrintManager();
                        print.InitReport("银行pos凭证");
                        print.AddData(dataSet.Tables[0], "pos");
                        print.Print();
                        print.Dispose();
                    }
                    catch (Exception e)
                    {
                    }
                }
            }
            SkyComm.CloseWin(this);
        }