Пример #1
0
        /// <summary>
        /// 현금영수증 승인요청
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCashReg_Click(object sender, EventArgs e)
        {
            try
            {
                string ret = KSNET.Reg(JobKind.RegCash,
                                       CashKind.Persnal,
                                       this.txtTid.Text.Trim(),
                                       txtCardNo.Text.Trim(),
                                       "",
                                       "",
                                       txtAmt.Text.Trim(),
                                       1,
                                       "");

                ReqClear();
                fnClear();
                Van.frmVanLoading f = new frmVanLoading("현금영수증 승인을 요청합니다.",
                                                        VanType.KSNET,
                                                        frmVanLoading.JobKind.Communication,
                                                        txtServerIP.Text.Trim(),
                                                        int.Parse(txtServerPort.Text.Trim()),
                                                        ret,
                                                        "GetRequest");
                f.ArgJobKinds = JobKind.RegCash;
                f.Owner       = this;
                f.ShowDialog();


                if (_ReqData.IsAgreeError)
                {
                    Basic.ShowMessage(1, _ReqData.Message);
                    return;
                }

                Application.DoEvents();
                if (this.gridSend.DataSource != null)
                {
                    ((DataTable)this.gridSend.DataSource).Dispose();
                    this.gridSend.DataSource = null;
                }

                if (this.gridRecevie.DataSource != null)
                {
                    ((DataTable)this.gridRecevie.DataSource).Dispose();
                    this.gridRecevie.DataSource = null;
                }

                this.gridSend.DataSource    = _ReqData.dsDoc.Tables[0].Copy();
                this.gridRecevie.DataSource = _ReqData.dsDoc.Tables[1].Copy();

                this.gridRecevie.Refresh();
                this.gridSend.Refresh();


                txtSendData.Text     = _ReqData.FullSendData;
                txtReceviedData.Text = _ReqData.FullRequestData;
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
Пример #2
0
        /// <summary>
        /// 신용카드 승인요청
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnCardReg_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.pictureEdit1.Image != null)
                {
                    this.pictureEdit1.Image.Dispose();
                    this.pictureEdit1.Image = null;
                }
                this.txtSign.Text = "";

                string SignDataString = "";
                Image  SignImage      = null;

                ReqClear();
                fnClear();
                GetSignImage(ref SignDataString, ref SignImage);

                SignDataString          = SignDataString == null ? "" : SignDataString;
                this.pictureEdit1.Image = SignImage;
                this.txtSign.Text       = SignDataString;


                string ret = KSNET.Reg(JobKind.RegCard,
                                       CashKind.None,
                                       this.txtTid.Text.Trim(),
                                       txtCardNo.Text.Trim(),
                                       txtScope.Text.Trim(),
                                       txtAmtSplit.Text.Trim(),
                                       txtAmt.Text.Trim(),
                                       1,
                                       SignDataString);


                Van.frmVanLoading f = new frmVanLoading("승인을 요청합니다.", VanType.KSNET, frmVanLoading.JobKind.Communication,
                                                        txtServerIP.Text.Trim(), int.Parse(txtServerPort.Text.Trim()), ret, "GetRequest");
                f.Owner            = this;
                f.ArgJobKinds      = JobKind.RegCard;
                f.CardApprovalType = SignDataString == "" ? CARD_APPROVAL_TYPE.DDC : CARD_APPROVAL_TYPE.DSC;
                f.ShowDialog();

                if (_ReqData.IsAgreeError)
                {
                    Basic.ShowMessage(1, _ReqData.Message);
                    return;
                }

                Application.DoEvents();
                if (this.gridSend.DataSource != null)
                {
                    ((DataTable)this.gridSend.DataSource).Dispose();
                    this.gridSend.DataSource = null;
                }

                if (this.gridRecevie.DataSource != null)
                {
                    ((DataTable)this.gridRecevie.DataSource).Dispose();
                    this.gridRecevie.DataSource = null;
                }

                this.gridSend.DataSource    = _ReqData.dsDoc.Tables[0].Copy();
                this.gridRecevie.DataSource = _ReqData.dsDoc.Tables[1].Copy();

                this.gridRecevie.Refresh();
                this.gridSend.Refresh();


                txtSendData.Text     = _ReqData.FullSendData;
                txtReceviedData.Text = _ReqData.FullRequestData;
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }