<div class="main">
            <form id="_form" class=" form-lg  form" method="post" data-source="@Model">
                <div class="form-group">
                    <label class="control-label" for="name">表名</label>
                    <div class="controls">
                        <input placeholder="只能由字母、数字组成，首字符必须英文" type="text" maxlength="20" name="Name" id="Name" data-validate="dataType:'table',nullMsg:'请填写表名！',errorMsg:'表名填写错误'"  checkUrl="@Url.Action("CheckExists",new { id = Request.QueryString["id"],fieldName="表名" })" class="form-control ui-edit-readonly" />
                        <span class="help-block"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label" for="remark">标识</label>
                    <div class="controls">
                        <input placeholder="仅用于标识，如文章，产品" type="text" name="Remark" id="Remark" maxlength="50"  data-validate="dataType:'*',nullMsg:'请填写标识！'" class="form-control" />
                        <span class="help-block"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label" for="value_type">应用站点</label>
                    <div class="controls form-inline">
                        <select class="form-control form-control-sm ui-convertSelect" name="SiteId" id="SiteId" data-validate="dataType:'numeric',min:1,errorMsg:'请选择应用站点!'"  data-custom-params="url:'@Url.Action("LoadListByIds","Site")',textField: 'Name'">
                            <option value="0">请选择应用站点</option>
                        </select>
                        <button type="button" class="btn btn-default btn-sm ui-dialog" data-custom-params="title:'选择站点',url:'@Url.Action("Select","Site")?objname=#SiteId',width:'80%',height:'90%',target:'_self'">选择站点</button>
                        <span class="help-block">为保证检索速度和数据的独立性，一个信息表只能用于一个站点</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label" for="Orderby">默认排序</label>
                    <div class="controls">
                        <input type="text" name="Orderby" id="Orderby" maxlength="50" value="id desc" class="form-control" />
                        <span class="help-block">管理页默认排序方式,留空则默认id desc</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label" for="Pagesize">管理页显示数</label>
                    <div class="controls">
                        <input type="text" name="Pagesize" id="Pagesize" maxlength="3" value="20" class="form-control form-control-xs" />
                        <span class="help-block">管理页默认显示的记录数，留空则默认20</span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="control-label" for="DeleteProtect">删除保护</label>
                    <div class="controls checkbox">
                        <label class="checkbox-inline">
                            <input type="checkbox" name="DeleteProtect" id="DeleteProtect" value="1" checked />启用(启用后列表页不能直接删除)
                        </label>
                        <span class="help-block"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label" for="Xuhao">序号</label>
                    <div class="controls">
                        <input placeholder="仅用于排序" type="text" value="1" maxlength="4" name="Xuhao" id="Xuhao" data-validate="dataType:'numeric',min:1,errorMsg:'请填写数字'" class="form-control form-control-xs ui-queryString" />
                        <span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="controls">
                        @Html.AntiForgeryToken()
                        <input type="hidden" name="Id" id="Id" value="0" />
                        <input type="hidden" name="Uid" id="Uid" value="@ViewBag.Uid" />
                        <input type="hidden" name="Thedate" id="Thedate" value="@DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")" />
                        <button type="button" class="btn btn-sm  btn-primary ui-pagePost" data-custom-params="url:'@Url.Action()',callBack:'PostRefreshBack'">提交</button>
                        <button type="button" class="btn btn-sm btn-default ui-closeDialog">关闭</button>
                    </div>
                </div>
            </form>
        </div>

<script type="text/javascript">
    var id = Request("id");
    if (id != "") {
        $("#_form").FormBind({ dataSourceFrom: "attr" });
    }
    $("#SiteId").click(function () {
        var $this = $(this);
        if ($this.children().length == 1)
        {
            $this.blur();
            $this.siblings(".btn").click();
        }
    });
</script>
