<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. ACM学习历程—HDU5422 Rikka with Graph(贪心)

    Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he ...

  2. bzoj 3221: Obserbing the tree树上询问 树链剖分+线段树

    题目大意: http://www.lydsy.com/JudgeOnline/problem.php?id=3221 题解 啊呀...这是昨天的考试题啊...直接就粘了.. 与4515: [Sdoi2 ...

  3. Missing key(s) in state_dict: Unexpected key(s) in state_dict

    如果加载的预训练模型之前使用了torch.nn.DataParallel(),而此时的训练并没有使用,则会出现这样的错误.解决方案有两个:1:此时的训练加入torch.nn.DataParallel( ...

  4. 冷备手工完全恢复(recover database,recover tablespace,recover datafile)

    冷备手工完全恢复 1.   手工完全恢复三种级别: recover database: 所有或大部分datafile丢失,一般是在mount状态完成.recover tablespace:    非关 ...

  5. Windows 7下Git SSH 创建Key的步骤

    1.首先你要安装Git工具 下载地址:https://git-scm.com/downloads 2.右键鼠标,选中 “Git Bash here”,当然你也可以在windows的 “开始”---&g ...

  6. openstack常见问题汇总

    汇总下常见的问题以及解释下一些比较容易让人萌的参数配置等等 问题汇总1.使用纯文本模式进行复制粘贴,打死不要用word!!!可以解决绝大多数问题,如果你依然执迷不悟,那么就好自为之吧 2.创建路由器时 ...

  7. ruby on rails 环境搭建步骤

    1.安装ruby ruby的下载页面一个版本有3样要下载的,帮助文件和安装文件.还有一个mingw. 安装时抛出make出错信息就是由于没有安装mingw引起的 到下载页http://rubyforg ...

  8. Linux查看并修改mysql的编码

    系统:阿里云 一.查看mysql字符集 输入:show variables like 'character_set_%'; 二.修改某一个数据库的编码 输入:alter database dbname ...

  9. javascript如何判断手机是什么系统

    做H5页面的时候,经常会用到判断手机是什么系统,根据系统的型号,实现不同的效果,那么如何判断显示页面的手机型号呢? (function(){ var isMobile={ Android:functi ...

  10. ViewPageIndicator--仿网易的使用

    仿微信(网易的界面) 第一步: AndroidManifest.xml 的配置 <?xml version="1.0" encoding="utf-8"? ...