private void lblQianDao_Click(object sender, EventArgs e) { //如果已经有卡号时,则表示已经读过卡,则不需要再重新读卡 if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo)) { int intResult = SkyComm.ReadCard("挂号"); if (intResult == 0) { return; } } //this.AnsyWorker(ui => { //根据是否有预约信息,如果有预约信息,弹出界面选择。 double minutes = Convert.ToDouble(SystemInfo.SystemConfigs["预约挂号报到延时时间"].DefaultValue); BespeakRegisterFacade bespeakFacade = new BespeakRegisterFacade(); CommonFacade commonFacade = new CommonFacade(); DateTime ServerdateTime = commonFacade.GetServerDateTime(); DataSet bespeakInfoData = bespeakFacade.FindCurrentBespeakByDiagnoseID(SkyComm.DiagnoseID, 1, ServerdateTime.AddMinutes(-minutes)); bool IsQueryBespeakData = false; //ui.SynUpdateUI(() => { if (bespeakInfoData.Tables[0].Rows.Count == 0) { #region 没有预约信息时查询预约 SkyComm.ShowMessageInfo("没有查询到预约信息,如果已经预约请到相应窗口取号!"); return; #endregion } //有预约信息时 if (bespeakInfoData == null || bespeakInfoData.Tables[0].Rows.Count > 0) { #region 预约信息确认取号 //有预约信息,再判断预约信息是几条 FrmBespeakList frm = new FrmBespeakList(); try { frm.dsBespeak = bespeakInfoData; frm.IsQueryBespeakData = IsQueryBespeakData; if (frm.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { SkyComm.GetCardBalance(); } } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("就诊号:" + SkyComm.DiagnoseID + "取号失败:" + ex.Message); } finally { frm.Dispose(); } #endregion } } //); } //); }
public void BespeakSignIn(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; } } //根据是否有预约信息,如果有预约信息,弹出界面选择。 double minutes = Convert.ToDouble(SystemInfo.SystemConfigs["预约挂号报到延时时间"].DefaultValue); BespeakRegisterFacade bespeakFacade = new BespeakRegisterFacade(); CommonFacade commonFacade = new CommonFacade(); DateTime ServerdateTime = commonFacade.GetServerDateTime(); DataSet bespeakInfoData = bespeakFacade.FindCurrentBespeakByDiagnoseID(SkyComm.DiagnoseID, 1, ServerdateTime.AddMinutes(-minutes)); bool IsQueryBespeakData = false; //ui.SynUpdateUI(() => { if (bespeakInfoData.Tables[0].Rows.Count == 0) { #region 没有预约信息时查询预约 SkyComm.ShowMessageInfo("没有查询到预约信息,如果已经预约请到相应窗口取号!"); return; #endregion } //有预约信息时 if (bespeakInfoData == null || bespeakInfoData.Tables[0].Rows.Count > 0) { #region 预约信息确认取号 //有预约信息,再判断预约信息是几条 FrmBespeakList frm = new FrmBespeakList(); try { frm.dsBespeak = bespeakInfoData; frm.IsQueryBespeakData = IsQueryBespeakData; if (frm.ShowDialog(owner) == System.Windows.Forms.DialogResult.OK) { SkyComm.GetCardBalance(); } } catch (Exception ex) { Skynet.LoggingService.LogService.GlobalInfoMessage("就诊号:" + SkyComm.DiagnoseID + "取号失败:" + ex.Message); } finally { frm.Dispose(); } #endregion } } ExitScanCard(); }