200 lines
11 KiB
Plaintext
200 lines
11 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true"
|
|
CodeBehind="缺席查詢.aspx.cs" Inherits="Education.Forms.辦訓狀況.缺席查詢" %>
|
|
|
|
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
|
|
<%@ Register Src="../Common/起訖日顯示.ascx" TagName="起訖日顯示" TagPrefix="uc1" %>
|
|
<%@ Register Src="~/Forms/辦訓狀況/UC出席狀況.ascx" TagPrefix="uc1" TagName="UC出席狀況" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
|
<script type="text/javascript">
|
|
function DoSelectAll(checkbox, type)
|
|
{
|
|
var selector = "";
|
|
if (type == 1)
|
|
selector = "input[id^=ctl00_ContentPlaceHolder1_cbl訓練企劃]";
|
|
if (type == 2)
|
|
selector = "input[id^=ctl00_ContentPlaceHolder1_cbl計畫別]";
|
|
|
|
$(selector).each(function ()
|
|
{
|
|
$(this).attr("checked", checkbox.checked);
|
|
});
|
|
}
|
|
</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="dsGrid_ObjectCreating">
|
|
<SelectParameters>
|
|
<asp:ControlParameter ControlID="txt訓練年度_Search"
|
|
Name="訓練年度" PropertyName="Text" Type="Int32" />
|
|
<asp:Parameter Name="顯示編號" Type="String" />
|
|
<asp:SessionParameter Name="公司別" SessionField="CompanyId" Type="String" />
|
|
<asp:ControlParameter ControlID="dd計畫別_Search" Name="計畫別"
|
|
PropertyName="SelectedValue" Type="String" />
|
|
<asp:ControlParameter ControlID="txt訓練名稱_Search"
|
|
Name="訓練名稱" PropertyName="Text" Type="String" />
|
|
<asp:Parameter Name="訓練目標" Type="String" />
|
|
<asp:Parameter Name="教學方法" Type="String" />
|
|
<asp:Parameter Name="承辦" Type="String" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:ObjectDataSource ID="ds計畫別" runat="server"
|
|
OldValuesParameterFormatString="original_{0}" SelectMethod="SelectForDropDown"
|
|
TypeName="Education.DAC_計畫別"></asp:ObjectDataSource>
|
|
<asp:ObjectDataSource ID="ds選課" runat="server" OldValuesParameterFormatString="original_{0}"
|
|
OnObjectCreating="ds選課_ObjectCreating" SelectMethod="Select缺席紀錄"
|
|
TypeName="Education.DAC_課程報名" OnSelecting="ds選課_Selecting">
|
|
<SelectParameters>
|
|
<asp:Parameter Name="訓練企劃編號" />
|
|
<asp:Parameter Name="計畫年度編號" />
|
|
<asp:Parameter Name="公司別" />
|
|
<asp:ControlParameter Name="年度" Type="Int32" ControlID="txt訓練年度_Search" PropertyName="Text" />
|
|
<asp:ControlParameter Name="計畫別" Type="String" ControlID="dd計畫別_Search" PropertyName="SelectedValue" />
|
|
<asp:ControlParameter Name="訓練名稱" Type="String" ControlID="txt訓練名稱_Search" PropertyName="Text" />
|
|
</SelectParameters>
|
|
</asp:ObjectDataSource>
|
|
<table border="0" style="table-layout: fixed;">
|
|
<tr>
|
|
<td colspan="1" class="widthcontrol"
|
|
style="width: 90px;"></td>
|
|
<td colspan="1" class="widthcontrol"
|
|
style="width: 180px;"></td>
|
|
<td class="widthcontrol" style="width: 90px;"></td>
|
|
<td class="widthcontrol"
|
|
style="width: 180px;"> </td>
|
|
<td class="widthcontrol" style="width: 90px;"></td>
|
|
<td class="widthcontrol"
|
|
style="width: 180px;"></td>
|
|
<td class="widthcontrol"
|
|
style="width: 180px;"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="caption">
|
|
<asp:Label ID="Label6" runat="server" Text="訓練年度"></asp:Label>
|
|
</td>
|
|
<td class="datainput" colspan="1">
|
|
<asp:TextBox ID="txt訓練年度_Search" runat="server" Text="" MaxLength="4"
|
|
CssClass="inputFull" ValidationGroup="Search"></asp:TextBox>
|
|
<asp:RangeValidator runat="server" ID="rgv訓練年度_Search" ControlToValidate="txt訓練年度_Search"
|
|
ValidationGroup="Search" Type="Integer" MinimumValue="1000" MaximumValue="2999"
|
|
ErrorMessage="請輸入正確西元年度" CssClass="ErrorMessage" Display="Dynamic"></asp:RangeValidator>
|
|
</td>
|
|
<td class="caption">
|
|
<asp:Label ID="lb專案類型Label" runat="server" Text="職能類型"></asp:Label>
|
|
</td>
|
|
<td class="datainput" colspan="1" rowspan="1" style="vertical-align: top">
|
|
<weblib:WDropDownList ID="dd計畫別_Search" runat="server" CssClass="inputFull"
|
|
DataSourceID="ds計畫別" DataTextField="Name" DataValueField="Value">
|
|
</weblib:WDropDownList>
|
|
</td>
|
|
<td class="caption">
|
|
<asp:Label ID="lb訓練名稱Label" runat="server" Text="訓練名稱"></asp:Label>
|
|
</td>
|
|
<td class="datainput">
|
|
<asp:TextBox ID="txt訓練名稱_Search" runat="server" CssClass="inputFull" MaxLength="50"
|
|
Text=""></asp:TextBox>
|
|
</td>
|
|
<td class="datainput">
|
|
<asp:LinkButton ID="LinkButton1" runat="server" CssClass="button blue120" Style="width: 170px"
|
|
OnClick="LinkButton1_Click">查詢訓練企劃與計畫別</asp:LinkButton>
|
|
</td>
|
|
</tr>
|
|
<asp:Panel runat="server" ID="pnlStep2" Visible="false">
|
|
<tr>
|
|
<td class="caption">
|
|
<asp:Label ID="lb訓練企劃Label" runat="server" Text="訓練企劃"></asp:Label>
|
|
</td>
|
|
<td class="datainput" colspan="6">
|
|
<input type="checkbox" id="cbSelectAll_1" runat="server" enableviewstate="true" onchange="javascript:DoSelectAll(this, 1);" /><label
|
|
for="cbSelectAll_1">全選</label>
|
|
<div style="max-height: 150px; overflow-y: auto; border: 1px solid gray; padding: 3px">
|
|
<asp:CheckBoxList ID="cbl訓練企劃" runat="server" RepeatColumns="1" RepeatLayout="Flow">
|
|
</asp:CheckBoxList>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="caption">
|
|
<asp:Label ID="lb計畫別Label" runat="server" Text="計畫別"></asp:Label>
|
|
</td>
|
|
<td class="datainput" colspan="6">
|
|
<input type="checkbox" id="cbSelectAll_2" runat="server" enableviewstate="true" onchange="javascript:DoSelectAll(this, 2);" /><label
|
|
for="cbSelectAll_2">全選</label>
|
|
<div style="max-height: 150px; overflow-y: auto; border: 1px solid gray; padding: 3px">
|
|
<asp:CheckBoxList ID="cbl計畫別" runat="server" RepeatColumns="1" RepeatLayout="Flow">
|
|
</asp:CheckBoxList>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</asp:Panel>
|
|
</table>
|
|
<div>
|
|
<asp:Label ID="lbMessage" runat="server" Text="" EnableViewState="false" CssClass="ErrorMessage"></asp:Label>
|
|
</div>
|
|
<asp:Panel runat="server" ID="pnlSearch" Visible="false">
|
|
<asp:LinkButton ID="btnSearch" runat="server" CssClass="button blue120"
|
|
OnClick="btnSearch_Click">查詢缺席記錄</asp:LinkButton>
|
|
</asp:Panel>
|
|
<asp:GridView ID="gv上課紀錄" runat="server" AllowPaging="True" EnableViewState="false"
|
|
AutoGenerateColumns="False" DataSourceID="ds選課" EnableModelValidation="True"
|
|
Width="100%" DataKeyNames="訓練課程編號,學員編號" OnDataBound="gv上課紀錄_DataBound" Visible="false">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="訓練日期">
|
|
<ItemTemplate>
|
|
<uc1:起訖日顯示 runat="server" ID="起訖日顯示" 起日='<%# Eval("訓練日期") %>'
|
|
迄日='<%# Eval("訓練日期迄") %>' Format="yyyy-MM-dd" />
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="110px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="職能類型">
|
|
<ItemTemplate>
|
|
<asp:Label runat="server" ID="lb專案類型" Text='<%# Education.DAC_計畫別.Get計畫別名稱(Eval("計畫別")) %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="80px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="訓練名稱">
|
|
<ItemTemplate>
|
|
[<asp:Label ID="Label2" runat="server" Text='<%# Bind("顯示編號") %>'></asp:Label>]
|
|
<asp:Label ID="Label1" runat="server" Text='<%# Bind("訓練名稱") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="員工編號">
|
|
<ItemTemplate>
|
|
<asp:Label runat="server" ID="lb員工編號" Text='<%# Eval("學員編號") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="80px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="員工姓名">
|
|
<ItemTemplate>
|
|
<asp:Label runat="server" ID="lb員工姓名" Text='<%# Eval("學員姓名") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="80px" />
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="計畫別">
|
|
<ItemTemplate>
|
|
<asp:Label runat="server" ID="lb計畫別" Text='<%# Eval("計畫年度名稱") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<ItemStyle HorizontalAlign="Center" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="出席狀況" SortExpression="出席狀況">
|
|
<ItemTemplate>
|
|
<uc1:UC出席狀況 runat="server" ID="UC出席狀況" 學員編號='<%# Eval("學員編號") %>' 訓練課程編號='<%# Eval("訓練課程編號") %>' />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<EmptyDataTemplate>
|
|
<asp:Label ID="Label9" runat="server" CssClass="ErrorMessage" Text="無此員工,或是此員工沒有缺席紀錄"></asp:Label>
|
|
</EmptyDataTemplate>
|
|
<PagerTemplate>
|
|
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
|
|
</PagerTemplate>
|
|
</asp:GridView>
|
|
</asp:Content>
|