<%@ Page Language="C#" MasterPageFile="Main.Master" AutoEventWireup="true" CodeFile="Records.aspx.cs" Inherits="eFrameWork.Manage.Records" %>
<%@ Register Src="GroupMenu.ascx" TagPrefix="uc1" TagName="GroupMenu" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script>
var act = "<%=act%>";
window.onload=function()
{


};
function recordView(RecordID) {
    var url = "recordView.aspx?RecordID=" + RecordID;
    layer.open({
        anim: 4,//设置出现的动画效果 4 1 2 0
        type: 2,
        skin: 'layui-layer-rim', //加上边框
        title: "查看记录集",
        maxmin: false,
        shadeClose: true, //点击遮罩关闭层
        area: ['75%', '80%'],
        content: url,
        success: function (layero, index) { },
        cancel: function (index, layero) { },
        end: function (index) { }
    });
};
</script>
<uc1:GroupMenu runat="server" ID="GroupMenu" />

<div class="nav">您当前位置：<a href="Default.aspx">首页</a> -> 数据集管理

<%if(act==""){%>

<a id="btn_add" class="button" href="<%=edt.getAddURL()%>"><span><i class="add">添加</i></span></a>



<%}%>
</div>

<%if (eRegisterInfo.Base == 0 && eRegisterInfo.Loaded)
  { %>
    <div style="margin:6px;line-height:25px;font-size:13px;">
<div class="tips" style="margin-bottom:6px;"><b>未授权提示</b><br><a href="http://frame.eketeam.com/getSerialNumber.html" style="color:#ff0000;" target="_blank">申请临时授权</a>,享更多功能。</div>
   </div>
 <%} %>

<%
    if (act == "edit" || act == "add")
{
%>
<div style="margin:10px;">
	<form name="frmaddoredit" id="frmaddoredit" method="post" action="<%=edt.getSaveURL()%>">
	<input name="id" type="hidden" id="id" value="<%=edt.ID%>">
    <input name="act" type="hidden" id="act" value="save">
	<input type="hidden" id="fromurl" name="fromurl" value="<%=edt.FromURL%>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="eDataView">
<colgroup>
<col width="126" />
<col />
</colgroup>
      <tr>
        <td class="title"><ins>*</ins>数据集名称：</td>
        <td class="content"><span class="eform"><ev:eFormControl ID="f1" FieldName="数据集名称" field="Name" notnull="true" Attributes="class=&quot;text&quot; style=&quot;width:180px;&quot;" runat="server" /></span></td>
      </tr>

         <tr>
          <td class="title">数据源：</td>
          <td class="content"><span class="eform">
		  <ev:eFormControl ID="f2" FieldName="数据源" ControlType="select" Field="DataSourceID" FieldType="uniqueidentifier" BindObject="a_eke_sysDataSources" BindValue="DataSourceID" BindText="MC" BindCondition="delTag=0" Attributes="onchange=&quot;getTables();&quot;" Options="[{text:主库,value:NULL}]" DefaultValue="NULL" BindOrderBy="addTime desc" runat="server" />
		   </span></td>
        </tr>

     <tr>
          <td class="title">输出类型：</td>
          <td class="content"><span class="eform">
		  <ev:eFormControl ID="f4" FieldName="输出类型" ControlType="select" Field="outType" FieldType="int"  Options="[{text:无,value:0},{text:对象,value:1},{text:数组,value:2}]" DefaultValue="0" runat="server" />
		   </span></td>
        </tr>
     
	   <tr>
	     <td class="title">说明：</td>
	     <td class="content"><span class="eform"><ev:eFormControl ID="f3" controltype="textarea" FieldName="说明" field="remark" notnull="false" htmlTag="true" runat="server" /></span></td>
	     </tr>
 		<tr>		
		<td colspan="2" class="title"  style="text-align:left;padding-left:100px;padding-top:10px;padding-bottom:10px;">		
		<a class="button" href="javascript:;" onclick="if(frmaddoredit.onsubmit()!=false){frmaddoredit.submit();}"><span><i class="save">保存</i></span></a>
		<a class="button" href="javascript:;" style="margin-left:30px;" onclick="history.back();"><span><i class="back">返回</i></span></a>
		</td>
	   </tr>	 
    </table>
    </form>
</div>
<%}else{%>

<div style="margin:6px;">
<dl id="eSearchBox" class="ePanel">
<dt><h1 onclick="showPanel(this);" class="search"><a href="javascript:;" class="cur" onfocus="this.blur();"></a>搜索</h1></dt>
<dd style="display:none;">
<asp:PlaceHolder ID="eSearchControlGroup" runat="server">
<form id="frmsearch" name="frmsearch" method="post" onsubmit="return goSearch(this);" action="<%=elist.getSearchURL()%>">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="eDataView">
<colgroup>
<col width="120" />
<col />
</colgroup>
<tr>
<td class="title">数据集名称：</td>
<td class="content"><span class="eform"><ev:eSearchControl ID="s1" Name="s1" ControlType="text" Field="Name" Operator="like" FieldName="数据集名称" DataType="string" Width="300px" runat="server" /></span></td>
</tr>
<tr>
<td colspan="2" class="title" style="text-align:left;padding-left:125px;"><a class="button" href="javascript:;" onclick="if(frmsearch.onsubmit()!=false){frmsearch.submit();}"><span><i class="search">搜索</i></span></a></td>
</tr>
</table>
</form>
</asp:PlaceHolder>
</dd>
</dl>
<%}%>


<asp:Repeater id="Rep" runat="server">
<headertemplate>
<%#
"<table id=\"eDataTable\" class=\"eDataTable\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"100%\" style=\"min-width:1400px;\">\r\n"+
"<thead>\r\n"+
  "<tr bgcolor=\"#f2f2f2\">\r\n"+
  "<td width=\"35\"><input type=\"checkbox\" name=\"selallitem\" value=\"0\" onclick=\"selectAllItems(this);\"></td>\r\n"+
  	"<td width=\"260\">编号</td>\r\n"+
	"<td>数据集名称</td>\r\n"+
    "<td>输出类型</td>\r\n"+
    "<td>查看</td>\r\n"+
	"<td>说明</td>\r\n"+
	"<td width=\"100\">添加时间</td>\r\n"+
	"<td width=\"150\">操作</td>\r\n"+
  "</tr>\r\n"+
"</thead>\r\n" %></headertemplate><itemtemplate><%# "<tr erowid=\"" + Eval("RecordID").ToString() + "\" " + ((Container.ItemIndex+1) % 2 == 0 ? " class=\"alternating\" eclass=\"alternating\"" : " eclass=\"\"") + ">\r\n"+
    "<td height=\"32\"><input type=\"checkbox\" name=\"selitem\" value=\"" + Eval("RecordID").ToString() + "\"></td>\r\n"+
    "<td><a class=\"copy\" href=\"javascript:;\" data-clipboard-action=\"copy\" data-clipboard-text=\"" + Eval("RecordID") + "\"></a>"+ Eval("RecordID") + "</td>\r\n"+
	"<td><a href=\"recordDesign.aspx?RecordID=" + Eval("RecordID") + "\">"+ Eval("Name") + "</a></td>\r\n"+
    "<td>"+ Eval("outType").ToString().Replace("0","无").Replace("1","对象").Replace("2","数组") + "</td>\r\n"+
    "<td><a href=\"javascript:;\" onclick=\"recordView('"+ Eval("RecordID")+"');\">查看</a></td>\r\n"+
    "<td>"+ Eval("remark") + "</td>\r\n"+
	"<td>"+ Eval("addTime","{0:yyyy-MM-dd}") + "</td>\r\n"+
	"<td>"+
	"<a href=\"" + edt.getActionURL("edit",Eval("RecordID").ToString())  + "\">修改</a>"+
     "<a href=\"" + edt.getActionURL("copy",Eval("RecordID").ToString())  + "\" onclick=\"javascript:return confirm('确认要复制吗？');\">复制</a>"+
	"<a href=\""+ edt.getActionURL("del",Eval("RecordID").ToString()) +"\" onclick=\"javascript:return confirm('确认要删除吗？');\">删除</a>"+
	"</td>\r\n"+
"</tr>\r\n"%></itemtemplate>
<footertemplate><%#"</table>\r\n"%></footertemplate>
</asp:Repeater>
</div>
<div style="margin:6px;"><ev:ePageControl ID="ePageControl1" PageSize="20" PageNum="9" runat="server" /></div>

</asp:Content>