<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_notice.aspx.cs" Inherits="Web.admin.login_notice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>OA标题页</title>
    <link href="../css/admincss/skin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../css/popcalendar.js"></script>
    <style type="text/css">
        .style1
        {
            color: #FF0000;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" >
<div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class ="top_bg_left "></td>
    <td  class ="top_bg_center " >
    <table style ="width :100%; height :31"  border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
      
<!--这里写页标题 -->
        <td style ="height :31px"><div class="titlebt">公告管理</div></td>
        
      </tr>
    </table>
    </td> 
    <td class ="top_bg_right "></td>
  </tr>
  
  <tr>
    <td style ="background :url(../css/admincss/images/mail_leftbg.gif); vertical-align :middle " >&nbsp;</td>
    <td style ="background-color :#F7F8F9; vertical-align :top " >
 
        <asp:Panel ID="Panel3" runat="server">
<!--  一组内容模块开始   --> 
    <table class ="tablezong"  border="0"  cellpadding="0" cellspacing="0" id = "table_viewNotice" runat ="server">
      <tr>
        <td style ="height :40px" >
        <table  class="tablebiaoti" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td><div class ="biaotileft ">  公告列表</div>
            <div class ="biaotiright ">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="tbNum" Display="Dynamic" ErrorMessage="行数不能为空。" 
                                                ValidationGroup="RowNum" ForeColor="Red"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="tbNum" Display="Dynamic" ErrorMessage="请输入大于0的整数。" 
                                                ValidationExpression="^\+?[1-9][0-9]*$" ToolTip="RowNum" 
                                                ValidationGroup="RowNum" ForeColor="Red"></asp:RegularExpressionValidator>
                                            每页显示行数：<asp:TextBox ID="tbNum" runat="server" 
                    Width="44px" MaxLength="4"></asp:TextBox>
                &nbsp;
                <asp:Button ID="btnQuery" runat="server" onclick="btnQuery_Click" Text="确定" ValidationGroup="RowNum" /></div> 
                                        </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td>
        <asp:GridView ID="GridView1" runat="server" onrowediting="GridView1_RowEditing" 
            onrowdatabound="GridView1_RowDataBound" Width="100%" CssClass="gv" 
            cellspacing="1" BorderWidth="1px" AutoGenerateColumns="False" 
                onselectedindexchanging="GridView1_SelectedIndexChanging" 
                onrowcreated="GridView1_RowCreated" >
            <RowStyle  CssClass="gvrow" BorderWidth="1px" />
            <Columns>
                           <asp:TemplateField> 
               <HeaderTemplate>  <asp:CheckBox ID="CheckBox2" Text ="全选" runat="server" AutoPostBack="True" 
                OnCheckedChanged="CheckBox2_CheckedChanged"  />    </HeaderTemplate>        
               <ItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" /></ItemTemplate>               
               </asp:TemplateField>
                <asp:BoundField DataField="id" HeaderText="序号" ReadOnly="True" />
                <asp:TemplateField HeaderText="标题" ShowHeader="False">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Select" Text='<%# bind("noticetitle") %>'></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
       
                <asp:BoundField DataField="department" HeaderText="查阅部门" ReadOnly="True" />
                <asp:BoundField DataField="noticedate" HeaderText="发布时间" ReadOnly="True" />
                <asp:BoundField DataField="noticemanages" HeaderText="发布人" ReadOnly="True" />
                <asp:BoundField DataField="managerid" HeaderText="发布人编号" ReadOnly="True" />
                <asp:BoundField DataField="noviceview" HeaderText="显示" ReadOnly="True" />
                <asp:CommandField EditText="修改" HeaderText="修改" ShowEditButton="True" />

            </Columns>
            <HeaderStyle  CssClass="gvhead"  />
        </asp:GridView>
        </td>
      </tr>
      <tr><td  >
          <table cellpadding="0" cellspacing="0" style ="width :100%">
              <tr>
                  <td style =" padding-left :5px; padding-top :5px; text-align :left  ">
                      <asp:Button ID="btDelAll" runat="server" onclick="btDelAll_Click" 
                              Text="批量删除" Visible="False" />
                          
                  </td>
                  <td  id ="allowpage" runat ="server" style ="text-align :right ;  padding-right  :5px"> &nbsp;</td>
              </tr>
          </table>
          </td></tr>
    </table>
<!-- 一组内容模块结束 -->

    <!--  一组内容模块开始   --> 
    <table class ="tablezong"  border="0"  cellpadding="0" cellspacing="0">
      <tr>
        <td style ="height :40px" >
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td ><div class ="biaotileft ">添加公告</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td style ="text-align :left " >
        <table  style =" width :700px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td style ="width:80px"  class ="tabletd_right ">
                        公告标题</td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="tbNoticetitle" runat="server" MaxLength="25"></asp:TextBox><span  style ="color :Red ">（必填）</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                            ControlToValidate="tbNoticetitle" Display="Dynamic" ErrorMessage="标题不能为空。" 
                            ValidationGroup="AddNotice" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right " >
                        公告内容</td>
                    <td class ="tabletd_left ">
        <asp:TextBox ID="tbNoticecontent" runat="server" Width="500px" Rows="5" TextMode="MultiLine"></asp:TextBox>
                          <span class="style1">（必填）</span><div>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                              ControlToValidate="tbNoticecontent" Display="Dynamic" 
                            ErrorMessage="内容不能为空。" ValidationGroup="AddNotice" ForeColor="Red"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" 
                                ControlToValidate="tbNoticecontent" Display="Dynamic" ErrorMessage="不能超过300个字" 
                                ValidationExpression="^[\S\s]{1,300}$" ValidationGroup="AddNotice" 
                                ForeColor="Red"></asp:RegularExpressionValidator>
                        </div> 
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        添加附件</td>
                    <td class ="tabletd_left ">
                        <asp:FileUpload ID="FileUpload1" runat="server" />
                        <asp:Button ID="btUpload" runat="server" Text="上传" onclick="btUpload_Click" />
                        
                        单个附件不大于4M<div>
                            <asp:Label ID="lbFileNameList" runat="server" Text="已经上传的文件：" Visible="False"></asp:Label>
                            <asp:CheckBoxList ID="cblFileList" runat="server">
                            </asp:CheckBoxList>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        查阅部门<br /> 
                        <asp:CheckBox ID="cbChoose_Department" runat="server" AutoPostBack="True" 
                            oncheckedchanged="cbChoose_Department_CheckedChanged" Text="全选" />
                    </td>
                    <td class="tabletd_left ">
                        <asp:CheckBoxList ID="cblAddDepartment" runat="server" RepeatColumns="6" 
                            RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        前台显示</td>
                    <td class="tabletd_left ">
                        <asp:RadioButtonList ID="rblView" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        &nbsp;</td>
                    <td class="tabletd_left ">
                        <asp:Button ID="btAddNotice" runat="server" onclick="btAddNotice_Click" 
                            Text="添加" ValidationGroup="AddNotice" />
                    </td>
                </tr>
            </table>
        
        
        
            
                    </td>
      </tr>
    </table>
<!-- 一组内容模块结束 -->
        </asp:Panel>   
        
<!--  一组内容模块开始   --> 
            <table border="0"  class ="tablezong"  cellpadding="0" cellspacing="0" id ="table_Edit" runat ="server"  >
      <tr>
        <td style ="height :40px">
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td class ="biaotileft "> 修改公告  </td>       </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td  ><div style ="text-align :left ">
            <table  style =" width :700px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td class="tabletd_right " style="width:80px">
                        公告标题</td>
                    <td class="tabletd_left ">
                        <asp:TextBox ID="tbEditNoticetitle" runat="server" MaxLength="25"></asp:TextBox><span class="style1">（必填）</span>
              
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                            ControlToValidate="tbEditNoticetitle" Display="Dynamic" ErrorMessage="标题不能为空。" 
                            ValidationGroup="EditJilu" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right " >
                        <asp:Label ID="Label3" runat="server" Text="公告内容"></asp:Label>
                    </td>
                    <td class ="tabletd_left ">
                        <asp:TextBox ID="tbEditNeirong" runat="server" Rows="5" TextMode="MultiLine" 
                            Width="500px"></asp:TextBox><span class="style1">（必填）</span><div>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                            ControlToValidate="tbEditNeirong" Display="Dynamic" ErrorMessage="内容不能为空。" 
                            ValidationGroup="EditJilu" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                            ControlToValidate="tbEditNeirong" Display="Dynamic" ErrorMessage="不能超过300个字" 
                            ValidationExpression="^[\S\s]{1,300}$" ValidationGroup="EditJilu" 
                                ForeColor="Red"></asp:RegularExpressionValidator></div> 
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        附件   </td>         <td class="tabletd_left ">
                                                                <asp:FileUpload ID="FileUploadEdit" runat="server" />
                        <asp:Button ID="btUploadEdit" runat="server" Text="上传" onclick="btUploadEdit_Click" />
                                                                单个附件不大于4M<div >
                        <asp:Label ID="lbFileNameListEdit" runat="server" Text="已经上传的文件：" Visible="False"></asp:Label>
                            <asp:CheckBoxList ID="cblFileNameListEdit" runat="server">
                            </asp:CheckBoxList>
                        </div>                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        查阅部门</td>
                    <td class="tabletd_left ">

                        <asp:DropDownList ID="ddlEditDepartment" runat="server"></asp:DropDownList> 

                    </td>
                </tr>
                <tr>
                    <td class ="tabletd_right ">
                        前台显示</td>
                    <td class ="tabletd_left ">
                        <asp:RadioButtonList ID="rblEditView" runat="server" 
                            RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
        <asp:Label ID="lbEditId" runat="server" Visible="False"></asp:Label>
                    </td>
                    <td class="tabletd_left ">
                        <asp:Button ID="btEditNotice" runat="server" onclick="btEditNotice_Click" 
                            Text="提交修改" ValidationGroup="EditJilu" />
                    </td>
                </tr>
            </table>
 </div></td>
      </tr>
    </table>
<!-- 一组内容模块结束 --> 

<!--  一组内容模块开始   --> 
            <table border="0"  class ="tablezong"  cellpadding="0" cellspacing="0" id="table_NoticeView" runat ="server"  visible ="false"  >
      <tr>
        <td style ="height :40px">
        <table class="tablebiaoti"  border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td > <div class ="biaotileft ">公告详情</div> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td  ><div style ="text-align :left ">
            <table  style =" width :700px" border = "1" class ="table " cellpadding ="0" cellspacing ="0">
                <tr>
                    <td style ="width:80px"  class ="tabletd_right ">
                        发 布 人</td>
                    <td class ="tabletd_left ">
        <asp:Label ID="lbNoticemanages" runat="server"></asp:Label>
                        &nbsp;</td>
                    <td style ="width:80px"  class ="tabletd_right ">
                        发布时间</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbNoticedate" runat="server"></asp:Label>
                        &nbsp;</td>
                    <td class="tabletd_right ">
                        查阅部门</td>
                    <td class="tabletd_left ">
                        <asp:Label ID="lbDepartment" runat="server"></asp:Label>
                                            </td>
                </tr>
                <tr>
                    <td class="tabletd_right " style="width:80px">
                        公告标题</td>
                    <td class="tabletd_left " colspan="5">
                        <asp:Label ID="lbNoticetitle" runat="server"></asp:Label>
                        &nbsp;&nbsp;</td>
                </tr>
                <tr>
                    <td class ="tabletd_right " >
                        公告内容</td>
                    <td class ="tabletd_left " colspan="5">
                        <asp:Label ID="lbNoticecontent" runat="server"></asp:Label>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        附件</td>
                    <td class="tabletd_left " colspan="5" >
                        <asp:BulletedList 
                            ID="BulletedList1" runat="server" DisplayMode="LinkButton" 
                            onclick="BulletedList1_Click">

                        </asp:BulletedList>
                    </td>
                </tr>
                <tr>
                    <td class="tabletd_right ">
                        &nbsp;</td>
                    <td class="tabletd_left " colspan="5">
                        <asp:Button ID="btBack" runat="server" onclick="btBack_Click" Text="返回" />
                    </td>
                </tr>
            </table>
 </div></td>
      </tr>
    </table>
<!-- 一组内容模块结束 --> 
   
    </td>
    <td  style =" background-image:url(../css/admincss/images/mail_rightbg.gif )" >
    </td>
  </tr>
  <tr>
    <td  class ="buttom_bg_left "></td>
    <td class ="buttom_bg_center " ></td>
    <td  class ="buttom_bg_right " ></td>
  </tr>
</table>
    </div>
    </form>
</body>
</html>