示例#1
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();
            }
        }
示例#2
0
 private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Result.Equals("挂号"))
     {
         //FrmOfficeList fz = new FrmOfficeList();
         //ShowWin(fz);
     }
     else if (e.Result.Equals("充值"))
     {
         FrmRecharge fr = new FrmRecharge();
         ShowWin(fr);
     }
     else if (e.Result.Equals("读证"))
     {
         FrmTakeCard fc = new FrmTakeCard();
         ShowWin(fc);
     }
     else if (e.Result.Equals("发卡"))
     {
         FrmGetCard fc = new FrmGetCard();
         ShowWin(fc);
     }
 }