An Xml file which defines the basic information about a specific kind of business object,including model infos, table definitions, and field definitions, and if this business object is a DTO, multiple tables can be included, with one for the master table. It can be deserialized by our framework using TcmContext.FindModel(modelName) method into an instance of BusinessModel. BusinessModel can be used to decide the ui for the data to be displayed, validate the data when doing mnt, and utilized by the framework for data retrieving and saving. http://boron:7080/trac/projects/TCM/wiki/BusinessModel
This is an instance which uses the name of the BusinessModel as the construction parameter. Usually used by the clientside Controller during runtime. There are lots of properties provided in this instance, except from the ModelInfo property which returns the BusinessModel, it also provides "Data" property which stores the current data worked on; "Provider" property which returns an instance of wrapper for Service Proxy which could complement common CRUD functionality with the form of DataSet; "ObjectProvider" property which is similar to "Provider", except that the data transfer objects are strong typed entity and list. "FetchDataType", "ListDataType" which specify the entity type for the data transferred by the common CRUD functionality
BusinessModel model = TcmContext.Current.FindModel(modelName);
A special kind of BusinessModel, but instead of using for displaying and retrieving data, this model is used for searching . It can be used on an AdvancedSearchForm or XmlViewer when dyanmic searching functionality is needed. It will also be used by the server side manager to facilite conceiving the dynamic sql according to the search criteria from the the user. To mark a BusinessModel as SearchModel, set the Usage property in the xml file to UserQuery.
Help create dynamic sql string
Meta model data
Name of this model, it should be the same as the file name of the model xml. For BusinessModel, if there is only one table in it, it could be the same as the TableName of that table, if there are more than one tables in in it, take table "XXXHead" and table "XXXLine",the name should be XXX. For SearchModel, setting it to the TableName of the only table in it (or the master table in it, if the SearchModel is also a BusinessModel with several tables in it) suffixed by "Search".
Description of this model. If this is a SearchModel, when creating a search form upon that model, the default Text of the Search Form would be Text + " Search".
The normalized name representing the CRUD service proxy for this model. The name is the same as the name of the service contract type without the prefix "WorkWise.Tcm.Service.". The provider name of SearchModel is of no use. Which service would be called for search for the search form is decided by the BusinessModel's Provider.
TableName of the master table in this model, take if there are are 2 tables "XXXHead" and "XXXLine" in the model, the value of MasterTable should be set to "XXXHead"
The name of primary key fields of the master table, if more than one field are involved, delimite them with comma
valid values are "CRUD" or "UserQuery". If set to "CRUD", this Model is BusinessModel, if set to "UserQuery", it's SearchModel. If a model is both Both BusinessModeland SearchModel, set it to "UserQuery"
If the Model can be used for a Dictionary (take, CustomerSoldTo, ItemMaster, ShopOrder) and there is an AdvancedSearchForm created to used to search upon that table, usually when we are creating a Workbench tab, set the value of it to the XmlForm Path of this search form, which is the relative path from Data\Config\XmlForm and without ".xml" suffix, take "Workbench\Manufacturing\ShopFloorManagement\ShopOrderSearch", see ReuseWorkbenchSearchFormForDictionarySearchForm for more details
a Model can contain one or more instances of DataTableEntity. A SearchModel or BusinessModel which returns simple entity usually contains only one DataTableEntity; ABusinessModel which contains an aggregation of data in the form of DTO (http://boron:7080/trac/projects/TCM/wiki/Glossary#DTO) usually contains several DataTableEntities
DataTableEntity, TableName, type name, entity type name returned by the List method, DTO, DbTableName, DictionaryDisplayFields, BrowserFields of CardController, GridListModel columns of result grid, Return columns of SqlQueryManagerBase<D,L>, SqlDb, UseCacheForDictionary, large data->false, Save memory, non-.net also could mnt, table mnt -> true, Indexes, Fields, DataFieldEntity, Name, BusinessModel, SearchModel, FieldType, FieldSize, max length of this field, 1->bool, 8-> datetime, max length of the integer part of this field, Scale, Needed, DefaultValue, BusinessModel, SearchModel, DbField, BusinessModel, SearchModel, DbTableName, ColumnHeader, CardController, SelectionForm, PromptText, SelectionForm, FieldFormat, ZZZ...X, XXXX...X, @@..@, @@@@@@@@@-XXX, Expression, ControlType, code or name -> normal string field, number -> integer fields (precision=0), quantity -> decimal fields (has precision), currency -> for fc fields, flag -> for boolean fields or string field with "Y" or "N" as the only valid values., date -> datetime fields, time -> isam timespan field or tcm time field(usually stored as an integer of HHMMSS), dict -> fields that need to reference another table for valid input or description, usually the data in that table is large, so data are loaded without cache., lookup, Reference another dictionary table, static items, mtext, mdict, Contraint, UpperCase, Positive, None (default), Lookup, Static, Config, Dictionary, Config, Data\Config\Global\DictionaryMappingConfig.xml, NumberIdentifier, SqlExpression, alias/sub table when combining the sql, calculation field, DefaultSearchType, Range(default), Eq, Ne, Contains, BeginWith, Gt, Ge, Lt, Le, Like, Advanced, Dynamic