320 lines
21 KiB
Plaintext
320 lines
21 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="片語管理.aspx.cs" Inherits="Education.Forms.基本資料.片語管理" %>
|
||
|
||
<%@ Register Assembly="WebLib" Namespace="WebLib" TagPrefix="weblib" %>
|
||
<%@ Import Namespace="System.Collections.Generic" %>
|
||
|
||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||
</asp:Content>
|
||
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
|
||
|
||
<asp:ObjectDataSource ID="ds片語Form" runat="server" DataObjectTypeName="Education.片語Item"
|
||
TypeName="Education.DAC_片語" OldValuesParameterFormatString="original_{0}"
|
||
SelectMethod="SelectOne" InsertMethod="InsertOne" UpdateMethod="UpdateOne" DeleteMethod="DeleteOne">
|
||
<SelectParameters>
|
||
<asp:ControlParameter ControlID="gv片語" Name="編號"
|
||
PropertyName="SelectedValue" Type="Int32" />
|
||
</SelectParameters>
|
||
</asp:ObjectDataSource>
|
||
|
||
<asp:ObjectDataSource ID="ds片語Grid" runat="server" DataObjectTypeName="Education.片語Item"
|
||
TypeName="Education.DAC_片語" OldValuesParameterFormatString="original_{0}"
|
||
EnablePaging="true" SelectMethod="SelectPage" SelectCountMethod="SelectCount">
|
||
<SelectParameters>
|
||
<asp:Parameter Name="noInputReturnAll" Type="Boolean" DefaultValue="true" />
|
||
<asp:Parameter Name="orderBy" Type="String" DefaultValue="" />
|
||
<asp:ControlParameter Name="適用欄位" Type="String" ControlID="ddl適用欄位_Search" PropertyName="SelectedValue"></asp:ControlParameter>
|
||
<asp:ControlParameter Name="片語內容" Type="String" ControlID="txt片語內容_Search" PropertyName="Text"></asp:ControlParameter>
|
||
</SelectParameters>
|
||
</asp:ObjectDataSource>
|
||
|
||
<asp:LinkButton ID="tab處理" runat="server" CssClass="tabbuttonselected">片語設定</asp:LinkButton>
|
||
<asp:LinkButton ID="tab查詢" runat="server" CssClass="tabbutton">查詢</asp:LinkButton>
|
||
|
||
<div style="border-top: 1px solid gray;">
|
||
<asp:MultiView ID="MultiView1" runat="server">
|
||
|
||
<asp:View ID="View處理" runat="server">
|
||
|
||
<asp:FormView ID="fv片語" runat="server" EnableModelValidation="True" EnableViewState="False"
|
||
DataKeyNames="編號,DB_APPNO" DataSourceID="ds片語Form">
|
||
<ItemTemplate>
|
||
<div>
|
||
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
|
||
<asp:LinkButton ID="btnUpdate" runat="server" Text="更正" CommandName="Edit" CssClass="button green80" />
|
||
<asp:LinkButton ID="btnDelete" runat="server" Text="刪除" CommandName="Delete" CssClass="button red80" OnClientClick="return confirm("是否確定刪除此筆資料?");" />
|
||
</div>
|
||
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
|
||
<tr>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
</tr>
|
||
<%-- <tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="1">
|
||
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>' CssClass="inputFull"></asp:Label>
|
||
</td>
|
||
</tr>--%>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="7">
|
||
<asp:Label ID="lb適用欄位" runat="server" Text='<%# Bind("適用欄位") %>' CssClass="inputFull"></asp:Label>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="7">
|
||
<asp:Label ID="lb片語內容" runat="server" Text='<%# Bind("片語內容") %>' CssClass="inputFull"></asp:Label>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</ItemTemplate>
|
||
<InsertItemTemplate>
|
||
<div>
|
||
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Insert" CssClass="button blue80" />
|
||
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm("是否確定取消新增?");" />
|
||
</div>
|
||
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
|
||
<tr>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
</tr>
|
||
<%-- <tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="1">
|
||
<asp:Label ID="lb編號" runat="server" Text="(自動編號)" CssClass="inputFull"></asp:Label>
|
||
</td>
|
||
</tr>--%>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="7">
|
||
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
|
||
DataObjectTypeName="WebLib.NameValueItem"
|
||
TypeName="Education.DAC_片語"
|
||
SelectMethod="Options">
|
||
</asp:ObjectDataSource>
|
||
<asp:CheckBoxList ID="cbl適用欄位" runat="server"
|
||
RepeatLayout="Table"
|
||
RepeatDirection="Horizontal"
|
||
CellSpacing="3"
|
||
RepeatColumns="6"
|
||
DataSourceID="ds適用欄位"
|
||
DataTextField="Name" DataValueField="Value">
|
||
</asp:CheckBoxList>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption">
|
||
<span style="color: red;">*</span><asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="7">
|
||
<asp:TextBox ID="txt片語內容" runat="server" Text='<%# Bind("片語內容") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
|
||
<asp:RequiredFieldValidator ID="rfv片語內容" runat="server" ControlToValidate="txt片語內容" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</InsertItemTemplate>
|
||
<EditItemTemplate>
|
||
<div>
|
||
<asp:LinkButton ID="btnSave" runat="server" Text="存檔" CommandName="Update" CssClass="button blue80" />
|
||
<asp:LinkButton ID="btnCancel" runat="server" Text="取消" CommandName="Cancel" CausesValidation="false" CssClass="button red80" OnClientClick="return confirm("是否確定取消更正?");" />
|
||
<asp:HiddenField ID="hfDBAPPNO" runat="server" Value='<%# Bind("DB_APPNO") %>' />
|
||
</div>
|
||
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
|
||
<tr>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
</tr>
|
||
<%-- <tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="1">
|
||
<asp:Label ID="lb編號" runat="server" Text='<%# Bind("編號") %>' CssClass="inputFull"></asp:Label>
|
||
</td>
|
||
</tr>--%>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="7">
|
||
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
|
||
DataObjectTypeName="WebLib.NameValueItem"
|
||
TypeName="Education.DAC_片語"
|
||
SelectMethod="Options">
|
||
</asp:ObjectDataSource>
|
||
<asp:CheckBoxList ID="cbl適用欄位" runat="server"
|
||
RepeatLayout="Table"
|
||
RepeatDirection="Horizontal"
|
||
CellSpacing="3"
|
||
RepeatColumns="6"
|
||
DataSourceID="ds適用欄位"
|
||
DataTextField="Name" DataValueField="Value">
|
||
</asp:CheckBoxList>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption">
|
||
<span style="color: red;">*</span><asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="7">
|
||
<asp:TextBox ID="txt片語內容" runat="server" Text='<%# Bind("片語內容") %>' MaxLength="100" CssClass="inputFull"></asp:TextBox>
|
||
<asp:RequiredFieldValidator ID="rfv片語內容" runat="server" ControlToValidate="txt片語內容" Display="Dynamic" ErrorMessage="請輸入"></asp:RequiredFieldValidator>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</EditItemTemplate>
|
||
<EmptyDataTemplate>
|
||
<div>
|
||
<asp:LinkButton ID="btnInsert" runat="server" Text="新增" CommandName="New" CssClass="button blue80" />
|
||
</div>
|
||
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
|
||
<tr>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
</tr>
|
||
<%-- <tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb編號Label" runat="server" Text="編號"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="1"></td>
|
||
</tr>--%>
|
||
<tr>
|
||
<td class="caption" colspan="1">
|
||
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="7"></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption" colspan="1">
|
||
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
|
||
</td>
|
||
<td class="datadisplay" colspan="7"></td>
|
||
</tr>
|
||
</table>
|
||
</EmptyDataTemplate>
|
||
</asp:FormView>
|
||
|
||
<asp:GridView ID="gv片語" runat="server" DataKeyNames="編號"
|
||
AllowPaging="True" AutoGenerateColumns="False" EnableModelValidation="True"
|
||
EnableViewState="True"
|
||
DataSourceID="ds片語Grid">
|
||
<Columns>
|
||
<%-- <asp:TemplateField HeaderText="編號" SortExpression="編號">
|
||
<EditItemTemplate>
|
||
<asp:Label ID="Label1" runat="server"
|
||
Text='<%# Eval("編號", "{0}") %>'></asp:Label>
|
||
</EditItemTemplate>
|
||
<ItemTemplate>
|
||
<asp:Label ID="Label1" runat="server"
|
||
Text='<%# Bind("編號", "{0}") %>'></asp:Label>
|
||
<asp:LinkButton ID="LinkButton1" runat="server"
|
||
CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
|
||
</ItemTemplate>
|
||
<ItemStyle HorizontalAlign="Center" Width="4em" />
|
||
</asp:TemplateField>--%>
|
||
<asp:TemplateField HeaderText="適用欄位" SortExpression="適用欄位">
|
||
<ItemTemplate>
|
||
<asp:Label ID="Label1" runat="server"
|
||
Text='<%# Bind("適用欄位", "{0}") %>'></asp:Label>
|
||
<asp:LinkButton ID="LinkButton1" runat="server"
|
||
CausesValidation="False" CommandName="Select" Text=""></asp:LinkButton>
|
||
</ItemTemplate>
|
||
<ItemStyle Width="30em" />
|
||
</asp:TemplateField>
|
||
<asp:BoundField DataField="片語內容" HeaderText="片語內容" SortExpression="片語內容">
|
||
<ItemStyle Width="30em" />
|
||
</asp:BoundField>
|
||
</Columns>
|
||
<PagerTemplate>
|
||
<weblib:GridViewPager ID="GridViewPager1" runat="server" />
|
||
</PagerTemplate>
|
||
</asp:GridView>
|
||
</asp:View>
|
||
|
||
<asp:View ID="View查詢" runat="server">
|
||
<div>
|
||
<asp:LinkButton ID="btnSearch" runat="server"
|
||
CssClass="button blue80" Text="查詢"
|
||
OnClick="btnSearch_Click" />
|
||
<asp:LinkButton ID="btnClear" runat="server"
|
||
CssClass="button red80" Text="清除"
|
||
OnClick="btnClear_Click" />
|
||
</div>
|
||
|
||
<table border="0" cellpadding="3" cellspacing="2" style="table-layout: fixed;">
|
||
<tr>
|
||
<td colspan="1" class="widthcontrol" style="width: 90px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 40px;"></td>
|
||
<td colspan="1" class="widthcontrol" style="width: 120px;"></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb適用欄位Label" runat="server" Text="適用欄位"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="3">
|
||
<asp:ObjectDataSource ID="ds適用欄位" runat="server"
|
||
DataObjectTypeName="WebLib.NameValueItem"
|
||
TypeName="Education.DAC_片語"
|
||
SelectMethod="OptionsForSearch">
|
||
</asp:ObjectDataSource>
|
||
|
||
<asp:DropDownList ID="ddl適用欄位_Search" runat="server"
|
||
DataSourceID="ds適用欄位" DataTextField="Name" DataValueField="Value">
|
||
</asp:DropDownList>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="caption">
|
||
<asp:Label ID="lb片語內容Label" runat="server" Text="片語內容"></asp:Label>
|
||
</td>
|
||
<td class="datainput" colspan="3">
|
||
<asp:TextBox ID="txt片語內容_Search" runat="server" Text="" MaxLength="100" CssClass="inputFull"></asp:TextBox>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<asp:Label ID="lbMessage" runat="server"
|
||
CssClass="ErrorMessage"
|
||
EnableViewState="False"></asp:Label>
|
||
|
||
</asp:View>
|
||
|
||
</asp:MultiView>
|
||
</div>
|
||
</asp:Content>
|