<%@ page autoeventwireup="true" debug="true" inherits="_N25_HuoJiang, App_Web_vezedlxj" language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>获奖管理</title>
<link href="../css/main.css" rel="stylesheet" />
<link href="../css/GridView.css" rel="stylesheet" />
<link href="../css/main.css" rel="stylesheet" type="text/css" />
  <link href="../css/pager.css" rel="stylesheet" type="text/css" />
<script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../jquery-1.5.js" type="text/javascript"></script>
<link href="../window/_css/window.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../window/message/jquery.message.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery/jquery.min.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery.bgiframe.pack.js" type="text/javascript"></script>
<link href="../window/_css/jqueryui/blitzer/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
<link href="../alert/jquery.alert.css" rel="stylesheet" type="text/css" />
<script src="../alert/jquery.easydrag.js" type="text/javascript"></script>
<script src="../alert/jquery.alert.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">   
function   isnum() 
{
if(event.keyCode <48   ||   event.keyCode> 57) 
{
event.keyCode=0;
}
}
$(function(){
$("#div_win").dialog({
autoOpen:false,
modal: false,
width:550,
height:395,
bigframF:true
});
$("#div1").dialog({
autoOpen:false,
modal: true,
width:800,
height:250,
bigframF:true
});
$("#btnAdd").click(function(page){
$("#div_win").dialog({ title: '获奖管理-添加' });
$("#div_win").dialog({ draggable: true,resizable:true });
$("#IsEdit").val("0");
});
$("#btnModify").click(function(page){
$("#div_win").dialog({ title: '获奖管理-修改' });
$("#div_win").dialog({ draggable: true,resizable:true });
});
});
</script>
<script language="JavaScript" type="text/JavaScript">
//-----------------------------------------------------------------------------------
$("#chk_all").click(function() {
$("input[name='chk_list']").attr("checked", $(this).attr("checked"));
});
//全选 
function CheckedAll() {
$(':checkbox').attr('checked', 'checked');
}
//全不选 
function CheckedNo() {
$(':checkbox').attr('checked', '');
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
for(i = 1;i < GridView1.rows.length; i++)
{
GridView1.rows[i].style.backgroundColor='#FFFFFF';
}
}
//反选 
function CheckedRev(objCheckBox, strId) {
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "checkbox") {
var allInput = document.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{}
else
{
allInput[i].checked = !allInput[i].checked;
if   ( allInput[i].checked)
{
GridView1.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView1.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;   
}
}
}
}
}
document.getElementById ("chk_all").checked=false;
}
function ChangeAllCheckStatus(objCheckBox, strId) //全选
{
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "checkbox") {
var allInput = document.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{
GridView1.rows[k].style.backgroundColor='#FFFFFF';
}
else
{
allInput[i].checked = objCheckBox.checked;
if(objCheckBox.checked)
{
GridView1.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView1.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;
}
}
document.getElementById ("cb3").checked=false;
}
}
}
}
//---------------------------------------------------------------------------------------------------- 
var prevselitem=null;
function selectx(row)
{
if(prevselitem!=null)
{
prevselitem.style.backgroundColor='#ffffff';
}
row.style.backgroundColor='PeachPuff';
prevselitem=row;
}

function l_out(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView1_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView1_ctl"+m+"_checkbox1");
}
p.style.background = m % 2 == 1 ? NormalColor : AlterColor; 
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = m % 2 == 1 ? NormalColor : AlterColor; 
}
}
function l_in(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView1_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView1_ctl"+m+"_checkbox1");
}
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = HoverColor; 
}
}
//--------------------------------------------------------------------------------------
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div class="title">
<asp:Label ID="lblList" runat="server" Text="获奖管理"></asp:Label>
</div>





    <asp:Panel ID="serch" runat="server"   >
    <div class="panel">
   部门：<asp:DropDownList ID="DropDownList1"  Width="120px" AutoPostBack="true"  runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional"  ChildrenAsTriggers="false"  RenderMode="Inline"  >
<ContentTemplate >
   获奖教师：<asp:DropDownList ID="DropDownList2"  Width="120px" runat="server">
        </asp:DropDownList>
</ContentTemplate>
<Triggers >
<asp:AsyncPostBackTrigger ControlID ="DropDownList1" />
</Triggers>

    </asp:UpdatePanel>   
   获奖类别：
        <asp:DropDownList ID="leibie"  Width="120px" runat="server">
        </asp:DropDownList>
          获奖级别：
        <asp:DropDownList ID="jibie"  Width="120px" runat="server">
        </asp:DropDownList>
          获奖等级：
        <asp:DropDownList ID="dengji"  Width="120px" runat="server">
        </asp:DropDownList>
   获奖名称：<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
   颁奖单位：<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
   是否审核： <asp:DropDownList ID="check"  Width="120px" runat="server">
               <asp:ListItem Text="请选择..." Value="" />
               <asp:ListItem Text="未审核" Value="0" />
               <asp:ListItem Text="已审核" Value="1" />
        </asp:DropDownList>
   获奖时间：从<asp:TextBox ID="time1"  Width="100px"   CssClass="Wdate" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" onkeypress="event.returnValue=false;"  runat="server"></asp:TextBox>至
    <asp:TextBox ID="time2"   Width="100px" runat="server"    CssClass="Wdate" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" onkeypress="event.returnValue=false;" ></asp:TextBox>

    <asp:Button ID="Button5" CssClass="btn" runat="server" Text="查询" OnClick="Button5_Click" />
   
    
    </div>
    
    
    
    </asp:Panel>
<div id="ctl_panel" runat="server" class="panel">
<asp:Button ID="btnAdd" runat="server" CssClass="addnew" OnClick="btnAdd_Click" Text="添加" ToolTip="添加" />
<asp:Button ID="btnModify" runat="server" CssClass="modify" OnClick="btnModify_Click" Text="修改" ToolTip="修改" />
<asp:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="LinkButton6_Click" Text="删除" />
<asp:Button ID="btn_check" runat="server" CssClass="btn"  Text="审核" OnClick="btn_check_Click" />

<asp:Button ID="Button3" runat="server" CssClass="btn"  Text="取消审核" OnClick="Button3_Click"  />


<asp:Panel ID="chkpanel" runat="server"  style="display:inline">
<input id="chk_all" name="chk_all" onclick="ChangeAllCheckStatus(this,'checkbox1')" type="checkbox" />全选
<input id="cb3" name="btnCheckedRev" onclick="CheckedRev(this,'checkbox1')" type="checkbox" value="反　选" />反 选
</asp:Panel>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1"    runat="server" AllowSorting="true" OnSorting="GridView1_Sorting" AutoGenerateColumns="False" CssClass="gv" DataKeyNames="HJ_id" GridLines="Horizontal" OnRowCommand="GridView1_RowCommand" Width="100%" >
<RowStyle CssClass="gvRow" />
<HeaderStyle CssClass="gvHeader" />
<AlternatingRowStyle CssClass="gvAlternatingRow" />
<Columns>
<asp:TemplateField HeaderText="选">
<HeaderStyle Width="50px"  HorizontalAlign ="Center" />
<ItemStyle Width="50px" HorizontalAlign ="Center"  Wrap="false"  />
<ItemTemplate>
<asp:CheckBox ID="checkbox1" runat="server" />
<asp:HiddenField ID="HJ_id" runat="server" Value='<%# Eval("HJ_id") %>' />
</ItemTemplate>
</asp:TemplateField>

<asp:BoundField SortExpression="ter"   DataField="ter" HeaderText="学期" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>

<asp:BoundField SortExpression="DepName"   DataField="DepName" HeaderText="部门" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="TeaName"   DataField="TeaName" HeaderText="获奖教师" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>

<asp:BoundField SortExpression="LB_Name"   DataField="LB_Name" HeaderText="类别" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="JB_Name"   DataField="JB_Name" HeaderText="级别" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="DJ_Name"   DataField="DJ_Name" HeaderText="等级" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>


<asp:BoundField  SortExpression="HJ_Name"   DataField="HJ_Name" HeaderText="奖项" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField  SortExpression="HJ_from"   DataField="HJ_from" HeaderText="颁奖单位" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>

<asp:BoundField  SortExpression="HJ_Time"       DataFormatString="{0:yyyy-MM-dd }"   HtmlEncode="False" DataField="HJ_Time" HeaderText="获奖时间" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<%--<asp:BoundField  SortExpression="HJ_BK"   DataField="HJ_BK" HeaderText="备注" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>--%>


<asp:TemplateField HeaderText="是否审核">
<ItemTemplate>
    <asp:Label ID="Label1" runat="server" Text='<%# Eval("HJ_Check").ToString()=="0"?"未审核":"已审核" %>'></asp:Label>
</ItemTemplate>

</asp:TemplateField>







</Columns>
</asp:GridView>
<asp:Panel ID="Panel1" runat="server" Visible="false" Width="100%">
<div class="paginator">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<webdiyer:aspnetpager id="PagerButtom" runat="server" alwaysshow="True" bordercolor="Aqua"
cssclass="paginator" custominfoclass="" custominfohtml="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
custominfosectionwidth="" firstpagetext="首页" horizontalalign="Right" lastpagetext="尾页"
layouttype="Table" morebuttonsclass="" nextpagetext="下一页" numericbuttoncount="10"
onpagechanged="Pager_PageChanged" pageindexboxclass="cpb" pagesize="20" prevpagetext="上一页"
showcustominfosection="Right" showpageindexbox="Always">
</webdiyer:aspnetpager>
</td>
</tr>
</table>
</div>
</asp:Panel>
<asp:HiddenField ID="IsEdit" runat="server" />
<asp:HiddenField ID="modify" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnModify" />
<asp:AsyncPostBackTrigger ControlID="btnDelete" />
<asp:AsyncPostBackTrigger ControlID="btn_check" />
<asp:AsyncPostBackTrigger ControlID ="Button3" />
<asp:AsyncPostBackTrigger  ControlID="Button5" />
</Triggers>
</asp:UpdatePanel>
<div id="div_win" style="display: none">
<iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1; width: 100%; height: 100%; top: 0; left: 0;"></iframe>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" class="table" width="100%">
<tr>
<td align="right" style="width: 130px; height:25px" class="line">
部门：
</td>
<td align="left"  class="line" style=" height:25px" >

    <asp:DropDownList ID="HJ_Dep" AutoPostBack="true"  Width="158"  runat="server" OnSelectedIndexChanged="HJ_Dep_SelectedIndexChanged">
    </asp:DropDownList>
</td>
</tr>
<tr>
<td align="right" style="width: 130px; height:25px">
获奖教师：
</td>
<td align="left" style=" height:25px">

    <asp:UpdatePanel ID="UpdatePanel3"    UpdateMode="Conditional" ChildrenAsTriggers="false"    runat="server">
 <ContentTemplate >

  <asp:DropDownList ID="HJ_Teaid"  Width="158" runat="server">
    </asp:DropDownList>
     </ContentTemplate>
     <Triggers >
     <asp:AsyncPostBackTrigger ControlID ="HJ_Dep" />
     </Triggers>
   </asp:UpdatePanel>

</td>
</tr>

<tr>
<td align="right" style="width: 130px; height:25px" class="line">
获奖类别：
</td>
<td align="left"  class="line"  style=" height:25px">


    <asp:DropDownList ID="HJ_Typeid" Width="158px" runat="server">
    </asp:DropDownList>
</td>
</tr>
<tr>
<td align="right" style="width: 130px; height:25px">
获奖级别：
</td>
<td align="left" style=" height:25px">

 <asp:DropDownList ID="HJ_JBid" Width="158px" runat="server">
    </asp:DropDownList>
</td>
</tr>
<tr>
<td align="right" style="width: 130px; height:25px" class="line">
获奖等级：
</td>
<td align="left"  class="line" style=" height:25px" >

 <asp:DropDownList ID="HJ_DJid" Width="158px" runat="server">
    </asp:DropDownList>
</td>
</tr>

<tr>
<td align="right" style="width: 130px; height:25px" class="line">
获奖名称：
</td>
<td align="left"  class="line" style=" height:25px" >
<asp:TextBox ID="HJ_Name" runat="server" Width="250"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px; height:25px">
颁奖单位：
</td>
<td align="left" style=" height:25px">
<asp:TextBox ID="HJ_from" runat="server" Width="250"></asp:TextBox>
</td>
</tr>

<tr>
<td align="right" style="width: 130px; height:25px"  class="line">
获奖时间：
</td>
<td align="left" class="line" style=" height:25px">
<asp:TextBox CssClass="Wdate" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" onkeypress="event.returnValue=false;"    ID="HJ_Time" runat="server" Width="158"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px; height:25px" >
备注：
</td>
<td align="left"   style=" height:25px" >
<asp:TextBox ID="HJ_BK" runat="server"   TextMode="MultiLine"  Rows="5" Width="250"></asp:TextBox>
</td>
</tr>
<%--<tr>
<td align="right" style="width: 130px">
审核：
</td>
<td align="left">
<asp:TextBox ID="HJ_Check" runat="server" Width="158"></asp:TextBox>
</td>
</tr>--%>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="click" />
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<div class="panel" style="padding-left: 130px; width: 74%">
<asp:Button ID="Button1" runat="server" CssClass="input" OnClick="LinkButton1_Click" Text="确 定" />
<asp:Button ID="Button2" runat="server" CssClass="input" OnClick="LinkButton2_Click" Text="取 消" />
</div>
</div>
</form>
<asp:Label ID="lb_pageid" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="recordcount" runat="server" Visible="false"></asp:Label>
<asp:Label ID="page_indexpage" runat="server" Text="1" Visible="false"></asp:Label>
<asp:Label ID="page_count" runat="server" Text="0" Visible="false"></asp:Label>
<asp:Label ID="l2" runat="server"   Text='<%#  N25175_hj_quanxian.outstr.tt.ToString() %>'    ></asp:Label>
</body>
</html>
