The Way to Programming
The Way to Programming
I’m using visual studio and using c#. I have created a database for a local shop. The database contains tables (CategoryTable, ProductTable, TransactionItemTable, TransactionTable). I have a a combo box, i want to get data from my database table and display it using a field within a table. I have attempted the following:
private UWSUShopDatabaseEntities usde = new UWSUShopDatabaseEntities();
in form itself
InitializeComponent(); cboCategory.DataSource = usde.CategoryTable; cboCategory.DisplayMember = "Description"; cboCategory.ValueMember = "Product Type";
Error 1 'UWSUShopManagmentSystem.UWSUShopDatabaseEntities' does not contain a definition for 'CategoryTable' and no extension method 'CategoryTable' accepting a first argument of type 'UWSUShopManagmentSystem.UWSUShopDatabaseEntities' could be found (are you missing a using directive or an assembly reference?) C:\Users\Usman\Desktop\UWSU Managment System\UWSUShopManagmentSystem\UWSUShopManagmentSystem\AddItem.cs 21 43 UWSUShopManagmentSystem
Sign in to your account