<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="attributeedit.aspx.cs"
    Inherits="HySoft.BaseCallCenter.Web.formmanage.attributeedit" %>

<!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 id="Head1" runat="server">
    <title>实体属性信息</title>
    <link href="../../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="../images/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../../scripts/jquery/jquery.form.js"></script>
    <script type="text/javascript" src="../../scripts/jquery/jquery.validate.min.js"></script>
    <script type="text/javascript" src="../../scripts/jquery/messages_cn.js"></script>
    <script type="text/javascript" src="../../scripts/ui/js/ligerBuild.min.js"></script>
    <script type="text/javascript" src="../../scripts/function.js"></script>
    <script src="../scripts/calendar.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerDrag.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.all.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/ligerui.min.js" type="text/javascript"></script>
    <script src="../scripts/ui/js/plugins/ligerRadioList.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
        });

        function CloseThis() {
            var dialog = frameElement.dialog;
            dialog.close();
        }
        function validate() {
            var i = 0;
            if (!validate_name()) {
                i++;
            }
            if (!validatedb_name()) {
                i++;
            }
            if (!validate_type()) {
                i++;
            }
            if (i > 0) {
                return false;
            }
            return true;
        }
        function validate_name() {
            if ($("#txtF_Name").val() == "" || $("#txtF_Name").val() == undefined) {
                document.getElementById("lbtxtF_Name").innerHTML = "*";
                document.getElementById("lbtxtF_Name").style.color = "red";
                return false;
            }
            else {
                document.getElementById("lbtxtF_Name").innerHTML = "*";
                document.getElementById("lbtxtF_Name").style.color = "#414141";
                return true;
            }
        }
        function validate_type() {
            if ($("#selecttype").val() == "" || $("#selecttype").val() == undefined) {
                document.getElementById("lbselecttype").innerHTML = "*";
                document.getElementById("lbselecttype").style.color = "red";
                return false;
            }
            else {
                document.getElementById("lbselecttype").innerHTML = "*";
                document.getElementById("lbselecttype").style.color = "#414141";
                return true;
            }
        }
        function validatedb_name() {
            if ($("#txtF_DBFieldlName").val() == "" || $("#txtF_DBFieldlName").val() == undefined) {
                document.getElementById("lbtxtF_DBFieldlName").innerHTML = "*";
                document.getElementById("lbtxtF_DBFieldlName").style.color = "red";
                return false;
            }
            else {
                document.getElementById("lbtxtF_DBFieldlName").innerHTML = "*";
                document.getElementById("lbtxtF_DBFieldlName").style.color = "#414141";
                return true;
            }
        }
        function CheckBoxSelect(id) {
            if (document.getElementById(id).checked) {
                document.getElementById(id).checked = false;
            }
            else {
                document.getElementById(id).checked = true;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="contentTab">
        <asp:HiddenField ID="txtid" runat="server" Value="" /><asp:HiddenField ID="txtotype" runat="server" Value="add" />
        <asp:HiddenField ID="txtentityid" runat="server" Value="0" />
        <ul class="tab_nav">
            <li class="selected"><a onclick="tabs('#contentTab',0);" href="javascript:;">实体属性信息</a></li>
        </ul>
        <div class="tab_con" style="display: block;">
            <table class="form_table">
                <col width="100px" />
                <col />
                <col width="100px" />
                <col />
                <tbody>
                    <tr>
                        <th>
                            <span style="color: red">数据表名：</span>
                        </th>
                        <td colspan="3">
                            <div style="float: left;">
                                <asp:TextBox ID="txtF_DBTableName" runat="server" ReadOnly Style="background-color: #dcdcdc;"
                                    Width="200px" name="txtF_DBTableName" CssClass="txtInput normal"></asp:TextBox></div>
                            <div style="float: left;">
                                <label id="lbtxtF_DBTableName" for="txtF_DBTableName">
                                </label>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span style="color: red">属性名称：</span>
                        </th>
                        <td>
                            <div style="float: left;">
                                <asp:TextBox ID="txtF_Name" runat="server" Width="100px" CssClass="txtInput normal"></asp:TextBox></div>
                            <div style="float: left;">
                                <label id="lbtxtF_Name" for="txtF_Name">
                                </label>
                            </div>
                        </td>
                        <th>
                            <span style="color: red">字段名称：</span>
                        </th>
                        <td>
                            <div style="float: left; width: 20px;">
                                <input id="txtF_DBFieldlNamePre" runat="server" readonly style="width: 16px; text-align: right;
                                    background-color: #dcdcdc; border-right-width: 0px;" name="txtF_DBFieldlNamePre"
                                    class="txtInput normal" value="F_" /></div>
                            <div style="float: left; width: 80px;">
                                <input id="txtF_DBFieldlName" runat="server" style="width: 80px;" name="txtF_DBFieldlName"
                                    class="txtInput normal" /></div>
                            <div style="float: left;">
                                <label id="lbtxtF_DBFieldlName" for="txtF_DBFieldlName">
                                </label>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span style="color: red">数据类型：</span>
                        </th>
                        <td>
                            <div style="float: left;"><select id="selecttype" class="selectBox" style="width: 100px;" runat="server">
                            </select></div>
                            <div style="float: left;">
                                <label id="lbselecttype" for="selecttype">
                                </label>
                            </div>
                        </td>
                        <th>
                            <span>是否下拉：</span>
                        </th>
                        <td>
                        <div style="float: left; padding-top:2px;">
                        <input id="chkIsList" type="checkbox" runat="server" /><span id="span1" style="padding-left: 2px;
                                cursor: hand;" onclick="CheckBoxSelect('chkIsList');"></span>
                        </div>
                            <div style="float: left;">
                                <asp:TextBox ID="txtF_LookupKey" runat="server" Width="80px" CssClass="txtInput normal"></asp:TextBox></div>
                            <div style="float: left;">
                                <label id="lbtxtF_LookupKey" for="txtF_LookupKey">
                                </label>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span>是否主键：</span>
                        </th>
                        <td>
                            <input id="chkF_IsPKAttribute" type="checkbox" runat="server" /><span id="span2" style="padding-left: 2px;
                                cursor: hand;" onclick="CheckBoxSelect('chkF_IsPKAttribute');">是</span>
                        </td>
                        <th>
                            <span>是否外键：</span>
                        </th>
                        <td>
                            <input id="chkF_IsCustomField" type="checkbox" runat="server" /><span id="span4" style="padding-left: 2px;
                                cursor: hand;" onclick="CheckBoxSelect('chkF_IsCustomField');">是</span>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span>最大长度：</span>
                        </th>
                        <td>
                            <div style="float: left;">
                                <asp:TextBox ID="txtF_MaxLength" runat="server" Width="100px" CssClass="txtInput normal"></asp:TextBox></div>
                            <div style="float: left;">
                                <label id="lbtxtF_MaxLength" for="txtF_MaxLength">
                                </label>
                            </div>
                        </td>
                        <th>
                            <span>默认值：</span>
                        </th>
                        <td>
                            <div style="float: left;">
                                <asp:TextBox ID="txtF_DefaultValue" runat="server" Width="100px" CssClass="txtInput normal"></asp:TextBox></div>
                            <div style="float: left;">
                                <label id="lbtxtF_DefaultValue" for="txtF_DefaultValue">
                                </label>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            <span>是否显示：</span>
                        </th>
                        <td>
                            <input id="chkF_VisibleToPlatform" type="checkbox" runat="server" checked /><span id="span3" style="padding-left: 2px;
                                cursor: hand;" onclick="CheckBoxSelect('chkF_VisibleToPlatform');">是</span>
                        </td>
                        <th>
                            <span>显示排序：</span>
                        </th>
                        <td>
                            <select id="selectF_ColumnNumber" class="selectBox" style="width: 100px;" runat="server">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            备注：
                        </th>
                        <td colspan="3">
                            <asp:TextBox ID="txtF_Remark" runat="server" CssClass="txtInput normal" TextMode="MultiLine"
                                Style="width: 300px; height: 50px;"></asp:TextBox>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="foot_btn_box">
            <asp:Button ID="btnSubmit" runat="server" Text="保&nbsp;&nbsp;存" CssClass="btnSubmit"
                OnClientClick="return validate();" OnClick="btnSubmit_Click" />
        </div>
    </div>
    </form>
</body>
</html>
