New Posts New Posts RSS Feed: detect only changed records
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

detect only changed records

 Post Reply Post Reply
Author
erturkcevik View Drop Down
Groupie
Groupie


Joined: 14-Jun-2007
Location: Turkey
Posts: 40
Post Options Post Options   Quote erturkcevik Quote  Post ReplyReply Direct Link To This Post Topic: detect only changed records
    Posted: 18-Mar-2009 at 12:32am

Hi;

 

How can I detect only changed records in the seperated forms with mdi application?

 

I’m using one PM.

 

Each order record can editing with releated records (order details) in the seperated forms at the same time, but I want detect to changed record in the current order entry form.

 

Sample Code :

 

EntityList<Entity> saveList = new EntityList<Entity>();

EntityList<OrderDetail> mChangedEmployee = new EntityList<OrderDetail>();

mChangedEmployee.ReplaceRange(mPersMgr.GetEntities<OrderDetail>(DataRowState.Modified));

mChangedEmployee.AddRange(mPersMgr.GetEntities<OrderDetail>(DataRowState.Added));

mChangedEmployee.AddRange(mPersMgr.GetEntities<OrderDetail>(DataRowState.Deleted));

 

foreach (Entity mChanged in mChangedEmployee)

{

       saveList.Add(mChanged);

}

mPersMgr.SaveChanges(saveList);

 

But I think , this sample code getting all record to the opening all order entry forms.

 

 

Best Regards

Ertürk ÇEVİK

 

Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 20-Mar-2009 at 4:08pm
Your logic is correct.
 
You have only 1 PM.
 
However, you will not pick up any changes made by other users.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down