<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ModelItems_FillDataS.aspx.cs" Inherits="eFrameWork.Manage.ModelItems_FillDataS" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <title><%=eConfig.manageName() %></title>
        <link href="../Plugins/font-awesome-4.7.0/css/font-awesome.css" rel="stylesheet">  
       <link href="../Plugins/eControls/default/style.css?ver=1.0.4" rel="stylesheet" type="text/css" />   
    <link href="../Plugins/Theme/default/style.css?ver=1.0.4" rel="stylesheet" type="text/css" />   
    <script src="../Scripts/jquery.js"></script>
</head>
<script>
    function autoSelect(obj, code, itemid) {
        var td = obj.parentNode;
        var td2 = $(td).next();


        var sel = td2.find("select");
        if (sel.length == 1) {
            sel = sel[0];
            for (var i = 1; i < sel.options.length; i++) {
                if (code == $(sel.options[i]).attr("code")) {
                    sel.selectedIndex = i;
                    parent.setModelCondition(sel, itemid, 'FillModelItemID');
                    $(obj).hide();
                    return;
                }
            }
        }
    }
</script>
<body>
<div style="margin:10px;">
<asp:Repeater id="Rep" runat="server" >
<headertemplate>
<%#
"<table id=\"eDataTable\" class=\"eDataTable\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"540\">" +
"<thead>" +
"<tr>" +
"<td height=\"25\" width=\"120\">模块</td>"+
"<td width=\"100\">条件名称</td>"+
"<td width=\"160\">字段" +  (eConfig.showHelp() ? "<img src=\"images/help.gif\" align=\"absmiddle\" border=\"0\" onclick=\"showHelp(154);\" title=\"查看帮助\" alt=\"查看帮助\" style=\"cursor:pointer;margin-bottom:4px;\">" : "") + "</td>" +
"<td width=\"280\">回填字段" + (eConfig.showHelp() ? "<img src=\"images/help.gif\" align=\"absmiddle\" border=\"0\" onclick=\"showHelp(155);\" title=\"查看帮助\" alt=\"查看帮助\" style=\"cursor:pointer;margin-bottom:4px;\">" : "") + "</td>" +
"</tr>" +
"</thead>"
%>
</headertemplate>
<itemtemplate>
<%#
"<tr>" +
"<td height=\"26\">" + Eval("ModelName").ToString() + "</td>" +
"<td>" + Eval("MC").ToString() + "</td>" +
//"<td>" + Eval("code").ToString() + " (" + Eval("mc").ToString() + ")</td>" +
"<td>" + Eval("code").ToString() + " (" + Eval("mc").ToString() +  ")<span onclick=\"autoSelect(this,'" + Eval("code").ToString().ToLower() + "','" + Eval("FillModelItemID").ToString() + "');\" title=\"自动处理\" style=\"float:right;cursor:pointer;" + ( Eval("FillModelItemID").ToString().Length > 10 ? "display:none;" : "display:inline-block;") + "border:1px solid #ccc;padding-left:6px;padding-right:6px;\"><i class=\"fa fa-exchange\" aria-hidden=\"true\"></i></span></td>" +
"<td>"
%>
<select onChange="parent.setModelCondition(this,'<%# Eval("ModelConditionID")%>','FillModelItemID');" oldvalue="<%#Eval("FillModelItemID") %>" style="width:270px;">
	<option value="NULL">无</option>
	<asp:Literal id="LitColumns" runat="server" />
</select>
<%#
"</td>" +
"</tr>"
%>
</itemtemplate>
<footertemplate><%#"</table>"%></footertemplate>
</asp:Repeater>
</div>
</body>
</html>