Ticket Number Control (Custom Invoice Numbers with Reset)

Kindly point me in the right direction if you can, i have implemented everything according to the tutorial with some minor changes to suit customer request. Everything works great except i cannot close the searched ticket when i use the search feature in this tutorial without crashing the app. When ticket is opened from tickets, it closes just fine. The error looks like its expecting to land on tickets page when ticket is closed but the page is not available.
Here is part of the error:

Inner Exception 1 Type: System.Reflection.TargetInvocationException Message: Property accessor 'CommandLogs' on object 'System.Data.Entity.DynamicProxies.Ticket_CFF633D3352C757204101122CE42097AA4729BB08F1EAC362431BAE8DE9FF3DE' threw the following exception:'The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.' Source: System Stack Trace: at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) at Omu.ValueInjecter.ConventionInjection.Inject(Object source, Object target) at Omu.ValueInjecter.ValueInjection.Map(Object source, Object target) at Omu.ValueInjecter.StaticValueInjecter.InjectFrom[T](Object target, Object[] source) at Samba.Infrastructure.Data.Serializer.ObjectCloner.Clone2[T](T item) at Samba.Services.Implementations.TicketModule.TicketServiceBase.CloseTicket(Ticket ticket, AppState appState) at Samba.Presentation.Services.Implementations.TicketModule.TicketService.CloseTicket(Ticket ticket) at Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.() at Samba.Presentation.ClientLibrary.Modules.PosModule.PosViewModel.(EventParameters1 )`

image

image

1 Like

Thanks @YILDIZHANPOS that actually worked! But how does the search know what ticket without passing a ticketId? Just trying to understand why the ticketId was not needed and why it crashed the application. Thanks again! really appreciate it.

image

Ticket Close Action