Пример #1
0
        /// <summary>
        /// RF ID 정보 추출 완료되면 호출됨
        /// </summary>
        /// <param name="str"></param>
        private void CompleatedRFRead(string str)
        {
            EndEventCapture();

            // 데이터 로딩 다이얼로그
            using (FormLoadingDialog form = new FormLoadingDialog(RestAPI_CheckRFID))
            {
                form.TopLevel      = true;
                form.StartPosition = FormStartPosition.CenterParent;
                form.ShowDialog();
            }

            if (!apiResult) // 인증 실패
            {
                DCafeKiosk.FormMessageBox dlg = new DCafeKiosk.FormMessageBox();
                dlg.StartPosition = FormStartPosition.CenterParent;
                DialogResult dlgResult = dlg.ShowDialog("사용자 카드를 조회할 수 없습니다.", "인증 실패", CustomMessageBoxButtons.RetryCancel);

                if (dlgResult == DialogResult.Retry)
                {
                    ResetForm(); // 재시도
                }
                else if (dlgResult == DialogResult.Cancel)
                {
                    OnPageCancle(); // 처음 페이지 이동
                }
            }
            else // 인증 성공
            {
                OnPageSuccess();
            }
        }
Пример #2
0
        private void KeypadButtonOk_Click(object sender, EventArgs e)
        {
            //-----------------------------------------------------------------
            // 취소 요청
            // DTOPurchaseCancelResponse rsp = APIController.API_PatchPurchaseCancel(XRfid, this.label_Display.Text);

            //-----------------------------------------------------------------
            // 데이터 로딩 다이얼로그
            using (FormLoadingDialog form = new FormLoadingDialog(Action_API_PatchPurchaseCancel))
            {
                form.TopLevel      = true;
                form.StartPosition = FormStartPosition.CenterParent;
                form.ShowDialog();
            }

            //-----------------------------------------------------------------
            // 완료
            if (rsp.code == 200)
            {
                OnPageSuccess();
            }
            // 실패
            else
            {
                using (FormMessageBox dlg = new FormMessageBox())
                {
                    dlg.StartPosition = FormStartPosition.CenterParent;

                    DialogResult dlgResult =
                        dlg.ShowDialog(@"취소 요청 처리되지 않았습니다." + Environment.NewLine + rsp.reason, @"취소 요청 결과", CustomMessageBoxButtons.OK);
                    return;
                }
            }
        }