<< Click to Display Table of Contents >> Navigation: Developers' Guide > Using Data Interface > Events > Exception Handling |
Navigation: Developers' Guide > Using Data Interface > Events >
Exception Handling
This section describes exception handling in iVend Add-On Framework. Using iVend Add-On Framework, you can handle various scenario by customizing codes and showing custom message.
Download and refer to the project files "CustomScreenSampleForMC" for MC and "POSEventsSampleAddon" for POS.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CXS.Retail.Extensibility.Modules.Transaction; using CXS.Retail.Extensibility; using CXS.Retail.ManagementUIComponents; using CXS.Platform.UIComponents; using DevExpress.XtraEditors; using System.Windows.Forms; using CXS.Framework.Core; using CXS.Retail.UIComponents; using CXS.Retail.ViewModel.Message; using CXSRetailPOS;
namespace POSEventsSampleAddon { class Transaction : TransactionEntryModuleBase { TransactionEntryView t; public override void OnBeforeCustomerSearch(object sender, EventArgs<CXS.SubSystem.Transaction.Transaction> args) { MessageBox.Show("On before customer search - TransactionEntry"); //Testing Exception handling using args args.Message = "Validation error"; args.Cancel = true; args.MessageType = MessageType.Error; } } } |