<%@ page autoeventwireup="true" debug="true" inherits="_tbl_doExamR_StuMark, App_Web_wjux_2xt" 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>tbl_doExamR_StuMark管理</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:220,
bigframe:true
});
$("#div1").dialog({
autoOpen:false,
modal: true,
width:800,
height:250,
bigframe:true
});
$("#btnAdd").click(function(page){
$("#div_win").dialog({ title: 'tbl_doExamR_StuMark-添加' });
$("#div_win").dialog({ draggable: true,resizable:true });
$("#IsEdit").val("0");
});
$("#btnModify").click(function(page){
$("#div_win").dialog({ title: 'tbl_doExamR_StuMark-修改' });
$("#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="tbl_doExamR_StuMark"></asp:Label>
</div>
<div id="ctl_panel" runat="server" class="panel">
<asp:Button ID="btnAdd" runat="server" class="addnew" OnClick="btnAdd_Click" Text="添加" ToolTip="添加" />
<asp:Button ID="btnModify" runat="server" class="modify" OnClick="btnModify_Click" Text="修改" ToolTip="修改" />
<asp:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="LinkButton6_Click" Text="删除" />
<span id="chkpanel" runat="server">
<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="反　选" />反 选
</span>
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:GridView ID="GridView1"    runat="server" AllowSorting="true" OnSorting="GridView1_Sorting" AutoGenerateColumns="False" CssClass="gv" DataKeyNames="DEM_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="DEM_id" runat="server" Value='<%# Eval("DEM_id") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField SortExpression="DEM_doExam_id"   DataField="DEM_doExam_id" HeaderText="主表ID" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="DEM_Examiee_id"   DataField="DEM_Examiee_id" HeaderText="考试ID" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="DEM_Mark"   DataField="DEM_Mark" HeaderText="成绩" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
</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" />
</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" class="line">
主表ID：
</td>
<td align="left"  class="line" >
<asp:TextBox ID="DEM_doExam_id" runat="server" Width="158"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px">
考试ID：
</td>
<td align="left">
<asp:TextBox ID="DEM_Examiee_id" runat="server" Width="158"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px" class="line">
成绩：
</td>
<td align="left"  class="line" >
<asp:TextBox ID="DEM_Mark" 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>
</body>
</html>
