231 lines
12 KiB
Plaintext
231 lines
12 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master"
|
|
AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Education.Default" %>
|
|
|
|
<%@ Register Src="~/Forms/Common/起訖日顯示.ascx" TagPrefix="uc1" TagName="起訖日顯示" %>
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
|
<style type="text/css">
|
|
div.default_title {
|
|
margin: 0;
|
|
margin-left: 20px;
|
|
padding: 8px 10px 8px 10px;
|
|
font-size: 12pt;
|
|
font-weight: bold;
|
|
float: left;
|
|
background-color: #B4E0FF;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
div.default_content {
|
|
padding: 10px;
|
|
margin: 10px 20px;
|
|
background-color: #FFFFFF;
|
|
min-height: 100px;
|
|
max-height: 600px;
|
|
overflow-y: auto;
|
|
border: 2px solid #B4E0FF;
|
|
border-radius: 5px;
|
|
}
|
|
</style>
|
|
<script type="text/javascript">
|
|
function ShowHideContent(btn, id)
|
|
{
|
|
var obj = document.getElementById(id);
|
|
if (!obj)
|
|
return;
|
|
if (obj.style["height"] == "")
|
|
{
|
|
btn.innerText = "展開";
|
|
obj.style["height"] = "3em";
|
|
}
|
|
else
|
|
{
|
|
btn.innerText = "收合";
|
|
obj.style["height"] = "";
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
|
|
runat="server">
|
|
<asp:ObjectDataSource ID="ds課程資訊" runat="server" OldValuesParameterFormatString="original_{0}"
|
|
SelectMethod="Select可報名課程" TypeName="Education.DAC_訓練課程企劃" OnObjectCreating="ds課程資訊_ObjectCreating"
|
|
OnSelecting="ds課程資訊_Selecting">
|
|
<SelectParameters>
|
|
<asp:SessionParameter Name="學員編號" SessionField="UserId" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:ObjectDataSource ID="ds課程剪影" runat="server" OldValuesParameterFormatString="original_{0}"
|
|
SelectMethod="Select課程剪影摘要" TypeName="Education.DAC_課程剪影"></asp:ObjectDataSource>
|
|
<asp:ObjectDataSource ID="ds心得" runat="server" OldValuesParameterFormatString="original_{0}"
|
|
SelectMethod="Select上架" TypeName="Education.DAC_心得報告"></asp:ObjectDataSource>
|
|
<div class="content_block">
|
|
<div id="title1" class="default_title">
|
|
課<br />
|
|
程<br />
|
|
資<br />
|
|
訊
|
|
</div>
|
|
<div class="default_content">
|
|
<asp:GridView ID="gv課程資訊" runat="server" AutoGenerateColumns="False" CssClass="fixedwithborder"
|
|
DataKeyNames="編號" DataSourceID="ds課程資訊" EnableModelValidation="True" Width="100%">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="訓練日期" SortExpression="訓練日期">
|
|
<ItemTemplate>
|
|
<uc1:起訖日顯示 runat="server" ID="起訖日顯示" 起日='<%# Eval("訓練日期") %>' 迄日='<%# Eval("訓練日期迄") %>'
|
|
Format="yyyy-MM-dd" />
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="200px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="訓練名稱">
|
|
<ItemTemplate>
|
|
<asp:HyperLink ID="Label21" runat="server" Text='<%# Eval("訓練名稱") %>' NavigateUrl="~/Forms/選課/學員選課.aspx"></asp:HyperLink>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="地點">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label31" runat="server" Text='<%# Get訓練地點(Eval("編號")) %>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="訓練時數" HeaderText="訓練時數" SortExpression="訓練時數">
|
|
<HeaderStyle Width="80px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:BoundField>
|
|
<asp:TemplateField HeaderText="名額" SortExpression="人數">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label51" runat="server" Text='<%# Get剩餘名額(Eval("編號"), Eval("人數")) %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="60px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="開放報名日期" DataFormatString="{0:yyyy-MM-dd}" HeaderText="開放報名日期"
|
|
SortExpression="開放報名日期">
|
|
<HeaderStyle Width="110px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:BoundField>
|
|
</Columns>
|
|
<EmptyDataTemplate>
|
|
目前沒有您可以選課的課程
|
|
</EmptyDataTemplate>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
<div class="content_block">
|
|
<div id="title2" class="default_title">
|
|
課<br />
|
|
程<br />
|
|
回<br />
|
|
饋
|
|
</div>
|
|
<div class="default_content">
|
|
<asp:GridView ID="gv課程回饋" runat="server" AutoGenerateColumns="False" CssClass="fixedwithborder"
|
|
DataSourceID="ds心得" EnableModelValidation="True" Width="100%">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="訓練日期">
|
|
<ItemTemplate>
|
|
<uc1:起訖日顯示 runat="server" ID="起訖日顯示" 起日='<%# Eval("訓練日期") %>' 迄日='<%# Eval("訓練日期迄") %>'
|
|
Format="yyyy-MM-dd" />
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="13em" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="訓練名稱" HeaderText="訓練名稱">
|
|
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="學員姓名" HeaderText="學員心得分享">
|
|
<HeaderStyle Width="6em" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:BoundField>
|
|
<asp:BoundField DataField="討論人數" HeaderText="回覆數">
|
|
<HeaderStyle Width="5em" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:BoundField>
|
|
<asp:TemplateField HeaderText="參與討論">
|
|
<ItemTemplate>
|
|
<asp:LinkButton runat="server" ID="button1" Text="我要回應"
|
|
OnClientClick='<%# GetOpenWindowJS("~/Forms/辦訓狀況/心得報告討論.aspx", "_feedback1", "id", Eval("心得報告編號")) %>'>
|
|
</asp:LinkButton>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="5em" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
<asp:DataList ID="dl課程回饋" runat="server" DataKeyField="心得報告編號"
|
|
DataSourceID="ds心得" OnDataBinding="dl課程回饋_DataBinding"
|
|
OnItemDataBound="dl課程回饋_ItemDataBound" Visible="false">
|
|
<ItemTemplate>
|
|
<div>
|
|
<div style="margin-bottom: 0.5em">
|
|
<div style="float: left">
|
|
<asp:Label ID="學員編號Label" runat="server" Text='<%# Eval("學員姓名") %>' />
|
|
參加「<asp:Label ID="訓練課程企劃編號Label" runat="server" Text='<%# Eval("訓練日期", "{0:yyyy-MM-dd} ") + Eval("訓練名稱", "{0}") %>' />」課程後的心得:
|
|
<asp:LinkButton runat="server" ID="btn展開" Text="展開">
|
|
</asp:LinkButton>
|
|
</div>
|
|
<div style="float: right">
|
|
<asp:Label runat="server" ID="lb討論人數" Text='<%# Eval("討論人數", "{0} 人回覆") %>'></asp:Label>
|
|
<asp:LinkButton runat="server" ID="button1" Text="參與討論"
|
|
OnClientClick='<%# GetOpenWindowJS("~/Forms/辦訓狀況/心得報告討論.aspx", "_feedback1", "id", Eval("心得報告編號")) %>'>
|
|
</asp:LinkButton>
|
|
</div>
|
|
<div style="clear: both;"></div>
|
|
</div>
|
|
<div runat="server" id="div心得" style="clear: both; margin-left: 1em; margin-bottom: 0.5em;
|
|
padding: 0.5em; border: solid 1px green; border-radius: 5px; line-height: 1.5em;
|
|
height: 2.7em; overflow: hidden; background-color: #D8FFD8">
|
|
<asp:Label ID="心得Label" runat="server" Text='<%# Eval("心得", "{0}").Replace("\r\n", "<br>").Replace("\r", "<br>").Replace("\n", "<br>") %>' />
|
|
</div>
|
|
</div>
|
|
</ItemTemplate>
|
|
</asp:DataList>
|
|
</div>
|
|
</div>
|
|
<div class="content_block">
|
|
<div id="title3" class="default_title">
|
|
課<br />
|
|
程<br />
|
|
花<br />
|
|
絮
|
|
</div>
|
|
<div class="default_content">
|
|
<asp:Repeater ID="rp課程剪影" runat="server" DataSourceID="ds課程剪影">
|
|
<ItemTemplate>
|
|
<div style="float: left; margin: 5px; width: 250px; height: 250px; overflow: hidden">
|
|
<div style="clear: both; text-align: center;">
|
|
<asp:Image ID="Image1" runat="server" ImageUrl='<%# String.Format(Education.PublicVariable.課程剪影路徑 + "{0}/T_{1:000000}.jpg", Eval("課程企劃編號"), Eval("照片序號")) %>' />
|
|
</div>
|
|
<div style="clear: both; text-align: center;">
|
|
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%# Eval("訓練日期", "{0:yyyy-MM-dd}") + " " + Eval("訓練名稱","{0}") %>'
|
|
OnClientClick='<%# GetOpenWindowJS("./Forms/辦訓狀況/ClassPicture.aspx", "_classpicture", "id", Eval("課程企劃編號")) %>'></asp:LinkButton>
|
|
</div>
|
|
</div>
|
|
</ItemTemplate>
|
|
</asp:Repeater>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(".content_block").each(function ()
|
|
{
|
|
var totWidth = $(this).innerWidth();
|
|
var titleWidth = $(this).find(".default_title").outerWidth(true);
|
|
$(this).find(".default_content").outerWidth(true, totWidth - titleWidth);
|
|
})
|
|
|
|
$(document).ready(function ()
|
|
{
|
|
$(".default_title").click(function ()
|
|
{
|
|
var h = $(this).parent().find(".default_content").css("max-height");
|
|
if (h == "100px")
|
|
$(this).parent().find(".default_content").css("max-height", "600px");
|
|
else
|
|
$(this).parent().find(".default_content").css("max-height", "100px");
|
|
})
|
|
})
|
|
</script>
|
|
<br />
|
|
</asp:Content>
|