Beispiel #1
0
        // 다량 현금영수증 조회
        private void btnGetInfos_Click(object sender, EventArgs e)
        {
            List <string> MgtKeyList = new List <string>();

            //'최대 1000건.
            MgtKeyList.Add("20150209-01");
            MgtKeyList.Add("20150209-02");
            MgtKeyList.Add("20150209-03");
            MgtKeyList.Add("20150209-10");

            try
            {
                List <CashbillInfo> cashbillInfoList = cashbillService.GetInfos(txtCorpNum.Text, MgtKeyList);

                string tmp = null;
                for (int i = 0; i < cashbillInfoList.Count; i++)
                {
                    tmp += "itemKey : " + cashbillInfoList[i].itemKey + CRLF;
                    tmp += "mgtKey : " + cashbillInfoList[i].mgtKey + CRLF;
                    tmp += "tradeDate : " + cashbillInfoList[i].tradeDate + CRLF;
                    tmp += "issueDT : " + cashbillInfoList[i].issueDT + CRLF;
                    tmp += "customerName : " + cashbillInfoList[i].customerName + CRLF;
                    tmp += "itemName : " + cashbillInfoList[i].itemName + CRLF;
                    tmp += "identityNum : " + cashbillInfoList[i].identityNum + CRLF;
                    tmp += "taxationType : " + cashbillInfoList[i].taxationType + CRLF;

                    tmp += "totalAmount : " + cashbillInfoList[i].totalAmount + CRLF;
                    tmp += "tradeUsage : " + cashbillInfoList[i].tradeUsage + CRLF;
                    tmp += "tradeType : " + cashbillInfoList[i].tradeType + CRLF;
                    tmp += "stateCode : " + cashbillInfoList[i].stateCode + CRLF;
                    tmp += "stateDT : " + cashbillInfoList[i].stateDT + CRLF;
                    tmp += "printYN : " + cashbillInfoList[i].printYN + CRLF;

                    tmp += "confirmNum : " + cashbillInfoList[i].confirmNum + CRLF;
                    tmp += "orgTradeDate : " + cashbillInfoList[i].orgTradeDate + CRLF;
                    tmp += "orgConfirmNum : " + cashbillInfoList[i].orgConfirmNum + CRLF;

                    tmp += "ntssendDT : " + cashbillInfoList[i].ntssendDT + CRLF;
                    tmp += "ntsresult : " + cashbillInfoList[i].ntsresult + CRLF;
                    tmp += "ntsresultDT : " + cashbillInfoList[i].ntsresultDT + CRLF;
                    tmp += "ntsresultCode : " + cashbillInfoList[i].ntsresultCode + CRLF;
                    tmp += "ntsresultMessage : " + cashbillInfoList[i].ntsresultMessage + CRLF;

                    tmp += "regDT : " + cashbillInfoList[i].regDT + CRLF + CRLF;
                }

                MessageBox.Show(tmp);
            }
            catch (PopbillException ex)
            {
                MessageBox.Show(ex.code.ToString() + " | " + ex.Message);
            }
        }
        /*
         * 다수건의 현금영수증 상태 및 요약 정보를 확인합니다. (1회 호출 시 최대 1,000건 확인 가능)
         * - https://docs.popbill.com/cashbill/dotnetcore/api#GetInfos
         */
        public IActionResult GetInfos()
        {
            // 조회할 현금영수증 문서번호 배열, (최대 1000건)
            List <string> mgtKeyList = new List <string>();

            mgtKeyList.Add("20220527-001");
            mgtKeyList.Add("20220527-002");

            try
            {
                var response = _cashbillService.GetInfos(corpNum, mgtKeyList);
                return(View("GetInfos", response));
            }
            catch (PopbillException pe)
            {
                return(View("Exception", pe));
            }
        }