Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
500
UltraWinGrid - Binding.DataSource - LinqToDataSet
posted

Hi

I'am taking my first steps with Linq and it looks realy fine. It's a real benefit in showing the right data.

But when i look at my code, i wonder whether the way i did it there's still a connection to the dataset. It shows the right data, but what's gonna happen when i modify, delete or add data.

The eCUWorkpiecesBindingSource2 i use is bound to a ultraWinGrid and is filled with the data by the code i added (as shown further down on this page).

Sorry for my attempt to ask in this confuse way. I wanted to know if i am working correctly on a typed dataset or if i am missunderstanding the right way using linq with a typed dataSet

Thanks for your support

Greetings from germany

Dietrich Schomberg

DataTable workpiecesTable = ecu_managerDataSet.Tables["ECU_Workpieces"];
DataTable workpieces2LocationsTable = ecu_managerDataSet.Tables["ECU_Workpieces2Locations"];
var query =
               from workpieces in ecu_managerDataSet.ECU_Workpieces.AsEnumerable()
               join workpieces2Locations in
               ecu_managerDataSet.ECU_Workpieces2Locations.AsEnumerable()
               on  workpieces.ID equals
               workpieces2Locations.WP_ID
               where !workpieces2Locations.IsAggreedToECUNull()
               && workpieces2Locations.AggreedToECU == nodeID
               && workpieces2Locations.IsEndDateNull()
               orderby workpieces.Abbreviation
               select workpieces;
DataTable dt = new DataTable();
if (query.Count() != 0)
{
   dt = query.CopyToDataTable();                      
}
eCUWorkpiecesBindingSource2.DataSource = dt;

Parents Reply Children
No Data