Mustang 1.0.0.0例子说明

Examples Information
示例 映射文件 说明
1 QuickStart QuickStart.uim.xml 快速示例
2 Use ORM ORM.uim.xml 在示例一的基础上,加上了ORM(NHibernate)
3 Object Cascade Cascade.uim.xml 对象引用关系的映射示例
4 Complex Property ComplexProperty.uim.xml 对复杂属性的分解示例。在该示例中,属性的内容是形如:City=eijingB&School=NCC的格式,它会被映射到界面的多个控件
要执行2,3,4示例必须先执行以下几步:
1)创建一个SqlServer数据库,并同步修改Web.Config中的设置
<nhibernate>
    ...
    <add key="hibernate.connection.connection_string" value="data datesource=???;initial catalog= ???;userid=???;password=???;"
    ...
</nhibernate>
2)执行以下的SQL语句
CREATE TABLE SysUser (
[UserID] [int] IDENTITY (1, 1) NOT NULL , [UserName] [nvarchar] (100) NULL , [LoginID] [nvarchar] (100) NULL , [Password] [nvarchar] (100) NULL , [Email] [varchar] (100) NULL , [PostCode] INT NULL , [Birthday] [smalldatetime] NULL , [Mobile] [nvarchar] (100) NULL , [Gender] [int] NULL , [UserGroupID] [int] NULL , [Status] [char] (1) NULL, [Standby1] [nvarchar] (500) NULL
)
GO
INSERT INTO SysUser(UserName, LoginID, [Password], Email,PostCode, Birthday, Mobile, Gender, UserGroupID, Status, standby1)
VALUES('michael sheen', 'michael', '', 'xxx@xxx.com', '100068', '1999-09-09', '13912345678', '1', '1', '1', '' )
GO
CREATE TABLE [SysUserGroup] ( [UserGroupID] [int] IDENTITY (1, 1) NOT NULL , [UserGroupName] [nvarchar] (100) NULL , [Description] [nvarchar] (100) NULL , [Status] [char] (1) NULL )
GO
INSERT INTO SysUserGroup (UserGroupName, [Description], Status) VALUES('Admin', 'Administrator', '1')
INSERT INTO SysUserGroup (UserGroupName, [Description], Status) VALUES('User', 'Normal User', '1')
posted on 2005-08-28 14:51  microsheen  阅读(660)  评论(0编辑  收藏  举报