When development module Product, I am working part Isearchable. When Run (F5) , system a message arross:
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: The multi-part identifier "dbo.Product_Category.CategoryID" could not be bound.
The multi-part identifier "dbo.Product_Category.ModuleID" could not be bound.
code
{
public SearchItemInfoCollection ISearchable.GetSearchItems(ModuleInfo ModInfo)
RelationCollection relation = new RelationCollection();SortExpression sorter = new SortExpression();ResultsetFields fields = new ResultsetFields(8);// filter.Add(PredicateFactory.CompareValue(ProductItemPropertiesFieldIndex.ItemId, ComparisonOperator.Equal, itemid));
fields.DefineField(
fields.DefineField(
fields.DefineField(
fields.DefineField(
fields.DefineField(
fields.DefineField(
fields.DefineField(
fields.DefineField(
sorter.Add(
relation.Add(
relation.Add(
dao.GetMultiAsDataTable(fields, dynamicList, 0, sorter,
{
nData.Rows.Add(aRow.ItemArray);
}
ProductItemPropertiesFieldIndex.PropertiesId, 0, "PropertiesID");ProductPropertiesFieldIndex.Name, 1, "Name");ProductPropertiesFieldIndex.Code, 2, "Code");ProductPropertiesFieldIndex.Description, 3, "Description");ProductPropertiesFieldIndex.FormulaParam, 4, "FormulaParam");ProductPropertiesFieldIndex.DataType, 5, "DataType");ProductItemPropertiesFieldIndex.PropertiesValue, 6, "PropertiesValue");ProductItemPropertiesFieldIndex.ItemId, 7, "ItemId");SortClauseFactory.Create(ProductPropertiesFieldIndex.DataType, SortOperator.Descending));ProductPropertiesEntity.Relations.ProductItemPropertiesEntityUsingPropertiesId, JoinHint.Inner);ProductItemPropertiesEntity.Relations.ProductItemsEntityUsingItemId, JoinHint.Inner);DataTable dynamicList = new DataTable();TypedListDAO dao = new TypedListDAO();null, relation, true, null, null, 0, 0);DataTable nData = dynamicList.Clone();foreach (DataRow aRow in dynamicList.Rows)
SearchItemInfoCollection
{
SearchItem =
SearchItem.Title =
SearchItem.Description = row[
SearchItem.Author = 1;
SearchItem.ModuleId = 653;
SearchItemCollection = new SearchItemInfoCollection();foreach (DataRow row in nData.Rows)SearchItemInfo SearchItem;new SearchItemInfo();"EPortal.Products";"Name"].ToString();//int.Parse(row["ModuleId"].ToString());
SearchItem.SearchKey = row[
SearchItem.Content = row[
}
SearchItemCollection.Add(SearchItem);} SearchItemCollection;}
return
"ItemID"].ToString();"Name"].ToString();