Exemple #1
0
        private void lblCashStored_Click(object sender, EventArgs e)
        {
            this.ucTime1.timer1.Stop();

            //现金预存前先刷卡
            if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo))
            {
                FrmMain frmM      = new FrmMain();
                int     intResult = SkyComm.ReadCard("现金预存");
                if (intResult == 0)
                {
                    this.ucTime1.timer1.Start();
                    return;
                }
            }

            //拍照
            switch (AutoHostConfig.ReadCardType)
            {
            case "XUHUI":
                AutoServiceSDK.SdkService.Common_XH camera = new AutoServiceSDK.SdkService.Common_XH();
                camera.TakeCamera(SkyComm.cardInfoStruct.CardNo, SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["PATIENTNAME"].ToString(), AutoHostConfig.Machineno);
                break;

            default:
                break;
            }

            FrmCardSavingCash frm = new FrmCardSavingCash();

            frm.CallType = CallType;
            if (frm.ShowDialog(this) == DialogResult.Cancel)
            {
                this.ucTime1.timer1.Start();
            }
            Savingsucceed = frm.Savingsucceed;
            RechargeMoney = frm.RechargeMoney;
            MODETYPE      = "现金";
            frm.Dispose();
        }
        private void lblYuCun_Click(object sender, EventArgs e)
        {
            SkyComm.CardSavingType = 0;

            if (!string.IsNullOrEmpty(AutoHostConfig.PosInterfaceType) && !string.IsNullOrEmpty(AutoHostConfig.CashBoxType))
            {
                FrmCardSavingMain frm = new FrmCardSavingMain();
                frm.ShowDialog(this);
                frm.Dispose();
            }
            else if (!string.IsNullOrEmpty(AutoHostConfig.CashBoxType))
            {
                #region 直接现金预存
                //现金预存前先刷卡
                //如果已经有卡号时,则表示已经读过卡,则不需要再重新读卡
                if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo))
                {
                    int intResult = SkyComm.ReadCard("现金预存");
                    if (intResult == 0)
                    {
                        return;
                    }
                }

                //拍照
                switch (AutoHostConfig.ReadCardType)
                {
                case "XUHUI":
                    AutoServiceSDK.SdkService.Common_XH camera = new AutoServiceSDK.SdkService.Common_XH();
                    camera.TakeCamera(SkyComm.cardInfoStruct.CardNo, SkyComm.eCardAuthorizationData.Tables[0].Rows[0]["PATIENTNAME"].ToString(), AutoHostConfig.Machineno);
                    break;

                default:
                    break;
                }

                FrmCardSavingCash frm = new FrmCardSavingCash();
                frm.CallType = 0;
                if (frm.ShowDialog(this) == DialogResult.Cancel)
                {
                    frm.Dispose();
                    return;
                }
                frm.Dispose();

                #endregion
            }
            else if (!string.IsNullOrEmpty(AutoHostConfig.PosInterfaceType))
            {
                #region 直接银行预存
                //现金预存前先刷卡
                //如果已经有卡号时,则表示已经读过卡,则不需要再重新读卡
                if (string.IsNullOrEmpty(SkyComm.cardInfoStruct.CardNo))
                {
                    int intResult = SkyComm.ReadCard("银行预存");
                    if (intResult == 0)
                    {
                        return;
                    }
                }

                FrmCardSavingBank frm = new FrmCardSavingBank();
                frm.CallType = 0;
                if (frm.ShowDialog(this) == DialogResult.Cancel)
                {
                    frm.Dispose();
                    return;
                }
                frm.Dispose();

                #endregion
            }


            if (SkyComm.CardSavingType == 1)
            {
                lblQianDao_Click(null, null);
            }
            else if (SkyComm.CardSavingType == 2)
            {
                lblJiaoFei_Click(null, null);
            }
        }