Files
sryang 577060bc78 chore: 首次簽入 Thinkyu ASP.NET 專案
- 加入 Visual Studio / ASP.NET .gitignore
- 排除建置輸出、IDE 設定、NuGet packages、大型 MSI 安裝檔
2026-09-10 09:42:37 +08:00

342 lines
19 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="fmCardSearch.ascx.cs"
Inherits="forms_punchcard_fmCardSearch" %>
<%@ Register Assembly="WNET" Namespace="Wellan.Web.UI" TagPrefix="cc1" %>
<cc1:WLabel ID="lbFunctionName" runat="server" CssClass="pageTitle"
Text="打卡查詢/補打卡/誤打卡處理" TextMessageId=""></cc1:WLabel>
<asp:CustomValidator ID="cvMessage" runat="server" Display="None"></asp:CustomValidator>
<asp:MultiView ID="MultiView1" runat="server"
ActiveViewIndex="0">
<asp:View ID="View補打" runat="server">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="right">
<asp:Label ID="Label1" runat="server" Text="年度:"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtYear" runat="server" Columns="4"></asp:TextBox>
</td>
<td>
<asp:Button ID="btnYY" runat="server" CssClass="button" OnClick="btnYY_Click"
Text="確定年度" />
</td>
</tr>
<tr>
<td align="right">
<cc1:WLabel ID="WLabel3" runat="server" TextMessageId="">專案:</cc1:WLabel>
</td>
<td class="dataEditCell">
<cc1:WDropDownList ID="ddlROPYN" runat="server"
CssClass="textInput1" DataTextField="BPPYM"
DataValueField="BPPYN" Width="500px">
</cc1:WDropDownList>
</td>
</tr>
<tr>
<td align="right">
<cc1:WLabel ID="WLabel4" runat="server" TextMessageId="">日期:</cc1:WLabel>
</td>
<td class="dataEditCell">
<cc1:WDateTextBox ID="txtDate" runat="server"
Width="100px" />
</td>
<td class="dataEditCell">
<cc1:WButton ID="btnSearch" runat="server"
CausesValidation="False" CssClass="button"
OnClick="btnSearch_Click" Text="查詢"
UseSubmitBehavior="False" />
</td>
</tr>
<tr>
<td align="right">
<cc1:WLabel ID="WLabel5" runat="server" TextMessageId="">補打時間:</cc1:WLabel>
</td>
<td class="dataEditCell">
<table>
<tr>
<td>
<asp:DropDownList ID="ddlHH" runat="server">
<asp:ListItem Text="00" Value="00" />
<asp:ListItem Text="01" Value="01" />
<asp:ListItem Text="02" Value="02" />
<asp:ListItem Text="03" Value="03" />
<asp:ListItem Text="04" Value="04" />
<asp:ListItem Text="05" Value="05" />
<asp:ListItem Text="06" Value="06" />
<asp:ListItem Text="07" Value="07" />
<asp:ListItem Text="08" Value="08" />
<asp:ListItem Text="09" Value="09" />
<asp:ListItem Text="10" Value="10" />
<asp:ListItem Text="11" Value="11" />
<asp:ListItem Text="12" Value="12" />
<asp:ListItem Text="13" Value="13" />
<asp:ListItem Text="14" Value="14" />
<asp:ListItem Text="15" Value="15" />
<asp:ListItem Text="16" Value="16" />
<asp:ListItem Text="17" Value="17" />
<asp:ListItem Text="18" Value="18" />
<asp:ListItem Text="19" Value="19" />
<asp:ListItem Text="20" Value="20" />
<asp:ListItem Text="21" Value="21" />
<asp:ListItem Text="22" Value="22" />
<asp:ListItem Text="23" Value="23" />
<asp:ListItem Text="24" Value="24" />
<asp:ListItem Text="25" Value="25" />
<asp:ListItem Text="26" Value="26" />
<asp:ListItem Text="27" Value="27" />
<asp:ListItem Text="28" Value="28" />
<asp:ListItem Text="29" Value="29" />
</asp:DropDownList>
</td>
<td>
<cc1:WLabel ID="WLabel6" runat="server" TextMessageId=""></cc1:WLabel>
</td>
<td>
<asp:DropDownList ID="ddlMM" runat="server">
<asp:ListItem Text="00" Value="00" />
<asp:ListItem Text="01" Value="01" />
<asp:ListItem Text="02" Value="02" />
<asp:ListItem Text="03" Value="03" />
<asp:ListItem Text="04" Value="04" />
<asp:ListItem Text="05" Value="05" />
<asp:ListItem Text="06" Value="06" />
<asp:ListItem Text="07" Value="07" />
<asp:ListItem Text="08" Value="08" />
<asp:ListItem Text="09" Value="09" />
<asp:ListItem Text="10" Value="10" />
<asp:ListItem Text="11" Value="11" />
<asp:ListItem Text="12" Value="12" />
<asp:ListItem Text="13" Value="13" />
<asp:ListItem Text="14" Value="14" />
<asp:ListItem Text="15" Value="15" />
<asp:ListItem Text="16" Value="16" />
<asp:ListItem Text="17" Value="17" />
<asp:ListItem Text="18" Value="18" />
<asp:ListItem Text="19" Value="19" />
<asp:ListItem Text="20" Value="20" />
<asp:ListItem Text="21" Value="21" />
<asp:ListItem Text="22" Value="22" />
<asp:ListItem Text="23" Value="23" />
<asp:ListItem Text="24" Value="24" />
<asp:ListItem Text="25" Value="25" />
<asp:ListItem Text="26" Value="26" />
<asp:ListItem Text="27" Value="27" />
<asp:ListItem Text="28" Value="28" />
<asp:ListItem Text="29" Value="29" />
<asp:ListItem Text="30" Value="30" />
<asp:ListItem Text="31" Value="31" />
<asp:ListItem Text="32" Value="32" />
<asp:ListItem Text="33" Value="33" />
<asp:ListItem Text="34" Value="34" />
<asp:ListItem Text="35" Value="35" />
<asp:ListItem Text="36" Value="36" />
<asp:ListItem Text="37" Value="37" />
<asp:ListItem Text="38" Value="38" />
<asp:ListItem Text="39" Value="39" />
<asp:ListItem Text="40" Value="40" />
<asp:ListItem Text="41" Value="41" />
<asp:ListItem Text="42" Value="42" />
<asp:ListItem Text="43" Value="43" />
<asp:ListItem Text="44" Value="44" />
<asp:ListItem Text="45" Value="45" />
<asp:ListItem Text="46" Value="46" />
<asp:ListItem Text="47" Value="47" />
<asp:ListItem Text="48" Value="48" />
<asp:ListItem Text="49" Value="49" />
<asp:ListItem Text="50" Value="50" />
<asp:ListItem Text="51" Value="51" />
<asp:ListItem Text="52" Value="52" />
<asp:ListItem Text="53" Value="53" />
<asp:ListItem Text="54" Value="54" />
<asp:ListItem Text="55" Value="55" />
<asp:ListItem Text="56" Value="56" />
<asp:ListItem Text="57" Value="57" />
<asp:ListItem Text="58" Value="58" />
<asp:ListItem Text="59" Value="59" />
</asp:DropDownList>
</td>
<td> (請輸入「人員工作地」時間)</td>
</tr>
</table>
</td>
<td class="dataEditCell">
</td>
</tr>
</table>
</asp:View>
<asp:View ID="View查詢" runat="server">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="right">
<cc1:WLabel ID="WLabel7" runat="server" TextMessageId="">日期:</cc1:WLabel>
</td>
<td class="dataEditCell">
<table>
<tr>
<td>
<cc1:WDateTextBox ID="txtDate1" runat="server"
Width="100px" />
</td>
<td>&nbsp;&nbsp;
</td>
<td>
<cc1:WDateTextBox ID="txtDate2" runat="server"
Width="100px" />
</td>
</tr>
</table>
</td>
<td class="dataEditCell">
<cc1:WButton ID="btn確定日期" runat="server"
CausesValidation="False" CssClass="button"
OnClick="btn確定日期_Click" Text="確定日期"
UseSubmitBehavior="False" />
</td>
</tr>
<tr>
<td align="right">
<cc1:WLabel ID="WLabel8" runat="server" TextMessageId="">專案:</cc1:WLabel>
</td>
<td class="dataEditCell">
<cc1:WDropDownList ID="ddl專案" runat="server"
CssClass="textInput1" Width="500px">
</cc1:WDropDownList>
</td>
<td class="dataEditCell">
<cc1:WButton ID="btn確定專案" runat="server"
CausesValidation="False" CssClass="button"
OnClick="btn確定專案_Click" Text="確定專案"
UseSubmitBehavior="False" />
</td>
</tr>
<tr>
<td align="right">
<cc1:WLabel ID="WLabel9" runat="server" TextMessageId="">人員:</cc1:WLabel>
</td>
<td class="dataEditCell">
<cc1:WDropDownList ID="ddl人員" runat="server"
CssClass="textInput1" Width="500px">
</cc1:WDropDownList>
<br />(查詢時不選擇人員,會讓查詢速度緩慢,請斟酌使用)
</td>
<td class="dataEditCell">
<cc1:WButton ID="btn查詢" runat="server"
CausesValidation="False" CssClass="button"
OnClick="btn查詢_Click" Text="查詢" UseSubmitBehavior="False" />
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
<asp:ObjectDataSource ID="dsCard" runat="server"
OldValuesParameterFormatString="original_{0}"
OnSelecting="dsCard_Selecting" SelectMethod="Select出勤資料"
TypeName="RparDAC">
<SelectParameters>
<asp:Parameter Name="起日" Type="DateTime" />
<asp:Parameter Name="迄日" Type="DateTime" />
<asp:Parameter Name="年度專案" Type="String" />
<asp:Parameter Name="人員編號" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="人員編號" DataSourceID="dsCard" EnableModelValidation="True"
OnRowCommand="GridView1_RowCommand" AllowPaging="True"
PageSize="15" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:BoundField DataField="日期" HeaderText="日期" ReadOnly="True" DataFormatString="{0:yyyyMMdd (ddd)}" />
<asp:BoundField DataField="人員編號" HeaderText="人員編號" ReadOnly="True" />
<asp:BoundField DataField="人員姓名" HeaderText="人員姓名" />
<asp:BoundField DataField="上班時間" HeaderText="上班" />
<asp:BoundField DataField="上班IP" HeaderText="上班IP" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="PUNCH1" Text="補打"
Enabled='<%# Eval("上班時間", "{0:c}").Trim().Length == 0 %>' />
<asp:Button ID="Button2" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="CLEAR1" Text="清除" OnClientClick="return confirm('是否確定清除此人員上班打卡?');"
Enabled='<%# Eval("上班時間", "{0:c}").Trim().Length > 0 %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="出差外出時間" HeaderText="出差外出" />
<asp:BoundField DataField="出差外出IP" HeaderText="出差外出IP" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button5" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="PUNCH7" Text="補打"
Enabled='<%# Eval("出差外出時間", "{0:c}").Trim().Length == 0 %>' />
<asp:Button ID="Button6" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="CLEAR7" Text="清除" OnClientClick="return confirm('是否確定清除此人員出差外出打卡?');"
Enabled='<%# Eval("出差外出時間", "{0:c}").Trim().Length > 0 %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="出差返回時間" HeaderText="出差返回" />
<asp:BoundField DataField="出差返回IP" HeaderText="出差返回IP" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button7" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="PUNCH8" Text="補打"
Enabled='<%# Eval("出差返回時間", "{0:c}").Trim().Length == 0 %>' />
<asp:Button ID="Button8" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="CLEAR8" Text="清除" OnClientClick="return confirm('是否確定清除此人員出差返回打卡?');"
Enabled='<%# Eval("出差返回時間", "{0:c}").Trim().Length > 0 %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="下班時間" HeaderText="下班" />
<asp:BoundField DataField="下班IP" HeaderText="下班IP" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button3" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="PUNCH2" Text="補打"
Enabled='<%# Eval("下班時間", "{0:c}").Trim().Length == 0 %>' />
<asp:Button ID="Button4" runat="server" CommandArgument='<%# Eval("人員編號") %>'
CommandName="CLEAR2" Text="清除" OnClientClick="return confirm('是否確定清除此人員下班打卡?');"
Enabled='<%# Eval("下班時間", "{0:c}").Trim().Length > 0 %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="請假時數" SortExpression="請假時數">
<ItemTemplate>
<asp:Label ID="lb請假時數" runat="server"
Text='<%# String.Format("{0:##0}:{1:00}", Eval("請假時數"), Eval("請假分數")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="出差時數" SortExpression="出差時數">
<ItemTemplate>
<asp:Label ID="lb出差時數" runat="server"
Text='<%# String.Format("{0:##0}:{1:00}", Eval("出差時數"), Eval("出差分數")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="加班時數" SortExpression="加班時數">
<ItemTemplate>
<asp:Label ID="lb加班時數" runat="server"
Text='<%# String.Format("{0:##0}:{1:00}", Eval("加班時數"), Eval("加班分數")) %>'></asp:Label>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:TemplateField HeaderText="備註">
<ItemTemplate>
<asp:Label ID="lb備註" runat="server"
Text='<%# Eval("備註") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerTemplate>
<cc1:WGridViewPager ID="WGridViewPager1" runat="server" />
</PagerTemplate>
</asp:GridView>