Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Redo/Undo in Vb.net

Posted on 2006-07-13
4
Medium Priority
?
1,498 Views
Last Modified: 2008-01-09
Redo/Undo ( in .Net)

How to do redo/undo for add,delete operations in vb.net using msaccess as backend?

Any links or tips?
0
Comment
Question by:biplavo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
JRossi1 earned 210 total points
ID: 17102419
That is a very complex feature.  Consider this:

Maintaining state of Business Object and User Interface to provide N-No of Undo/Redo capability. User Interface and Business Object synchronization (After any Undo/Redo operation, the UI should focus the Bound control whose value is changed).

"As far as maintaining the state of the business object is concerned, this problem is resolved. But the only trouble i am facing is "The User Interface must respond and set the focus to the underlying control"

Problem Description:

The undo/redo action should allow user-initiated changes to be reversed and re-applied. It is necessary to detect user-initiated changes to the business object. It would be insufficient to monitor the various property change events emitted by the business object because the event
handler would be unable to tell whether the change originated from the UI. Furthermore, it would be insufficient to monitor the validated event because this event provides no details about the binding activity (before/after property values). Also some modifactions to the state of the object might result from a method invocation.

The requirement is to find an event which gets fired every time the Object property is changed or reset. As well as this event should notify us the current bindingContext. The binding class in .Net Framework provides us 2 such events viz Format and Parse and these two events proved to be insufficient because of their nature of occurance. (The Format event gets fired every time before and after the object properties are changed and there is no notification of New and Old values. The Parse event gets fired every time when the property is changed through the UI and will not get fired when the property is changed through the code)

Research over BindingManagerBase revealed that the Push /Pull data methods are not virtual methods, they are only protected methods in BindingManagerBase, so it seems deriving from BindingManagerBase could not customize them, also the BindingContext only accepts the class which base is BindingManagerBase so create a wrapper class for the PropertyManager class also might not work

In order to achieve the above mentioned objective, we are thinking of building a CommandManager which would sit between the Presentation layer and Business layer. CommandManager will be responsible for interacting with the Business layer and maintaing the UI state as well as the Business Object's current state. Any property changes/method calls to the Business Object will pass through the CommandManager. This solution requires the team developers to write their own Custom binding over the .Net Framework and seems to be a possible but too much of an effort.
0
 

Author Comment

by:biplavo
ID: 17107389
So Mr. JRossi1, do i have any choice or not?
Does VB.Net provides any feature in "Dataset" for this particular case?

0
 
LVL 6

Expert Comment

by:JRossi1
ID: 17107507
No. You do not have a choice.  The VB.NET provides no such feature.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question