Do you have a winform version of PC trade sample

do you have a winform version of PC trade sample in c# ?
it would help me a lot

Unfortunately no. What would you need from such sample?

Bonjour
I would like to see from (dataabstract/winform) perspective some best practice on how to implement databinding in a datagrid of (SalesOrderHeader) with paging or virtual loading.
With example on how we should retrieve the (SalesOrderDetail) information assuming relation is configured?

  • In one round trip to the server in synch with the (SalesOrderHeader) resultset
  • Every time we select a row in the datagrid

With example on how to persist (add, modify, delete) a typical master detail sales order window with header and lines, what is the role of the configured relation will it take care of passing the header id to the line? If not what is the best way to do this with dataabstract.

With example of you best practice to implement concurrency when persisting the data (optimistic vs pessimistic)

My trial getting to an end soon I need to these basic points in action before committing.
Merci.

I see.

In the master-detail scenario the most important feature of an relation is that this relation allows to propagate auto-increment ID value from master row to its detail rows. Ie when server calculates neaxrt auto-inc value and assigns it to the master row’s ID field, DA takes care to insert detail rows with proper master_id field value.

As for the rest of the questions - to create a sample I first need to know which way of data access do you plan to use? Data Abstract supports 2 different approaches - old-fashioned DataSet/DataTable-based one and a LINQ-based one.

From performance of view they do not differ much, so it is more a design decision. Still you need to remember that DataSet-based way of data access is not supported on platforms other than desktop .NET and Compact Framework.

Regards

Bonjour

Point 1)

to create a sample I first need to know which way of data access do you plan to use?

Answer:

LinkRemoteDataAdapter

private BindingList<dbo_SysUser> fUserList;

public BindingList<dbo_SysUser> UserList

{

get

{

if (fUserList == null)

fUserList = (from t in DataAdapter.GetTable<dbo_SysUser>() select t).ToDABindingList<dbo_SysUser>();

return fUserList;

}

}

Merci.

A paging sample: Sample16210_1_Paging.zip (121.1 KB)
Note how IQeryable is used to store a query source. Some 3rd-party grids that have built-in paging are also able to work with Data Abstract-based datasources.

It depends on the amount of data you need to process. For most scenarios the best way is to load data when the master row is selected. On slower connections it might be better to also consider async detail data loading.

All changes you do accumulate in the DataAdapter instance (either by directly calling insert, update and delete row methods or by changing data in a DABindingList) are sent to the server in one go when you call the ApplyChanges method. Be sure to set the RollbackUpdatesOnError property of the dataservice to true to ensure that all these changes are applied in a trasactional way (mean, all or nothing).

Bonjour thank you for the sample

-About the ApplyChanges method how will the concurrency be handle, do I have to specify a timestamp in the schema/table ?

-Do you think you can add in the sample the master detail scenarios (on trip vs every time) ?
-I notice when I do changes in the schema modeler it is not always saved, I have to save it multiple times sometime 4 tries
-also only 2 days left on my trial do you think you can extended it

Merci.

Hello

Yes, timestamp approach should work.

Will do

Could you say which exactly Data Abstract version have you installed? Just check any of the assemblies version no.

Sure. Send a mail to support@

Regards

follow up I notice when I do changes in the schema modeler it is not always saved, I have to save it multiple times sometime 4 tries.
It seem it was related to a pending installation of window servicepack after installation everything works fine

Do you think you can add in the sample the master detail scenarios (on trip vs every time) ?

merci.

Here they are:
Load detail data on demand: MasterDetail.LoadingOnDemand.zip (122.9 KB)
Load all detail data at once: MasterDetail.LoadAll.zip (122.5 KB)

Regards

Database used is the SQLite database shipped with Data Abstract.

thank you

Anton,

cool. are we adding these to the installer for vNext?