// 문서관리번호 사용유무 확인 private void btnCheckMgtKeyInUse_Click(object sender, EventArgs e) { try { bool InUse = cashbillService.CheckMgtKeyInUse(txtCorpNum.Text, txtMgtKey.Text); MessageBox.Show((InUse ? "사용중" : "미사용중")); } catch (PopbillException ex) { MessageBox.Show(ex.code.ToString() + " | " + ex.Message); } }
/* * 파트너가 현금영수증 관리 목적으로 할당하는 문서번호 사용여부를 확인합니다. * - 이미 사용 중인 문서번호는 중복 사용이 불가하고, 현금영수증이 삭제된 경우에만 문서번호의 재사용이 가능합니다. * - https://docs.popbill.com/cashbill/dotnetcore/api#CheckMgtKeyInUse */ public IActionResult CheckMgtKeyInUse() { try { // 현금영수증 문서번호 string mgtKey = "20220527-001"; bool result = _cashbillService.CheckMgtKeyInUse(corpNum, mgtKey); return(View("result", result ? "사용중" : "미사용중")); } catch (PopbillException pe) { return(View("Exception", pe)); } }