<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ilghar:Get ID="Module" Object="Module" Operation="Get(Request.QueryString['Namespace'])" />
<ilghar:Get ID="Object" Object="Module.Object" Operation="Get(Request.QueryString['Namespace'], Convert.ToInt32(Request.QueryString['ObjectID']))" />
<ilghar:Get ID="Property" Object="Module.Object.Property" Operation="Get(Request.QueryString['Namespace'], Convert.ToInt32(Request.QueryString['ObjectID']), Convert.ToInt32(Request.QueryString['ID']))" Validate="True" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑属性</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<script type="text/javascript">
var _page = "module_object_property_edit";
var _lang = "<%=ContentLang%>";
var _webPath = "<%=WebPath%>";
var _imagePath = "<%=ImagePath%>";
var _id = "<%=Request.QueryString["ID"]%>";
var _namespace = "<%=Request.QueryString["Namespace"]%>";
var _objectID = "<%=Request.QueryString["ObjectID"]%>";
var _sqlDbType = "<%=Property[SqlDbType]%>";
var _oleDbType = "<%=Property[OleDbType]%>";
var _mainFieldID = "<%=Property[MainFieldID]%>";
var _lang_working = "正在操作...";
var _lang_operation_fail = "操作失败！";
var _lang_operation_success = "操作成功！";
var _lang_name_empty = "名称不能空！";
var _lang_max_length_incorrect = "字段大小不正确！";
var _lang_numeric_precision_empty = "精度不正确！";
var _lang_numeric_scale_empty = "小数位数不正确！";
</script>
</head>
<body>
<div class="WhiteHeader">
	<div class="Left"><img src="<%=ImagePath%>close_frame.gif" /></div>
	<div class="Title"><a href="../../list.aspx">模块列表</a> → <a href="../list.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>"><span class="<%=ContentLang%>Font"><%=Module[Name]%>的对象列表</span></a> → <span class="<%=ContentLang%>Font"><%=Object[Name]%></span></div>
	<div class="Right"></div>
</div>
<div class="Block">
	<ul class="TabMenu">
		<li class="Left"></li>
		<li class="Middle"><a href="../edit.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>&amp;ID=<%=Request.QueryString["ObjectID"]%>">编辑</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../operation/list.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>&amp;ObjectID=<%=Request.QueryString["ObjectID"]%>">操作列表</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../operation/add.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>&amp;ObjectID=<%=Request.QueryString["ObjectID"]%>">添加操作</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../property/list.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>&amp;ObjectID=<%=Request.QueryString["ObjectID"]%>">属性列表</a></li>
		<li class="Right"></li>
		<li class="Left"></li>
		<li class="Middle"><a href="../property/add.aspx?Lang=<%=ContentLang%>&amp;Namespace=<%=Request.QueryString["Namespace"]%>&amp;ObjectID=<%=Request.QueryString["ObjectID"]%>">添加属性</a></li>
		<li class="Right"></li>
		<li class="Left Selected"></li>
		<li class="Middle Selected">编辑属性</li>
		<li class="Right Selected"></li>
	</ul>
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle"></li>
		<li class="Right"></li>
	</ul>
	<form>
		<table border="0" cellpadding="4" cellspacing="1">
			<tfoot>
				<tr>
					<td colspan="2">
						<input type="submit" value="编辑" />
					</td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<th width="140">Guid：</th>
					<td><%=Property[ID]%></td>
				</tr>
				<tr>
					<th>名称：</th>
					<td><input type="text" name="Name" value="<%=Property[Name]%>" size="30" maxlength="50" class="Text" /></td>
				</tr>
				<tr>
					<th>字段名称：</th>
					<td><input type="text" name="FieldName" value="<%=Property[FieldName]%>" size="30" maxlength="50" class="Text" /></td>
				</tr>
				<tr>
					<th>必填字段：</th>
					<td>
						<%If Convert.ToBoolean(Property[IsNullable])%>
							<input type="radio" name="IsNullable" id="IsNullableNo" /><label for="IsNullableNo">是</label>
							<input type="radio" name="IsNullable" id="IsNullableYes" checked="checked" /><label for="IsNullableYes">否</label>
						<%Else%>
							<input type="radio" name="IsNullable" id="IsNullableNo" checked="checked" /><label for="IsNullableNo">是</label>
							<input type="radio" name="IsNullable" id="IsNullableYes" /><label for="IsNullableYes">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>SqlServer默认值：</th>
					<td><input type="text" name="SqlDbDefault" value="<%=Property[SqlDbDefault]%>" maxlength="50" class="Text" /></td>
				</tr>
				<tr>
					<th>OleDb默认值：</th>
					<td><input type="text" name="OleDbDefault" value="<%=Property[OleDbDefault]%>" maxlength="50" class="Text" /></td>
				</tr>
				<tr>
					<th>SqlServer类型：</th>
					<td>
						<select name="SqlDbType">
							<option value="8">Int</option>
							<option value="12">NVarChar</option>
							<option value="22">VarChar</option>
							<option value="11">NText</option>
							<option value="2">Bit</option>
							<option value="4">DateTime</option>
							<option value="9">Money</option>
							<option value="5">Decimal</option>
							<option value="14">UniqueIdentifier</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>OleDb类型：</th>
					<td>
						<select name="OleDbType">
							<option value="130">WChar</option>
							<option value="200">VarChar</option>
							<option value="202">VarWChar</option>
							<option value="203">LongVarWChar</option>
							<option value="3">Integer</option>
							<option value="11">Boolean</option>
							<option value="7">Date</option>
							<option value="6">Currency</option>
							<option value="131">Numeric</option>
							<option value="72">Guid</option>
						</select>
					</td>
				</tr>
				<tr>
					<th>字段大小：</th>
					<td><input type="text" name="MaxLength" value="<%=Property[MaxLength]%>" size="5" maxlength="10" class="Text" /></td>
				</tr>
				<tr>
					<th>精度：</th>
					<td><input type="text" name="NumericPrecision" value="<%=Property[NumericPrecision]%>" size="5" maxlength="10" class="Text" /></td>
				</tr>
				<tr>
					<th>小数位数：</th>
					<td><input type="text" name="NumericScale" value="<%=Property[NumericScale]%>" size="5" maxlength="10" class="Text" /></td>
				</tr>
				<tr>
					<th>自动编号：</th>
					<td>
						<%If Convert.ToBoolean(Property[IsIdentity])%>
							<input type="radio" name="IsIdentity" id="IsIdentityYes" checked="checked" /><label for="IsIdentityYes">是</label>
							<input type="radio" name="IsIdentity" id="IsIdentityNo" /><label for="IsIdentityNo">否</label>
						<%Else%>
							<input type="radio" name="IsIdentity" id="IsIdentityYes" /><label for="IsIdentityYes">是</label>
							<input type="radio" name="IsIdentity" id="IsIdentityNo" checked="checked" /><label for="IsIdentityNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>多语言字段：</th>
					<td>
						<%If Convert.ToBoolean(Property[MultiLanguage])%>
							<input type="radio" name="MultiLanguage" id="MultiLanguageYes" checked="checked" /><label for="MultiLanguageYes">是</label>
							<input type="radio" name="MultiLanguage" id="MultiLanguageNo" /><label for="MultiLanguageNo">否</label>
						<%Else%>
							<input type="radio" name="MultiLanguage" id="MultiLanguageYes" /><label for="MultiLanguageYes">是</label>
							<input type="radio" name="MultiLanguage" id="MultiLanguageNo" checked="checked" /><label for="MultiLanguageNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>主键：</th>
					<td>
						<%If Convert.ToBoolean(Property[PrimaryKey])%>
							<input type="radio" name="PrimaryKey" id="PrimaryKeyYes" checked="checked" /><label for="PrimaryKeyYes">是</label>
							<input type="radio" name="PrimaryKey" id="PrimaryKeyNo" /><label for="PrimaryKeyNo">否</label>
						<%Else%>
							<input type="radio" name="PrimaryKey" id="PrimaryKeyYes" /><label for="PrimaryKeyYes">是</label>
							<input type="radio" name="PrimaryKey" id="PrimaryKeyNo" checked="checked" /><label for="PrimaryKeyNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>唯一约束：</th>
					<td>
						<%If Convert.ToBoolean(Property[Unique])%>
							<input type="radio" name="Unique" id="UniqueYes" checked="checked" /><label for="UniqueYes">是</label>
							<input type="radio" name="Unique" id="UniqueNo" /><label for="UniqueNo">否</label>
						<%Else%>
							<input type="radio" name="Unique" id="UniqueYes" /><label for="UniqueYes">是</label>
							<input type="radio" name="Unique" id="UniqueNo" checked="checked" /><label for="UniqueNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>可做缺省Meta信息：</th>
					<td>
						<%If Convert.ToBoolean(Property[IsMeta])%>
							<input type="radio" name="IsMeta" id="IsMetaYes" checked="checked" /><label for="IsMetaYes">是</label>
							<input type="radio" name="IsMeta" id="IsMetaNo" /><label for="IsMetaNo">否</label>
						<%Else%>
							<input type="radio" name="IsMeta" id="IsMetaYes" /><label for="IsMetaYes">是</label>
							<input type="radio" name="IsMeta" id="IsMetaNo" checked="checked" /><label for="IsMetaNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>主表：</th>
					<td>
						<select name="MainTableID">
							<option value="00000000-0000-0000-0000-000000000000">未指定</option>
							<ilghar:Tree Object="Module.Object" Condition="Namespace=Request.QueryString['Namespace']">
								<ilghar:Control>
									<ilghar:Space>&nbsp;&nbsp;</ilghar:Space>
									<ilghar:Line>│</ilghar:Line>
									<ilghar:TopOpen>┌</ilghar:TopOpen>
									<ilghar:Top>┌</ilghar:Top>
									<ilghar:MiddleOpen>├</ilghar:MiddleOpen>
									<ilghar:Middle>├</ilghar:Middle>
									<ilghar:BottomOpen>└</ilghar:BottomOpen>
									<ilghar:Bottom>└</ilghar:Bottom>
								</ilghar:Control>
								<ilghar:Record>
									<%If Guid.Equals(ID, Property[MainTableID])%>
										<option value="<%=ID%>" selected="selected"><%=Control%><%=Name%></option>
									<%Else%>
										<option value="<%=ID%>"><%=Control%><%=Name%></option>
									<%EndIf%>
									<%=ChildRecords%>
								</ilghar:Record>
							</ilghar:Tree>
						</select>
					</td>
				</tr>
				<tr>
					<th>主键：</th>
					<td>
						<select name="MainFieldID">
						</select>
					</td>
				</tr>
				<tr>
					<th>级联更新相关字段：</th>
					<td>
						<%If Convert.ToBoolean(Property[UpdateRule])%>
							<input type="radio" name="UpdateRule" id="UpdateRuleYes" checked="checked" /><label for="UpdateRuleYes">是</label>
							<input type="radio" name="UpdateRule" id="UpdateRuleNo" /><label for="UpdateRuleNo">否</label>
						<%Else%>
							<input type="radio" name="UpdateRule" id="UpdateRuleYes" /><label for="UpdateRuleYes">是</label>
							<input type="radio" name="UpdateRule" id="UpdateRuleNo" checked="checked" /><label for="UpdateRuleNo">否</label>
						<%EndIf%>
					</td>
				</tr>
				<tr>
					<th>级联删除相关字段：</th>
					<td>
						<%If Convert.ToBoolean(Property[DeleteRule])%>
							<input type="radio" name="DeleteRule" id="DeleteRuleYes" checked="checked" /><label for="DeleteRuleYes">是</label>
							<input type="radio" name="DeleteRule" id="DeleteRuleNo" /><label for="DeleteRuleNo">否</label>
						<%Else%>
							<input type="radio" name="DeleteRule" id="DeleteRuleYes" /><label for="DeleteRuleYes">是</label>
							<input type="radio" name="DeleteRule" id="DeleteRuleNo" checked="checked" /><label for="DeleteRuleNo">否</label>
						<%EndIf%>
					</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=Manager.GetModulePath(null)%><%=Instance[IlgharCMS.SystemModule.Alias.Module.Namespace]%>/alias.js"></script>
<script type="text/javascript" src="<%=CommonPath%>xmldom.js"></script>
<script type="text/javascript" src="<%=JsPath%>global.js"></script>
<script type="text/javascript" src="<%=JsPath%>system.js"></script>
</body>
</html>