<table class="table table-bordered table-fixed">
<thead>
<tr>
<th width="">
<input type="checkbox" id="chkAll" onclick="selectAll()" /></th>
<th width="" class="text-center"><%=Resources.Asset.DictViewRowIndex%></th>
<th width=""><%=Resources.Asset.UserDepartments%></th>
<th width=""><%=Resources.Asset.AssetCategory%></th>
<th width=""><%=Resources.Asset.AssetSubClass%></th>
<th width=""><%=Resources.Asset.AssetsCompany%></th>
<th width=""><%=Resources.Asset.AssetName%></th>
<th width=""><%=Resources.Asset.AssetsState%></th>
<th width="">数量</th>
<th width="">原值</th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="rptDept" runat="server" OnItemDataBound="rptDept_ItemDataBound">
<ItemTemplate>
<tr>
<td>
<input type="checkbox" class="assetId" id='<%#((iWS.Assets.DB.Asset)Container.DataItem).Id%>' onclick="SelectSingle();" /></td>
<td class="text-center"><%# Container.ItemIndex + + (this.pagerControl.CurrentPageIndex -) * this.pagerControl.PageSize%></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).Owner!=null?((iWS.Assets.DB.Asset)Container.DataItem).Owner.Depts:"" %></td>
<td colspan="" style="padding: 0;">
<table style="border: none; width: 100%;">
<asp:Repeater ID="rptDeptSub" runat="server">
<ItemTemplate>
<tr>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).MainCategory!=null?((iWS.Assets.DB.Asset)Container.DataItem).MainCategory.Name:"" %></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).SubCategory!=null?((iWS.Assets.DB.Asset)Container.DataItem).SubCategory.Name:"" %></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).Company%></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).Name%></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).State!=null?((iWS.Assets.DB.Asset)Container.DataItem).State.Name:"" %></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).Number%></td>
<td><%#((iWS.Assets.DB.Asset)Container.DataItem).Cost%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
  protected void rptDept_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
{
try
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
Repeater rep = e.Item.FindControl("rptCarryoverMsgSub") as Repeater;//找到repeater对象
DataRowView rowv = (DataRowView)e.Item.DataItem;
string fina = rowv["FinacialCode"] + "";//获取关联的流程ID
string proj = rowv["ProjName"] + "";//获取关联的流程ID
string yewu = rowv["YeWuSuo"] + "";//获取关联的流程ID var query = from r in carryoverDt.AsEnumerable()
where r.Field<string>("FinacialCode").Equals(fina) && r.Field<string>("ProjName").Equals(proj) && r.Field<string>("YeWuSuo").Equals(yewu)
select new
{
CarryoverName = r.Field<string>("CarryoverName"),
Account = r.Field<decimal>("Account"),
SubDebt = r.Field<decimal>("SubDebt"),
TotalInCome = r.Field<decimal>("TotalInCome"),
HistoryInCome = r.Field<decimal>("HistoryInCome"),
CurrentInCome = r.Field<decimal>("CurrentInCome"),
LastCarryoverToCurrentInCome = r.Field<decimal>("LastCarryoverToCurrentInCome"),
TotalCarryover = r.Field<decimal>("TotalCarryover"),
HistoryCarryover = r.Field<decimal>("HistoryCarryover"),
CurrentCarryover = r.Field<decimal>("CurrentCarryover"),
CurrentFinalBalance = r.Field<decimal>("CurrentFinalBalance"),
CurrentOutCome = r.Field<decimal>("CurrentOutCome"),
OutComeCanCarryover = r.Field<decimal>("OutComeCanCarryover"),
Progess = r.Field<int>("Progess"),
ProgressCanCarryover = r.Field<decimal>("ProgressCanCarryover"),
ThisCarryover = r.Field<decimal>("ThisCarryover")
};
DataTable dt = DataTableHelper.ToDataTable(query.ToList());
rep.DataSource = dt;
rep.DataBind();
}
}
catch (Exception ex)
{
DiskLog.LogError("ImplementAsyncData-rptAchiveData_ItemDataBound", ex);
}
}

C# Repeater 嵌套的更多相关文章

  1. Repeater 嵌套,子级Repeater获取 父级Repeater 中的值

    第一种方法,子级Repeater中绑定父级的某个字段: <%# DataBinder.Eval((Container.NamingContainer.NamingContainer as Rep ...

  2. Repeater嵌套(灵活的)

    页面代码 <form id="form1" runat="server"> <asp:Repeater ID="rptCategor ...

  3. Repeater嵌套Repeater并取得嵌套Repeater里面的控件

    前台代码:    <asp:Repeater ID="RepeaterScene" runat="server" OnItemDataBound=&quo ...

  4. ASP.NET Repeater嵌套Repeater实现菜单加载

    在KS系统中要实现从数据库中读取界面权限文件实现菜单.界面的动态加载. 效果图: ASP.NET界面代码 <div id="menu-container"> <a ...

  5. 关于Repeater嵌套绑定的问题

    前台代码: <div id="firstpane" class="menu_list">                <asp:Repeat ...

  6. Repeater嵌套绑定Repeater

    前台Html代码 <asp:Repeater runat="server" ID="rpList" OnItemDataBound="rpLis ...

  7. 转:Repeater嵌套绑定Repeater以及内层调用外层数据

    <table border=" style="margin-bottom: 5px" width="100%"> <asp:Repe ...

  8. DataList与Repeater嵌套绑定

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="home.aspx.cs&quo ...

  9. asp.net:repeater嵌套(常用于新闻等在首页归类显示)

    using System;using System.Configuration;using System.Collections.Generic;using System.Linq;using Sys ...

  10. Repeater嵌套gridview

    前台:<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSour ...

随机推荐

  1. google android sdk下载hoosts

    203.208.46.146 www.google.com #这行是为了方便打开Android开发官网 现在好像不VPN也可以打开 74.125.113.121 developer.android.c ...

  2. ACM学习历程—HDU 5012 Dice(ACM西安网赛)(bfs)

    Problem Description There are 2 special dices on the table. On each face of the dice, a distinct num ...

  3. bzoj 3530: [Sdoi2014]数数 数位dp

    题目 我们称一个正整数N是幸运数,当且仅当它的十进制表示中不包含数字串集合S中任意一个元素作为其子串.例如当S=(22,333,0233)时,233是幸运数,2333.20233.3223不是幸运数. ...

  4. 【caffe】卷积层代码解析

    1.Forward_cpu conv_layer.cpp template <typename Dtype> void ConvolutionLayer<Dtype>::For ...

  5. React 版 V2EX 社区( react & react-router & axios & antd ui)

    目录 项目简介 在线演示 截图演示 踩坑 项目简介(1/4) Github: https://github.com/bergwhite/v2ex-react 项目使用React.Reac-router ...

  6. BZOJ1636&&1699:[USACO2007JAN]Balanced Lineup

    浅谈\(RMQ\):https://www.cnblogs.com/AKMer/p/10128219.html 题目传送门:https://lydsy.com/JudgeOnline/problem. ...

  7. AI:AI

    ylbtech-AI:AI 人工智能(Artificial Intelligence),英文缩写为AI.它是研究.开发用于模拟.延伸和扩展人的智能的理论.方法.技术及应用系统的一门新的技术科学. 人工 ...

  8. [MySQL]关于Com_状态

    MySQL 5.5官方文档: http://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html#statvar_Com_xxx C ...

  9. Android M AudioPolicy 分析

    1.AudioPolicyService基础 AudioPolicy在Android系统中主要负责Audio"策略"相关的问题.它和AudioFlinger一起组成了Android ...

  10. Spring 3.x 企业引用开发实战(陈雄华/林开雄)

    目录 ... 第一章:Spring概述 IoC:BeanFactory.Context.El(SpringEL表达式) AOP:允许JVM虚拟机启动时使用代理类在运行时期修改指定类的字节码,改变一个类 ...