169 lines
8.3 KiB
Plaintext
169 lines
8.3 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="fmBPAP.ascx.cs"
|
|
Inherits="forms_basedata_fmBPAP" %>
|
|
<%@ Register Assembly="WNET" Namespace="Wellan.Web.UI" TagPrefix="cc1" %>
|
|
<cc1:WLabel ID="WLabel1" runat="server" CssClass="pageTitle">外部人員帳號設定</cc1:WLabel>
|
|
<asp:CustomValidator ID="cvMessage" runat="server" Display="None"></asp:CustomValidator>
|
|
<asp:ObjectDataSource ID="dsBPAP" runat="server" DeleteMethod="DeleteOne"
|
|
OldValuesParameterFormatString="OLD_{0}" SelectMethod="SelectAll"
|
|
TypeName="BpapDAC" UpdateMethod="UpdateOne" OnObjectCreating="dsBPAP_ObjectCreating">
|
|
<DeleteParameters>
|
|
<asp:Parameter Name="OLD_BPENO" Type="String" />
|
|
</DeleteParameters>
|
|
<UpdateParameters>
|
|
<asp:Parameter Name="OLD_BPENO" Type="String" />
|
|
<asp:Parameter Name="BPENO" Type="String" />
|
|
<asp:Parameter Name="BPNME" Type="String" />
|
|
<asp:Parameter Name="BPEML" Type="String" />
|
|
<asp:Parameter Name="BPZON" Type="String" />
|
|
<asp:Parameter Name="BPBRH" Type="String" />
|
|
<asp:SessionParameter Name="TRUSR" SessionField="W_CUSR" />
|
|
</UpdateParameters>
|
|
</asp:ObjectDataSource>
|
|
<asp:SqlDataSource ID="dsBPZON" runat="server"></asp:SqlDataSource>
|
|
<asp:SqlDataSource ID="dsBPBRH" runat="server"></asp:SqlDataSource>
|
|
<table style="table-layout: fixed;" cellpadding="3" cellspacing="0"
|
|
border="1">
|
|
<tr>
|
|
<th style="width: 120px">
|
|
</th>
|
|
<th style="width: 120px">
|
|
<asp:Label ID="Label2" runat="server" Text="人員編號"></asp:Label>
|
|
</th>
|
|
<th style="width: 120px">
|
|
<asp:Label ID="Label3" runat="server" Text="人員姓名"></asp:Label>
|
|
</th>
|
|
<th style="width: 250px">
|
|
<asp:Label ID="Label4" runat="server" Text="電子郵件"></asp:Label>
|
|
</th>
|
|
<th style="width: 120px">
|
|
<asp:Label ID="Label5" runat="server" Text="所屬區域"></asp:Label>
|
|
</th>
|
|
<th style="width: 120px">
|
|
<asp:Label ID="Label6" runat="server" Text="所屬單位"></asp:Label>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">
|
|
<asp:Button ID="btnInsert" runat="server" Text="新增" OnClick="btnInsert_Click"
|
|
ValidationGroup="insert" />
|
|
</td>
|
|
<td valign="top">
|
|
<asp:Label ID="Label7" runat="server" Text="(自動編號)"></asp:Label>
|
|
</td>
|
|
<td valign="top">
|
|
<asp:TextBox ID="txtBPNME" runat="server" CssClass="textInput"
|
|
MaxLength="20" ValidationGroup="insert"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="rfvBPNME" runat="server" ControlToValidate="txtBPNME"
|
|
Display="Dynamic" ErrorMessage="請輸入" ValidationGroup="insert"></asp:RequiredFieldValidator>
|
|
</td>
|
|
<td valign="top">
|
|
<asp:TextBox ID="txtBPEML" runat="server" CssClass="textInput"
|
|
MaxLength="30" ValidationGroup="insert"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="rfvBPEML" runat="server" ControlToValidate="txtBPEML"
|
|
Display="Dynamic" ErrorMessage="請輸入" ValidationGroup="insert"></asp:RequiredFieldValidator>
|
|
</td>
|
|
<td valign="top">
|
|
<asp:DropDownList ID="ddlBPZON" runat="server" CssClass="textInput"
|
|
DataSourceID="dsBPZON" DataTextField="BSSCR" DataValueField="BSCLS"
|
|
ValidationGroup="insert">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="rfvBPZON" runat="server" ControlToValidate="ddlBPZON"
|
|
Display="Dynamic" ErrorMessage="請選擇" ValidationGroup="insert"></asp:RequiredFieldValidator>
|
|
</td>
|
|
<td valign="top">
|
|
<asp:DropDownList ID="ddlBPBRH" runat="server" CssClass="textInput"
|
|
DataSourceID="dsBPBRH" DataTextField="BSSCR" DataValueField="BSCLS"
|
|
ValidationGroup="insert">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="rfvBPBRH" runat="server" ControlToValidate="ddlBPBRH"
|
|
Display="Dynamic" ErrorMessage="請選擇" ValidationGroup="insert"></asp:RequiredFieldValidator>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
|
|
DataKeyNames="BPENO" DataSourceID="dsBPAP" EnableModelValidation="True"
|
|
CellPadding="3" CssClass="fixtable" ShowHeader="False" OnRowDataBound="GridView1_RowDataBound">
|
|
<Columns>
|
|
<asp:TemplateField ShowHeader="False">
|
|
<ItemTemplate>
|
|
<asp:Button ID="Button1" runat="server" CausesValidation="False"
|
|
CommandName="Edit" Text="更正" />
|
|
<asp:Button ID="Button2" runat="server" CausesValidation="False"
|
|
CommandName="Delete" Text="刪除" OnClientClick="return confirm(msgConfirmDelete);" />
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:Button ID="Button1" runat="server" CausesValidation="True"
|
|
CommandName="Update" Text="存檔" ValidationGroup="update" />
|
|
<asp:Button ID="Button2" runat="server" CausesValidation="False"
|
|
CommandName="Cancel" Text="取消" />
|
|
</EditItemTemplate>
|
|
<HeaderStyle Width="120px" />
|
|
<ItemStyle HorizontalAlign="Left" Width="120px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="人員編號">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label3" runat="server" Text='<%# Bind("BPENO") %>'
|
|
ForeColor="Black"></asp:Label>
|
|
</ItemTemplate>
|
|
<HeaderStyle Width="120px" />
|
|
<ItemStyle HorizontalAlign="Center" Width="120px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="人員姓名">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label4" runat="server" Text='<%# Bind("BPNME") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="TextBox2" runat="server" CssClass="textInput"
|
|
MaxLength="20" Text='<%# Bind("BPNME") %>' ValidationGroup="update"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="rfvBPNME" runat="server" ControlToValidate="TextBox2"
|
|
Display="Dynamic" ErrorMessage="請輸入" ValidationGroup="update"></asp:RequiredFieldValidator>
|
|
</EditItemTemplate>
|
|
<HeaderStyle Width="120px" />
|
|
<ItemStyle HorizontalAlign="Center" Width="120px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="電子郵件">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label5" runat="server" Text='<%# Bind("BPEML") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:TextBox ID="TextBox3" runat="server" CssClass="textInput"
|
|
Text='<%# Bind("BPEML") %>' ValidationGroup="update"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="rfvBPEML" runat="server" ControlToValidate="TextBox3"
|
|
Display="Dynamic" ErrorMessage="請輸入" ValidationGroup="update"></asp:RequiredFieldValidator>
|
|
</EditItemTemplate>
|
|
<HeaderStyle Width="250px" />
|
|
<ItemStyle HorizontalAlign="Center" Width="250px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="所屬區域">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label1" runat="server" Text='<%# GetLookup("BCLS", Eval("BPZON", "{0:c}"), "BSSCR", "BSPAR=`BCUSZON`") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:DropDownList ID="ddlBPZON" runat="server" CssClass="textInput"
|
|
DataSourceID="dsBPZON" DataTextField="BSSCR" DataValueField="BSCLS"
|
|
SelectedValue='<%# Bind("BPZON") %>' ValidationGroup="update">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="rfvBPZON" runat="server" ControlToValidate="ddlBPZON"
|
|
Display="Dynamic" ErrorMessage="請選擇" ValidationGroup="update"></asp:RequiredFieldValidator>
|
|
</EditItemTemplate>
|
|
<HeaderStyle Width="120px" />
|
|
<ItemStyle HorizontalAlign="Center" Width="120px" />
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="所屬單位">
|
|
<ItemTemplate>
|
|
<asp:Label ID="Label2" runat="server" Text='<%# GetLookup("BCLS", Eval("BPBRH", "{0:c}"), "BSSCR", "BSPAR=`BPSNBRH` AND SUBSTRING(BSCLS, LEN(BSCLS) - 1, 2) = `00`") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
<EditItemTemplate>
|
|
<asp:DropDownList ID="ddlBPBRH" runat="server" CssClass="textInput"
|
|
DataSourceID="dsBPBRH" DataTextField="BSSCR" DataValueField="BSCLS"
|
|
SelectedValue='<%# Bind("BPBRH") %>' ValidationGroup="update">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="rfvBPBRH" runat="server" ControlToValidate="ddlBPBRH"
|
|
Display="Dynamic" ErrorMessage="請選擇" ValidationGroup="update"></asp:RequiredFieldValidator>
|
|
</EditItemTemplate>
|
|
<HeaderStyle Width="120px" />
|
|
<ItemStyle HorizontalAlign="Center" Width="120px" />
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|