<?xml version="1.0"?>
<Entity>
	<Name>DictionaryItem</Name>
	<Type>Single</Type>
	<Table>
		<Name>DictionaryItem</Name>
		<Column>
			<Name>DictionaryItemCode</Name>
			<DataType>System.String</DataType>
			<IsKey>true</IsKey>
			<IsAllowNull>false</IsAllowNull>
			<ColumnSize>50</ColumnSize>
		</Column>
		<Column>
			<Name>ProjectCode</Name>
			<DataType>System.String</DataType>
			<IsKey>false</IsKey>
			<IsAllowNull>true</IsAllowNull>
			<ColumnSize>50</ColumnSize>
		</Column>
		<Column>
			<Name>DictionaryNameCode</Name>
			<DataType>System.String</DataType>
			<IsKey>false</IsKey>
			<IsAllowNull>true</IsAllowNull>
			<ColumnSize>50</ColumnSize>
		</Column>
		<Column>
			<Name>SortID</Name>
			<DataType>System.Int32</DataType>
			<IsKey>false</IsKey>
			<IsAllowNull>true</IsAllowNull>
			<ColumnSize>4</ColumnSize>
		</Column>
		<Column>
			<Name>Name</Name>
			<DataType>System.String</DataType>
			<IsKey>false</IsKey>
			<IsAllowNull>true</IsAllowNull>
			<ColumnSize>200</ColumnSize>
		</Column>
		<Column>
			<Name>IsFix</Name>
			<DataType>System.Int32</DataType>
			<IsKey>false</IsKey>
			<IsAllowNull>true</IsAllowNull>
			<ColumnSize>4</ColumnSize>
		</Column>
		<Sql>
			<Name>Select</Name>
			<String>select diCode as DictionaryItemCode, diUnitCode as ProjectCode, dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem where  DictionaryItemCode=@DictionaryItemCode</String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@DictionaryItemCode</Name>
				<Column>DictionaryItemCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
		</Sql>
		<Sql>
			<Name>SelectAll</Name>
			<String>select diCode as DictionaryItemCode, diUnitCode as ProjectCode, dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem</String>
			<CommandType>Text</CommandType>
		</Sql>
		<Sql>
			<Name>Insert</Name>
			<String> Insert into DictionaryItem (  DictionaryItemCode, ProjectCode, DictionaryNameCode, SortID, Name, IsFix ) values (  @DictionaryItemCode, @ProjectCode, @DictionaryNameCode, @SortID, @Name, @IsFix )</String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@DictionaryItemCode</Name>
				<Column>DictionaryItemCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@ProjectCode</Name>
				<Column>ProjectCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@DictionaryNameCode</Name>
				<Column>DictionaryNameCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@SortID</Name>
				<Column>SortID</Column>
				<SqlDbType>Int</SqlDbType>
			</Param>
			<Param>
				<Name>@Name</Name>
				<Column>Name</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@IsFix</Name>
				<Column>IsFix</Column>
				<SqlDbType>Int</SqlDbType>
			</Param>
		</Sql>
		<Sql>
			<Name>Update</Name>
			<String> Update DictionaryItem set ProjectCode=@ProjectCode,DictionaryNameCode=@DictionaryNameCode,SortID=@SortID,Name=@Name,IsFix=@IsFix where  DictionaryItemCode=@DictionaryItemCode</String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@DictionaryItemCode</Name>
				<Column>DictionaryItemCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@ProjectCode</Name>
				<Column>ProjectCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@DictionaryNameCode</Name>
				<Column>DictionaryNameCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@SortID</Name>
				<Column>SortID</Column>
				<SqlDbType>Int</SqlDbType>
			</Param>
			<Param>
				<Name>@Name</Name>
				<Column>Name</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@IsFix</Name>
				<Column>IsFix</Column>
				<SqlDbType>Int</SqlDbType>
			</Param>
		</Sql>
		<Sql>
			<Name>Delete</Name>
			<String> Delete from DictionaryItem  where  DictionaryItemCode=@DictionaryItemCode</String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@DictionaryItemCode</Name>
				<Column>DictionaryItemCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
		</Sql>
		<Sql>
			<Name>SelectByDictionaryNameCode</Name>
			<String> select diCode as DictionaryItemCode, diUnitCode as ProjectCode, dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem where DictionaryNameCode=@DictionaryNameCode </String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@DictionaryNameCode</Name>
				<Column>DictionaryNameCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Order>
				<Name>SortID</Name>
				<Sort>ASC</Sort>
			</Order>
		</Sql>
		<Sql>
			<Name>SelectByDictionaryNameCodeProject</Name>
			<String> select diCode as DictionaryItemCode, diUnitCode as ProjectCode, dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem where DictionaryNameCode=@DictionaryNameCode and ProjectCode = @ProjectCode </String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@ProjectCode</Name>
				<Column>ProjectCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@DictionaryNameCode</Name>
				<Column>DictionaryNameCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Order>
				<Name>SortID</Name>
				<Sort>ASC</Sort>
			</Order>
		</Sql>
		<Sql>
			<Name>SelectByDictionaryName</Name>
			<String> select diCode as DictionaryItemCode, diUnitCode as ProjectCode, a.dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem a , DictionaryName b where a.dnCode = b.dnCode and b.dnName=@Name </String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@Name</Name>
				<Column>Name</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Order>
				<Name>SortID</Name>
				<Sort>ASC</Sort>
			</Order>
		</Sql>
		<Sql>
			<Name>SelectByProjectCode</Name>
			<String> select diCode as DictionaryItemCode, diUnitCode as ProjectCode, dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem where ProjectCode = @ProjectCode </String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@ProjectCode</Name>
				<Column>ProjectCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
		</Sql>
		<Sql>
			<Name>SelectByDictionaryNameProject</Name>
			<String> select diCode as DictionaryItemCode, diUnitCode as ProjectCode, a.dnCode as DictionaryNameCode, diSortID as SortID, diName as Name, diIsReserved as IsFix from DictionaryItem a , DictionaryName b where ''=@ProjectCode and a.dnCode = b.dnCode and b.dnName=@Name </String>
			<CommandType>Text</CommandType>
			<Param>
				<Name>@ProjectCode</Name>
				<Column>ProjectCode</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Param>
				<Name>@Name</Name>
				<Column>Name</Column>
				<SqlDbType>VarChar</SqlDbType>
			</Param>
			<Order>
				<Name>SortID</Name>
				<Sort>ASC</Sort>
			</Order>
		</Sql>
		<Sql>
			<Name>SelectView</Name>
			<String> select  * from V_DictionaryItem </String>
			<CommandType>Text</CommandType>
		</Sql>
	</Table>
</Entity>