Exemplo n.º 1
0
        private void btnstart_Click(object sender, EventArgs e)
        {
            MyAlert m = new MyAlert();

            m.alerttype = "读取身份证";
            //FrmWaitCard m = new FrmWaitCard();
            if (m.ShowDialog() == DialogResult.OK)
            {
                this.DialogResult = DialogResult.OK;
            }
        }
Exemplo n.º 2
0
 private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
 {
     m.alerttype = "WaitReadCard";
     if (m.ShowDialog() == DialogResult.OK)
     {
         e.Result = "成功";
     }
     else
     {
         e.Result = "失败";
     }
 }
Exemplo n.º 3
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            Msgvisable(this.lblMsg, true);
            PutCardUniversal pc = new PutCardUniversal();
            int i = pc.OutCardD1000(0, 0, FrmMain.userInfo, 0);

            if (i == -1)
            {
                //退卡
                this.Close();
            }

            SkyComm skyComm = new SkyComm();
            DataSet parInfo = skyComm.QueryPatInfo(FrmMain.cardInfoStruct.CardNo);

            if (parInfo.Tables[0].Rows.Count <= 0)
            {
                e.Result = "失败";
                MyMsg.MsgInfo("卡号无效! 卡号:" + FrmMain.cardInfoStruct.CardNo);
                this.Close();
            }

            FrmMain.patientInfoData = parInfo;
            FrmMain.cardBlance      = Convert.ToDecimal(FrmMain.patientInfoData.Tables[0].Rows[0]["LeftJinE"]);

            MyAlert m = new MyAlert();

            m.alerttype = "开始充值";
            if (m.ShowDialog() == DialogResult.OK)
            {
                parInfo = skyComm.QueryPatInfo(FrmMain.cardInfoStruct.CardNo);
                if (parInfo.Tables[0].Rows.Count <= 0)
                {
                    e.Result = "失败";
                    MyMsg.MsgInfo("卡号无效! 卡号:" + FrmMain.cardInfoStruct.CardNo);
                    this.Close();
                }

                FrmMain.patientInfoData = parInfo;
                FrmMain.cardBlance      = Convert.ToDecimal(FrmMain.patientInfoData.Tables[0].Rows[0]["LeftJinE"]);

                FrmRecharge fr = new FrmRecharge();
                fr.ShowDialog();
            }
            else
            {
                //退卡
                this.Close();
            }
        }
        //确认
        private void lblOK_Click(object sender, EventArgs e)
        {
            MyAlert m = new MyAlert();

            m.alerttype = "确认取消";
            m.Msg       = String.Format("本次充值金额:{0}元\n请核对您的充值金额是否正确?", sum.ToString());
            if (m.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            this.timer1.Stop();
            try
            {
                backgroundWorker2.RunWorkerAsync();
            }
            catch (Exception ex)
            {
                SkynetMessage.MsgInfo(ex.Message);
                return;
            }
            //调用充值业务
        }
Exemplo n.º 5
0
        //开始充值
        private void lblOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(FrmMain.cardInfoStruct.CardNo))
            {
                MyMsg.MsgInfo("请刷卡进入!");
                this.Close();
                return;
            }
            if (backgroundWorker1.IsBusy)
            {
                SkynetMessage.MsgInfo("业务处理中,请稍候。。。");
                return;
            }
            //ReckonAccountTimeFacade reckonAccountsTimeFacade = new ReckonAccountTimeFacade();
            //DateTime accountTime = reckonAccountsTimeFacade.GetEndTime(SysOperatorInfo.OperatorID, "门诊");
            //if (DateTime.Now < accountTime)
            //{
            //    SkynetMessage.MsgInfo("该时间段已经结帐,不能办理预交金业务,请重试!");
            //    return;
            //}
            //if (FrmMain.eCardAuthorizationData.Tables["T_CARD_AUTHORIZATION"].Rows.Count <= 0)
            //{
            //    SkynetMessage.MsgInfo("此操作没有找到所要充值的卡信息!");
            //    return;
            //}
            MyAlert m = new MyAlert();

            m.alerttype = "开始充值";
            if (m.ShowDialog() == DialogResult.OK)
            {
                this.backgroundWorker1.RunWorkerAsync();
            }
            else
            {
                //退卡
                this.Close();
            }
        }