Jessynoo wrote:
Could you please provide some more information:
- the structure of the tables concerned (a piece of schema can help)
- the changes you made in the designer
- the code that you are using
- the description of what goes wrong (like the trace stack of some exception raised)
Thanks in advance. I'm sure we can find an explanation with a little more details.
Thanks for your replay
i Have the following
Item Table
{
itemID PK
Name
quantity
}
Serials Table
{
serialID PK
itemID FK
serial
SupplierID FK
}
Supplier
{
supplierID PK
Name
}
know i want to make Master Details to allow the user edit,save,delet the recored
the header have Item information displayed in textbox
the Details section displayed in DataGridView i want to dispay the followin Columns Headers
SerialID
Serial
ItemName
SupplierName
i did the following
in the fields on related fields i select SerialEntity
and added two properties
one from Item Table i called it ItemName
the other from Supplier Table i calles it SupplierName
the selected serial recored already have ItemID and SupplierID entered and i can select it using normal join query
know i written the foolowing code
public ItemEntity GetItemByID(int id,bool full)
{
DataAccessAdapter adabter = new DataAccessAdapter();
ItemEntity toReturn = new ItemEntity(id);
PrefetchPath2 path = null;
if (full)
{
path = new PrefetchPath2((int)SalesManagement.EntityType.ItemEntity);
path.Add(ItemEntity.PrefetchPathSerials);
}
adabter.FetchEntity(toReturn, path);
return toReturn;
}
when i call this method like
ItemEntity item=manager.GetItemByID(1,true);
dataGridView1.DataSource = item.Serials ;
all things displayed correctly including ItemName (which i created like suppliername)i t dose not displayed any thing
i hobe this clarify my problem
Thanks in advance