announce_mgr_list.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:10k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="announce_mgr_list.aspx.cs" Inherits="web_announcement_announce_mgr_list" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6.     <link href="../../css/style.css" rel="stylesheet" type="text/css" />
  7.     <script type="text/javascript" language="javascript">
  8.         function selectDepartment()
  9.         {
  10.             var url = "../personnel/department/department_select_chk.aspx";
  11.             var features = "width=1030,height=720,top=0,left=0,location=no,toolbar=no,status=no,resizable=yes,scrollbars=yes";
  12.             var selectDepartment = open(url, 'selectDepartment', features);
  13.             selectDepartment.focus();
  14.         }
  15.     </script>
  16. </head>
  17. <body>
  18.     <form id="form1" runat="server">
  19.     <div>
  20.         <center>
  21.             &nbsp;</center>
  22.     <center>
  23.         <asp:Label ID="LblTitle" runat="server" Font-Bold="True" Font-Size="Medium" Style="position: relative"
  24.             Visible="False"></asp:Label>&nbsp;</center>
  25.         <center>
  26.             &nbsp;</center>
  27.         <center>
  28.             <asp:GridView ID="AnnounceList" runat="server" AllowPaging="True" AllowSorting="True"
  29.                 AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
  30.                 BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1" GridLines="Vertical"
  31.                 OnRowDataBound="AnnounceList_RowDataBound" Style="position: relative" Width="600px" OnRowCommand="AnnounceList_RowCommand" OnRowCreated="AnnounceList_RowCreated" OnRowDeleted="AnnounceList_RowDeleted">
  32.                 <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  33.                 <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  34.                 <Columns>
  35.                     <asp:BoundField DataField="subject" HeaderText="主旨" SortExpression="subject" />
  36.                     <asp:BoundField DataField="cre_user" HeaderText="發佈人" SortExpression="cre_user" />
  37.                     <asp:BoundField DataField="cre_date" HeaderText="發佈日期" SortExpression="cre_date" />
  38.                     <asp:TemplateField>
  39.                         <ItemTemplate>
  40.                             <asp:LinkButton ID="LbEdit" CommandName="EditData" runat="server" Style="position: relative">編輯</asp:LinkButton>
  41.                         </ItemTemplate>
  42.                     </asp:TemplateField>
  43.                     <asp:TemplateField Visible="False">
  44.                         <ItemTemplate>
  45.                             <asp:LinkButton ID="LbRestore" runat="server" CommandName="Restore" Style="position: relative">還原</asp:LinkButton>
  46.                         </ItemTemplate>
  47.                     </asp:TemplateField>
  48.                     <asp:CommandField ShowDeleteButton="True" />
  49.                 </Columns>
  50.                 <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  51.                 <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  52.                 <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  53.                 <AlternatingRowStyle BackColor="Gainsboro" />
  54.             </asp:GridView>
  55.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  56.                 DeleteCommand="update OA_ANNOUNCEMENT set is_del='Y' where id=@id" SelectCommand="select id, subject, cre_user, cre_date from OA_ANNOUNCEMENT ">
  57.                 <DeleteParameters>
  58.                     <asp:Parameter Name="id" />
  59.                 </DeleteParameters>
  60.             </asp:SqlDataSource><br />
  61.             <asp:Panel ID="PnlAnnounce" Visible="false" runat="server">
  62.                 <asp:Table ID="TblAnnounce" runat="server" Width="600px">
  63.                     <asp:TableHeaderRow ID="TableHeaderRow1" BackColor="Menu" runat="server">
  64.                         <asp:TableHeaderCell ID="TableHeaderCell1" BackColor='#000099' ForeColor='#ffffff' BorderWidth="1px" HorizontalAlign="Left" ColumnSpan="2" runat="server">
  65.                         編輯公告通知信息
  66.                         </asp:TableHeaderCell>
  67.                     </asp:TableHeaderRow>
  68.                     <asp:TableRow ID="TableRow1" runat="server">
  69.                         <asp:TableCell ID="TableCell1" BorderWidth="1px" runat="server" Width="100px">主旨</asp:TableCell>
  70.                         <asp:TableCell ID="TableCell2" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  71.                             <asp:TextBox ID="TxtSubject" runat="server" Width="480px"></asp:TextBox>
  72.                         </asp:TableCell>
  73.                     </asp:TableRow>
  74.                     <asp:TableRow>
  75.                         <asp:TableCell BorderWidth="1px">類別</asp:TableCell>
  76.                         <asp:TableCell ID="TableCell3" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  77.                             <asp:DropDownList ID="DdlType" runat="server" DataSourceID="SqlDatasource2" DataTextField="name" DataValueField="id">
  78.                             </asp:DropDownList>
  79.                         </asp:TableCell>
  80.                     </asp:TableRow>
  81.                     <asp:TableRow ID="TableRow2" runat="server">
  82.                         <asp:TableCell ID="TableCell4" BorderWidth="1px" runat="server">內容</asp:TableCell>
  83.                         <asp:TableCell ID="TableCell5" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  84.                             <asp:TextBox ID="TxtContent" TextMode="MultiLine" Rows="20" runat="server" Width="480px"></asp:TextBox>
  85.                         </asp:TableCell>
  86.                     </asp:TableRow>
  87.                     <asp:TableRow>
  88.                         <asp:TableCell BorderWidth="1px">有效期</asp:TableCell>
  89.                         <asp:TableCell BorderWidth="1px" HorizontalAlign="Left">
  90.                             <asp:TextBox ID="TxtValidateDate" runat="server" Enabled="false"></asp:TextBox><asp:ImageButton
  91.                                 ID="ImageButton1" runat="server" ImageUrl="~/images/calbtn.gif" OnClick="ImageButton1_Click"
  92.                                 Style="position: relative" /><asp:Calendar ID="Calendar1" runat="server" BackColor="White"
  93.                                     BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana"
  94.                                     Font-Size="8pt" ForeColor="Black" Height="180px" OnSelectionChanged="Calendar1_SelectionChanged"
  95.                                     Style="position: relative" Visible="False" Width="200px">
  96.                                     <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
  97.                                     <SelectorStyle BackColor="#CCCCCC" />
  98.                                     <WeekendDayStyle BackColor="#FFFFCC" />
  99.                                     <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
  100.                                     <OtherMonthDayStyle ForeColor="Gray" />
  101.                                     <NextPrevStyle VerticalAlign="Bottom" />
  102.                                     <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
  103.                                     <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
  104.                                 </asp:Calendar>
  105.                         </asp:TableCell>
  106.                     </asp:TableRow>
  107.                     <asp:TableRow ID="TableRow3" runat="server">
  108.                         <asp:TableCell ID="TableCell6" BorderWidth="1px" runat="server">權限</asp:TableCell>
  109.                         <asp:TableCell ID="TableCell7" BorderWidth="1px" HorizontalAlign="Left" runat="server">
  110.                             <asp:RadioButtonList ID="RbAuthority" runat="server" RepeatDirection="Horizontal" 
  111.                                 AutoPostBack="True" OnSelectedIndexChanged="RbAuthority_Change">
  112.                                 <asp:ListItem Text="所有部門" Value="1" Selected="True"></asp:ListItem>
  113.                                 <asp:ListItem Text="選擇" Value="2"></asp:ListItem>
  114.                             </asp:RadioButtonList>
  115.                             <asp:Button runat="server" ID="BtnSelect" Text="選擇" Visible="false" OnClientClick="selectDepartment()"/>
  116.                             <asp:Label runat="server" ID="LblDepartments" Visible="false"></asp:Label>
  117.                             <asp:HiddenField runat="server" ID="DepartmentIds">
  118.                             </asp:HiddenField>
  119.                         </asp:TableCell>
  120.                     </asp:TableRow>
  121.                     <asp:TableRow ID="TableRow4" runat="server">
  122.                         <asp:TableCell ID="TableCell8" BorderWidth="1px" runat="server">附件</asp:TableCell>
  123.                         <asp:TableCell ID="TableCell9" runat="server" BorderWidth="1px" HorizontalAlign="Left">
  124.                             <asp:LinkButton ID="LbAttachment" runat="server" OnClick="LbAttachment_Click"></asp:LinkButton>
  125.                             <asp:Button ID="BtnDelete" runat="server" Text="刪除" OnClick="BtnDelete_Click" />
  126.                             <asp:FileUpload ID="FileUpload1" runat="server" Width="480px" Visible="false" />
  127.                         </asp:TableCell>
  128.                     </asp:TableRow>
  129.                     <asp:TableRow ID="TableRow5" runat="server">
  130.                         <asp:TableCell ID="TableCell10" BorderWidth="1px" ColumnSpan="2" runat="server">
  131.                             <asp:Button ID="BtnOk" runat="server" Text="儲存" OnClick="BtnOk_Click" /></asp:TableCell>
  132.                     </asp:TableRow>
  133.                 </asp:Table>
  134.                 <asp:HiddenField ID="ContentLength" runat="server" />
  135.                 <asp:HiddenField ID="AttachmentSaveName" runat="server" />
  136.                 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  137.                     SelectCommand="SELECT [id], [name] FROM [OA_ANNOUNCEMENT_TYPE] ORDER BY [sequence]">
  138.                 </asp:SqlDataSource>
  139.             </asp:Panel>
  140.         </center>
  141.     </div>
  142.     </form>
  143. </body>
  144. </html>