public void AutoPrint(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("打印"); if (intResult == 0) { return; } } AutoServiceManage.AutoPrint.FrmPrintMain frm = new AutoPrint.FrmPrintMain(); try { frm.ShowDialog(owner); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("自助打印失败:" + ex.Message); SkyComm.ShowMessageInfo("自助打印出错!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
private void LblDaYin_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("打印"); if (intResult == 0) { return; } } AutoServiceManage.AutoPrint.FrmPrintMain frm = new AutoPrint.FrmPrintMain(); try { frm.ShowDialog(this); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("自助打印失败:" + ex.Message); SkyComm.ShowMessageInfo("自助打印出错!" + ex.Message); } finally { frm.Dispose(); } }
//银行卡预存 private void lblAddMoneyBank_Click(object sender, EventArgs e) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } this.ucTime1.timer1.Stop(); FrmCardSavingBank frm = new FrmCardSavingBank(); frm.CallType = 1; frm.ShowDialog(this); frm.Dispose(); this.ucTime1.Sec = 60; this.ucTime1.timer1.Start(); lblYE.Text = SkyComm.cardBlance.ToString(); decimal decTotal = Convert.ToDecimal(lblTotalMoney.Text); if (decTotal > SkyComm.cardBlance) { lblOK.Visible = false; } else { lblOK.Visible = true; } }
public void SurveyInfo(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("满意度调查"); if (intResult == 0) { return; } } FrmEvaluation frm = new FrmEvaluation(); try { frm.ShowDialog(owner); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("调用满意度调查失败,原因:" + ex.Message); SkyComm.ShowMessageInfo("调用满意度调查失败!" + ex.Message); } finally { frm.Dispose(); } }
private void lblJiaoFei_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("缴费"); if (intResult == 0) { return; } } FrmChargeMain frm = new FrmChargeMain(); try { DataSet dsRecipe = GetRecipeInfo(); if (dsRecipe == null) { return; } frm.dsRecipe = dsRecipe; frm.ShowDialog(this); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("缴费失败:" + ex.Message); SkyComm.ShowMessageInfo("调用自助缴费出错!" + ex.Message); } finally { frm.Dispose(); } }
private void lblChaXun_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("查询"); if (intResult == 0) { return; } } FrmInquireMain frm = new FrmInquireMain(); try { frm.ShowDialog(this); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("自助查询失败:" + ex.Message); SkyComm.ShowMessageInfo("自助查询出错!" + ex.Message); } finally { frm.Dispose(); } }
public void MoneyTransfer(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("门诊预存转住院预存"); if (intResult == 0) { return; } } FrmMoneyTransfer frm = new FrmMoneyTransfer(); try { frm.ShowDialog(owner); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("调用门诊预存转住院预存模块失败,原因:" + ex.Message); SkyComm.ShowMessageInfo("调用门诊预存转住院预存模块失败!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
public DataSet GetRecipeInfo() { //查询未缴费的处方信息,如果未缴费的处方没有的,则不需要缴费 ClinicPhysicianRecipeFacade clinicPhysicianRecipeFacade = new ClinicPhysicianRecipeFacade(); DataSet dsRecipe = clinicPhysicianRecipeFacade.FindRecipeDetailByDiagnoseID(SkyComm.DiagnoseID); string Offices = SkyComm.getvalue("使用自助缴费的执行科室ID"); string[] arrOffice = Offices.Split(','); //if (!string.IsNullOrEmpty(Offices)) //{ // foreach (DataRow row in dsRecipe.Tables[0].Rows) // { // if (row.RowState == DataRowState.Deleted) // continue; // if (!arrOffice.Contains(row["EXECOFFICEID"].ToString())) // { // row.Delete(); // } // } // dsRecipe.AcceptChanges(); //} if (dsRecipe.Tables[0].Rows.Count == 0) { SkyComm.ShowMessageInfo("没有需要缴费的处方信息!"); return(null); } dsRecipe.Tables[0].Columns.Add("PRICECHANGE", typeof(decimal)); //单价 dsRecipe.Tables[0].Columns.Add("AMOUNTCHANGE", typeof(decimal)); //数量 dsRecipe.Tables[0].Columns.Add("UNITCHANGE", typeof(string)); //单位 dsRecipe.Tables[0].Columns.Add("PITCHON1", typeof(bool)); //单位 //dsRecipe.Tables[0].Columns["PITCHON"].DataType = typeof(System.Boolean); UnitToPack unitToPack = new UnitToPack(); foreach (DataRow item in dsRecipe.Tables[0].Rows) { item["PITCHON1"] = Convert.ToBoolean(item["PITCHON"]); if (item["OUTPATIENTUNIT"].ToString().Trim() == "包装") { item.BeginEdit(); int amount = Convert.ToInt32(item["AMOUNT"]); int changeratio = Convert.ToInt32(item["CHANGERATIO"]); item["AMOUNTCHANGE"] = unitToPack.GetPackAmount(Convert.ToInt32(item["CHANGERATIO"]), Convert.ToInt32(item["AMOUNT"])); item["UNITCHANGE"] = item["PACK"]; item["PRICECHANGE"] = Convert.ToDecimal(item["UNITPRICE"]) * changeratio; item.EndEdit(); } else { item.BeginEdit(); item["PRICECHANGE"] = item["UNITPRICE"]; item["AMOUNTCHANGE"] = item["AMOUNT"]; item["UNITCHANGE"] = item["UNIT"]; item.EndEdit(); } } return(dsRecipe); }
public void LeaveHosCostPrint(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("住院一日清单打印"); if (intResult == 0) { return; } } FrmInhosCostListPrint frm = new FrmInhosCostListPrint(); try { frm.ShowDialog(owner); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("调用住院一日清单打印模块失败,原因:" + ex.Message); SkyComm.ShowMessageInfo("调用住院一日清单打印模块失败!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
public void BespeakRegister(IWin32Window owner) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } /* * 如果有预约挂号一级科室分类,则进入一级科室选择界面 */ if (string.IsNullOrEmpty(SkyComm.getvalue("预约挂号一级科室分类"))) { FrmOfficeChoose frm = new FrmOfficeChoose(); frm.ShowDialog(owner); frm.Dispose(); } else { FrmLevelOneOfficeChooes frm = new FrmLevelOneOfficeChooes(); frm.ShowDialog(owner); frm.Dispose(); } ExitScanCard(); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { ArranageRecordFacade of = new ArranageRecordFacade(); ds = of.FindAllArrangeInfo(SysOperatorInfo.OperatorAreaid, 1); string Offices = SkyComm.getvalue("不能挂号的科室"); string[] arrOffice = Offices.Split(','); foreach (DataRow row in ds.Tables[0].Rows) { if (row.RowState == DataRowState.Deleted) { continue; } if (arrOffice.Contains(row["OFFICEID"].ToString())) { row.Delete(); } } ds.AcceptChanges(); if (string.IsNullOrEmpty(SkyComm.getvalue("预约挂号一级科室分类"))) { } else { ds = mOfficeChoosePresenter.fliterLevelTwoOfficeDataSet(mLevelOneOficeName, ds); } //OfficeFacade officeFacade = new OfficeFacade(); //ds = officeFacade.QueryByOfficeType(34, SysOperatorInfo.OperatorAreaid); }
public int Countdown = 0; //倒计时 private void FrmBaseWorkbench_Load(object sender, EventArgs e) { //加载Logo try { pcImageLogo.Image = Image.FromFile(Application.StartupPath + "\\" + SkyComm.getvalue("logoImage")); } catch { pcImageLogo.Visible = false; } //加载医院名称 try { lblbiaoti.Text = SkyComm.getvalue("医院名称") + "自助服务"; } catch { lblbiaoti.Text = ""; } //倒计时 if (Countdown == 0) { lblTime.Text = "60"; } else { lblTime.Text = Countdown.ToString(); } timer1.Start(); }
private void lblTuiKa_Click(object sender, EventArgs e) { SkyComm.cardInfoStruct = new CardInformationStruct(); SkyComm.eCardAuthorizationData.Tables[0].Clear(); SkyComm.DiagnoseID = string.Empty; SkyComm.cardBlance = 0; SkyComm.cardallmoney = 0; SkyComm.ExitCard(); //this.Close(); }
public static bool Init() { BusinessFacade.His.Common.CommonFacade cf = new BusinessFacade.His.Common.CommonFacade(); cf.RemotingLogin(); int zone = cf.GetServerDateZone(); LogService.GlobalDebugMessage("时区:" + zone); Skynet.Framework.Common.TimeSync.SyncTime(cf.GetServerDateTime(), zone); UpdateSystemConfig(); //return true; //初始化硬件 switch (AutoHostConfig.ReadCardType) { case "XUHUI": //Thread.Sleep(200); StringBuilder sbinput = new StringBuilder("<invoke name=\"READCARDALLOWCARDIN\"><arguments></arguments></invoke>"); string strResult = AutoServiceSDK.SDK.XuHuiInterface_DLL.XmlTcp(sbinput, 0); Skynet.LoggingService.LogService.GlobalInfoMessage("调用XmlTcp允许进卡方法返回:" + strResult + ",输出参数:" + sbinput.ToString()); break; default: break; } //卡类型 CardTypesFacade cardTypesFacade = new CardTypesFacade(); dsCardType = cardTypesFacade.FindByTypeName(SkyComm.getvalue("发卡卡类型")); if (dsCardType == null || dsCardType.Tables[0].Rows.Count == 0) { SkynetMessage.MsgInfo("发卡机的卡类型维护不正确,请与管理员联系!"); } //费用类别 ChargeKindFacade cktype = new ChargeKindFacade(); FeeType = SkyComm.getvalue("发卡费用类别"); DataSet dscktype = cktype.FindChargeKindByName(SkyComm.getvalue("发卡费用类别")); if (dscktype.Tables[0].Rows.Count < 0) { SkynetMessage.MsgInfo("发卡机的卡类型维护不正确,请与管理员联系!"); } else { FeeTypeID = dscktype.Tables[0].Rows[0]["CHARGEKINDID"].ToString(); } //获取银行卡预存,现金预存的配置 AddMoneyCashMode = SkyComm.getvalue("现金预存充值方式"); AddMoneyPosMode = SkyComm.getvalue("银行预存充值方式"); return(login()); }
static void Main() { System.Runtime.Remoting.RemotingConfiguration.Configure("AutoServiceManage.exe.config", false); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (SkyComm.Init() == true) { Application.Run(new FrmMainAuto()); } }
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (ds == null || ds.Tables[0].Rows.Count == 0) { SkyComm.ShowMessageInfo("无可挂号科室!"); return; } this.officeList1.DtOffice = ds.Tables[0]; this.officeList1.DataBind(0); }
//现金预存 private void btnAddMoney_Click(object sender, EventArgs e) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } this.ucTime1.timer1.Stop(); FrmCardSavingCash frm = new FrmCardSavingCash(); frm.CallType = 1; frm.ShowDialog(this); frm.Dispose(); this.ucTime1.Sec = 60; this.ucTime1.timer1.Start(); lblYE.Text = SkyComm.cardBlance.ToString(); decimal decTotal = Convert.ToDecimal(lblTotalMoney.Text); if (decTotal > SkyComm.cardBlance) { lblOK.Visible = false; } else { lblOK.Visible = true; } //this.AnsyWorker(ui => { // ui.UpdateTitle("业务处理中..."); // intaa++; // for (int i = 0; i < 900000000; i++) // { // } // ui.SynUpdateUI(() => // { // ucTime1.timer1.Stop(); // this.btnAddMoney.Text = intaa.ToString() + ",时间" + DateTime.Now.ToString(); // //MessageBox.Show ("自助预存:" + intaa +",时间"+ DateTime.Now.ToString()); // ucTime1.timer1.Start(); // } // ); //}); }
public void Charge(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("缴费"); if (intResult == 0) { return; } } //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } FrmChargeMain frm = new FrmChargeMain(); try { DataSet dsRecipe = GetRecipeInfo(); if (dsRecipe == null) { return; } frm.dsRecipe = dsRecipe; frm.ShowDialog(owner); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("缴费失败:" + ex.Message); SkyComm.ShowMessageInfo("调用自助缴费出错!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
private void showweb(int index) { FrmWebLoad frmWebLoad = new FrmWebLoad(); switch (index) { case 1: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("yygk")); break; } case 2: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("jzzn")); break; } case 3: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("zjjs")); break; } case 4: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("ksjs")); break; } case 5: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("ypjg")); break; } case 6: { frmWebLoad.webBrowser1.Url = new Uri(SkyComm.getvalue("sfbz")); break; } } //if (frmWebLoad.webBrowser1.Url.AbsoluteUri != string.Empty) //{ frmWebLoad.ShowDialog(); //} }
public void ExitCard() { SkyComm.cardInfoStruct.CardNo = ""; //电子卡退卡不调用退卡接口 wangchenyang case 31245 自助机健康卡改造 var _isVirtualcard = SkyComm.cardInfoStruct.isVirtualcard; //身份证退卡不调用退卡接口 chenqinag Case:31784 var _isIdentityCard = SkyComm.cardInfoStruct.isIdentityCard; SkyComm.cardInfoStruct = new CardInformationStruct(); SkyComm.eCardAuthorizationData.Tables[0].Clear(); SkyComm.DiagnoseID = string.Empty; SkyComm.cardBlance = 0; SkyComm.cardallmoney = 0; if (!_isVirtualcard && !_isIdentityCard) { SkyComm.ExitCard(); } }
/// <summary> /// 补卡 /// </summary> /// <param name="owner"></param> public void ReissueCard(IWin32Window owner) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI" || AutoHostConfig.ReadCardType == "XUHUIM1") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } FrmReIssueCard frm = new FrmReIssueCard(); frm.ShowDialog(owner); frm.Dispose(); }
public void hosGps(IWin32Window owner) { FrmHosGps frm = new FrmHosGps(); try { frm.ShowDialog(owner); } catch (Exception ex) { LogService.GlobalInfoMessage("自助查询失败:" + ex.Message); SkyComm.ShowMessageInfo("自助查询出错!" + ex.Message); } finally { frm.Dispose(); } }
public DataSet GetRecipeInfo() { //查询未缴费的处方信息,如果未缴费的处方没有的,则不需要缴费 ClinicPhysicianRecipeFacade clinicPhysicianRecipeFacade = new ClinicPhysicianRecipeFacade(); DataSet dsRecipe = clinicPhysicianRecipeFacade.FindRecipeDetailByDiagnoseID(SkyComm.DiagnoseID); if (dsRecipe.Tables[0].Rows.Count == 0) { SkyComm.ShowMessageInfo("没有需要缴费的处方信息!"); return(null); } dsRecipe.Tables[0].Columns.Add("PRICECHANGE", typeof(decimal)); //单价 dsRecipe.Tables[0].Columns.Add("AMOUNTCHANGE", typeof(decimal)); //数量 dsRecipe.Tables[0].Columns.Add("UNITCHANGE", typeof(string)); //单位 dsRecipe.Tables[0].Columns.Add("PITCHON1", typeof(bool)); //单位 //dsRecipe.Tables[0].Columns["PITCHON"].DataType = typeof(System.Boolean); UnitToPack unitToPack = new UnitToPack(); foreach (DataRow item in dsRecipe.Tables[0].Rows) { item["PITCHON1"] = Convert.ToBoolean(item["PITCHON"]); if (item["OUTPATIENTUNIT"].ToString().Trim() == "包装") { item.BeginEdit(); int amount = Convert.ToInt32(item["AMOUNT"]); int changeratio = Convert.ToInt32(item["CHANGERATIO"]); item["AMOUNTCHANGE"] = unitToPack.GetPackAmount(Convert.ToInt32(item["CHANGERATIO"]), Convert.ToInt32(item["AMOUNT"])); item["UNITCHANGE"] = item["PACK"]; item["PRICECHANGE"] = Convert.ToDecimal(item["UNITPRICE"]) * changeratio; item.EndEdit(); } else { item.BeginEdit(); item["PRICECHANGE"] = item["UNITPRICE"]; item["AMOUNTCHANGE"] = item["AMOUNT"]; item["UNITCHANGE"] = item["UNIT"]; item.EndEdit(); } } return(dsRecipe); }
public void Electronics(IWin32Window owner) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } FormElectronicsReadIdCard form = new FormElectronicsReadIdCard(); form.SendCardType = "成人"; form.ShowDialog(owner); form.Dispose(); }
/// <summary> /// 办卡 /// </summary> /// <param name="owner"></param> public void SendCard(IWin32Window owner) { //判断打印机是否有纸 if (AutoHostConfig.ReadCardType == "XUHUI") { PrintManage_XH thePrintManage = new PrintManage_XH(); string CheckInfo = thePrintManage.CheckPrintStatus(); if (!string.IsNullOrEmpty(CheckInfo)) { SkyComm.ShowMessageInfo(CheckInfo); return; } } //FrmSendCardMain frm = new FrmSendCardMain(); FrmChooseSendCardType frm = new FrmChooseSendCardType(); frm.ShowDialog(owner); frm.Dispose(); ExitScanCard(); }
public void PrintListReport(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("打印"); if (intResult == 0) { return; } } //AutoServiceManage.AutoPrint.FrmPrintMain frm = new AutoPrint.FrmPrintMain(); Form frm = new Form(); try { if (SkyComm.getvalue("LIS厂商类型").ToString() == "智方") { frm = new FrmPrintListReport(); frm.ShowDialog(owner); } else if (SkyComm.getvalue("LIS厂商类型").ToString() == "杏和") { frm = new FrmPrintLisReportXH(); frm.ShowDialog(owner); } } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("自助打印失败:" + ex.Message); SkyComm.ShowMessageInfo("自助打印出错!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
/// <summary> /// 医技预约 wangchao add 2016-07-11 /// </summary> /// <param name="owner"></param> public void MedicalReserve(IWin32Window owner) { if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("医技预约"); if (intResult == 0) { return; } } FrmChooseReserve frm = new FrmChooseReserve(); try { //if (SystemInfo.SystemConfigs["医技预约方式"].DefaultValue.ToString()=="1") if (SkyComm.getvalue("医技预约方式").ToString() == "1") { WebForm webfrm = new WebForm(); webfrm.ShowDialog(); } else//HIS { frm.ShowDialog(owner); } } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("医技预约失败:" + ex.Message); SkyComm.ShowMessageInfo("调用医技预约出错!" + ex.Message); } finally { frm.Dispose(); ExitScanCard(); } }
private void btnExit_Click(object sender, EventArgs e) { SkyComm.CloseWin(this); }
private void lblOK_Click(object sender, EventArgs e) { #region 增加挂号提示信息 try { string registerMsg = SkyComm.getvalue("挂号提示"); if (!string.IsNullOrEmpty(registerMsg)) { using (FrmYesNoAlert frmCheck = new FrmYesNoAlert()) { frmCheck.Title = "挂号提示"; frmCheck.Msg = registerMsg; frmCheck.sec = 90; if (frmCheck.ShowDialog() != DialogResult.OK) { return; } } } } catch { } #endregion this.AnsyWorker(ui => { ui.UpdateTitle("取号确认中,请稍等..."); ui.SynUpdateUI(() => { decimal decYE = Convert.ToDecimal(lblYE.Text); decimal decTotal = Convert.ToDecimal(lblTotalMoney.Text); decimal decTotalMoney = 0; ucTime1.timer1.Stop(); string strMessage = string.Empty; int intRowChange = 0; foreach (DataRow Row in dsBespeak.Tables[0].Rows) { if (Convert.ToBoolean(Row["SELECT"]) == true) { decTotalMoney += DecimalRound.Round(Convert.ToDecimal(Row["ALLCOST"]), 2); } if (IsQueryBespeakData == true && Row["DIAGNOSEID"].ToString() != SkyComm.DiagnoseID) { intRowChange++; strMessage = Row["OFFICE"].ToString() + "|" + Row["USERNAME"].ToString() + " 第" + Row["QUEUEID"].ToString() + "号" + "\r\n"; } } if (!string.IsNullOrEmpty(strMessage)) { if (intRowChange < 3) { strMessage += "\r\n"; } strMessage = strMessage + "是否要绑定到当前就诊卡?"; MyAlert myalert = new MyAlert(AlertTypeenum.确认取消, strMessage, "预约信息绑卡确认", 30); if (myalert.ShowDialog() == System.Windows.Forms.DialogResult.OK) { DataSet dsChagnge = dsBespeak.Clone(); foreach (DataRow Row in dsBespeak.Tables[0].Rows) { if (Convert.ToBoolean(Row["SELECT"]) == true && Row["DIAGNOSEID"].ToString() != SkyComm.DiagnoseID) { Row["DIAGNOSEID"] = SkyComm.DiagnoseID; dsChagnge.Tables[0].ImportRow(Row); } } if (dsChagnge.Tables[0].Rows.Count > 0) { try { BespeakRegisterFacade bespeakRegisterFacade = new BespeakRegisterFacade(); dsBespeak.Tables[0].TableName = "T_BESPEAK_REGISTER"; bespeakRegisterFacade.updateDiagnoseID(dsChagnge); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("绑卡失败:" + ex.Message); SkyComm.ShowMessageInfo("绑卡失败:" + ex.Message); ucTime1.Sec = 60; ucTime1.timer1.Start(); return; } } } else { return; } } if (decTotal != decTotalMoney) { SkyComm.ShowMessageInfo("请检查您选择的预约记录是否正确!"); ucTime1.Sec = 60; ucTime1.timer1.Start(); return; } if (decTotal > decYE) { SkyComm.ShowMessageInfo("您的健康卡余额不足,不能进行取号,请在自助预存后再进行确认操作!"); ucTime1.Sec = 60; ucTime1.timer1.Start(); return; } ucTime1.timer1.Stop(); //构造挂号的数据 CommonFacade commonFacade = new CommonFacade(); DateTime ServerdateTime = commonFacade.GetServerDateTime(); double minutes = Convert.ToDouble(SystemInfo.SystemConfigs["预约挂号报到延时时间"].DefaultValue); RegisterInfoData registerInfoData = new RegisterInfoData(); int registerID = 0; foreach (DataRow Row in dsBespeak.Tables[0].Rows) { if (Convert.ToBoolean(Row["SELECT"]) == true) { if (Convert.ToDateTime(Row["BESPEAKDATE"]).AddMinutes(minutes) < ServerdateTime) { MyAlert frm = new MyAlert(AlertTypeenum.信息, "此预约号的预约时间为:" + Row["BESPEAKDATE"].ToString() + ",预约时间已过,不能使用!"); frm.ShowDialog(); frm.Dispose(); registerInfoData = new RegisterInfoData(); ucTime1.Sec = 60; ucTime1.timer1.Start(); return; } registerID++; DataRow Newrow = registerInfoData.Tables[0].NewRow(); Newrow[RegisterInfoData.T_REGISTER_INFO_REGISTERID] = "新增" + registerID.ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_CANCELMARK] = "0"; Newrow[RegisterInfoData.T_REGISTER_INFO_OPERATORID] = SysOperatorInfo.OperatorID; Newrow[RegisterInfoData.T_REGISTER_INFO_OPERATEDATE] = ServerdateTime; Newrow[RegisterInfoData.T_REGISTER_INFO_CHARGEMARK] = 0; Newrow[RegisterInfoData.T_REGISTER_INFO_PATIENTNAME] = Row["PATIENTNAME"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_SEX] = Row["SEX"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_REGISTEROFFICEID] = Row["BESPEAKOFFICEID"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_OFFICE] = Row["OFFICE"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_REGISTERCLASS] = Row["REGISTERCLASS"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_DOCTORID] = Row["BESPEAKDOCTORID"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_USERNAME] = Row["USERNAME"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_CASECOST] = Row["MEDICALRECORDFEE"]; //工本费 Newrow[RegisterInfoData.T_REGISTER_INFO_BESPEAKMONEY] = Row["BESPEAKMONEY"]; //预约费 Newrow[RegisterInfoData.T_REGISTER_INFO_REGISTERFEE] = Row["REGISTERFEE"]; //挂号费 Newrow[RegisterInfoData.T_REGISTER_INFO_EXAMINEMONEY] = Row["EXAMINEMONEY"]; //诊金 Newrow[RegisterInfoData.T_REGISTER_INFO_BESPEAKID] = Row["BESPEAKID"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_DIAGNOSEID] = Row["DIAGNOSEID"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_ADDRESS] = Row["ADDRESS"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_TELEPHONE] = Row["TELEPHONE"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_OFFICEADDRESS] = Row["OFFICEADDRESS"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_DIAGNOSESTATE] = 0; Newrow[RegisterInfoData.T_REGISTER_INFO_WORKTYPE] = Row["WORKTYPE"].ToString();//班次 Newrow[RegisterInfoData.T_REGISTER_INFO_BIRTHDAY] = Convert.ToDateTime(Row["BIRTHDAY"].ToString()).Date; Newrow[RegisterInfoData.T_REGISTER_INFO_EXECDATE] = ServerdateTime; Newrow[RegisterInfoData.T_REGISTER_INFO_BALANCEMARK] = "2"; Newrow[RegisterInfoData.T_REGISTER_INFO_CARDID] = SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["CARDID"].ToString(); Newrow["BALANCEMODE"] = "预交金";//结算方式 Newrow[RegisterInfoData.T_REGISTER_INFO_BALANCESTATE] = 0; Newrow[RegisterInfoData.T_REGISTER_INFO_CHECKFEE] = Row["PLUSFEE"]; //row[RegisterInfoData.T_REGISTER_INFO_BALANCEOPERATOR] = operatorId; //row[RegisterInfoData.T_REGISTER_INFO_BALANCEDATE] = dateTime; //数据传入方式0:门急诊挂号,1:专家挂号,2:门诊医生站读卡挂号,4:医生站急诊划价收费,5:储值卡挂号,6:银医服务,7,自助挂号 Newrow[RegisterInfoData.T_REGISTER_INFO_DATAINPUTTYPE] = 7;//结算状态 Newrow[RegisterInfoData.T_REGISTER_INFO_ARRANAGERECORDID] = Row["ARRANAGERECORDID"].ToString(); Newrow[RegisterInfoData.T_REGISTER_INFO_QUEUEID] = Row["QUEUEID"].ToString(); registerInfoData.Tables[0].Rows.Add(Newrow); } } RegisterInfoFacade registerFacade = new RegisterInfoFacade(); try { DataSet resultDs = registerFacade.insertEntityZj(registerInfoData); SkyComm.GetCardBalance(); if (resultDs.Tables[0].Columns.Contains("EXAMINENAME") == false) { DataColumn col = new DataColumn("EXAMINENAME", typeof(System.String)); col.Caption = "EXAMINENAME"; resultDs.Tables[0].Columns.Add(col); } // douyaming 2013-6-21 挂号发票输出 诊室位置 if (!resultDs.Tables[0].Columns.Contains("EXAMINELOC")) { resultDs.Tables[0].Columns.Add("EXAMINELOC"); } UsersFacade uf = new UsersFacade(); BespeakRegisterFacade bespeakRegisterFacade = new BespeakRegisterFacade(); foreach (DataRow row in resultDs.Tables[0].Rows) { //13470 在挂号发票中输出诊室 string keyval = row["DOCTORID"].ToString(); if (keyval != "-1") { row["EXAMINENAME"] = uf.FindByUserInfo(keyval).Tables[0].Rows[0]["EXAMINENAME"].ToString(); } //douyaming 2013-5-28 挂号发票输出 诊室位置 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"] = ""; } } } foreach (DataRow dr in resultDs.Tables[0].Rows) { //打印挂号凭证 DataTable dtPrint = resultDs.Tables[0].Clone(); dtPrint.ImportRow(dr); DataSet dsPrint = new DataSet(); dsPrint.Tables.Add(dtPrint.Copy()); PrintReport(dsPrint); } try { Hashtable htPara = new Hashtable(); htPara.Add("@预约时间", Convert.ToDateTime(resultDs.Tables[0].Rows[0]["BESPEAKDATE"]).ToString("MM月dd日HH时mm分")); string OfficeAddress = SysOperatorInfo.OperatorAreaname + resultDs.Tables[0].Rows[0]["OFFICEADDRESS"].ToString(); htPara.Add("@科室位置", OfficeAddress); htPara.Add("@科室", resultDs.Tables[0].Rows[0][RegisterInfoData.T_REGISTER_INFO_OFFICE].ToString()); htPara.Add("@医生", resultDs.Tables[0].Rows[0][RegisterInfoData.T_REGISTER_INFO_USERNAME].ToString()); htPara.Add("@排队号", resultDs.Tables[0].Rows[0]["QUEUEID"].ToString()); htPara.Add("@预约号", resultDs.Tables[0].Rows[0]["BESPEAKID"].ToString()); htPara.Add("@诊室位置", resultDs.Tables[0].Rows[0]["EXAMINELOC"].ToString()); htPara.Add("@诊室名称", resultDs.Tables[0].Rows[0]["EXAMINENAME"].ToString()); UMSMsgLib.UMSMsg.Instance.SendMsg(resultDs.Tables[0].Rows[0]["TELEPHONE"].ToString(), "取号", htPara); } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("取号成功后,发短信失败:" + ex.Message); } } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage(SkyComm.DiagnoseID + "取号[" + registerInfoData.Tables[0].Rows.Count + "]条记录,失败:" + ex.Message); SkyComm.ShowMessageInfo("取号失败:" + ex.Message); ucTime1.Sec = 60; ucTime1.timer1.Start(); return; } SkyComm.ShowMessageInfo("取号成功,请提前15分钟到达分诊大厅进行等候!"); ucTime1.timer1.Stop(); //后台直接进行处理挂号操作 DialogResult = System.Windows.Forms.DialogResult.OK; }); }); //DialogResult = System.Windows.Forms.DialogResult.OK; }
public static int ReadCard(string ReadType) { #region wangchenyang 2018/5/29 case 31245(自助机增加设备扫描手机),自助机的改造 string _isDzCard = SystemInfo.SystemConfigs["是否启用电子卡签约"].DefaultValue; if (_isDzCard.Equals("1")) { FrmChooseCardType frmChooseCardType = new FrmChooseCardType(); try { if (frmChooseCardType.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (!string.IsNullOrEmpty(frmChooseCardType.strMsg)) { return(1); } else { return(0); } } if (frmChooseCardType.cardType != FrmChooseCardType.CardType.Entitycard) { return(0); } } catch (Exception ex) { LogService.GlobalInfoMessage("电子卡二维码生成失败:" + ex.Message); } finally { frmChooseCardType.Dispose(); } } #endregion #region chenqiang 2018.09.20 add by Case:31784 if (SkyComm.getvalue("读卡是否提醒选择卡类型") == "1")//0:院内就诊卡 1:身份证 { if (SkyComm.cardInfoStruct.CardNo != "" && SkyComm.cardInfoStruct.CardNo != null) { return(1); } FrmReadType FrmReadType = new FrmReadType(); try { if (FrmReadType.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (!string.IsNullOrEmpty(FrmReadType.strMsg)) { return(0); } else { return(1); } } if (FrmReadType.cardType != FrmReadType.CardType.Entitycard) { return(0); } } catch (Exception ex) { LogService.GlobalInfoMessage("身份证件调用失败:" + ex.Message); FrmReadType.Dispose(); } finally { FrmReadType.Dispose(); } } #endregion string CardID = string.Empty; switch (AutoHostConfig.ReadCardType) { case "302H": break; case "XUHUI": FrmReadCardXH frm1 = new FrmReadCardXH(); frm1.CardType = "1"; try { if (frm1.CheckCard() != "1") { if (frm1.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(0); } } } catch (Exception ex) { LogService.GlobalInfoMessage("调用读卡器错误:" + ex.Message); } finally { frm1.Dispose(); } break; case "XUHUIM1": FrmReadCardXH frm2 = new FrmReadCardXH(); LogService.GlobalInfoMessage("进入了xuhuim1方法"); frm2.CardType = "2"; try { if (frm2.CheckCard() != "1") { if (frm2.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(0); } } } catch (Exception ex) { LogService.GlobalInfoMessage("调用读卡器错误:" + ex.Message); } finally { frm2.Dispose(); } break; case "XUHUIM_PH": //省医院 FrmReadCardXH frm3 = new FrmReadCardXH(); LogService.GlobalInfoMessage("进入了cpu读卡方法"); frm3.CardType = "3"; try { if (frm3.CheckCard() != "1") { if (frm3.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(0); } } } catch (Exception ex) { LogService.GlobalInfoMessage("调用读卡器错误:" + ex.Message); } finally { frm3.Dispose(); } break; default: FrmReadCardTest frm = new FrmReadCardTest(); if (frm.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return(0); } break; } return(1); }