📄 studentcredit.aspx
字号:
<%@ Page Language="C#" MasterPageFile="~/style/MasterPage.master" AutoEventWireup="true"
EnableViewState="true" CodeFile="StudentCredit.aspx.cs" Inherits="Personal_StudentCredit"
Title="学生成绩管理" %>
<%@ Register TagPrefix="uc1" TagName="ClassCourse" Src="~/uctl/ClassCourse.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="Javascript" type="text/javascript">
var turnon = false;
function turnDatePicker()
{
turnon = !turnon;
if (turnon)
document.getElementById("divDatePicker").style.visibility = "visible";
else
document.getElementById("divDatePicker").style.visibility = "hidden";
return false;
}
function opendialog(i,j,txtDate,ddlType)
{
var d = document.getElementById(txtDate).value;
var t = document.getElementById(ddlType).value;
var urls = "StudentCreditIn.aspx?cr_ID="+i+"&sc_ID="+j+"&d="+d+"&t="+t;
if (typeof(w) == "undefined" || w.closed)
{
w = window.open(urls, "成绩记录明细", "scroll=0,resizable=0,width=380,height=180,z-look=yes");
}
else
{
w.location = urls;
}
}
var typeNameArr = ["平时","期中","期末","结业","补考"];
var ScoreBox= function(cr_ID, sc_ID, cr_Score, cr_Type, rowindex, ddlTypeID)
{
this.score = cr_Score;
this.oldscore = this.score;
this.crID = cr_ID;
this.scID = sc_ID;
this.input = document.getElementById("inputscore"+rowindex);
this.show = document.getElementById("showscore"+rowindex);
this.typecell = document.getElementById("type"+rowindex);
this.Tp = cr_Type;
if (this.Tp == 0) this.Tp = document.getElementById(ddlTypeID).selectedIndex;
this.oldTp = this.Tp;
this.typeclick = function(){
this.Tp++;
if (this.Tp > 4) this.Tp=0;
// this.typecell.className = "att"+this.Tp;
this.typecell.innerHTML = typeNameArr[this.Tp];
this.typecell.className = "att"+this.Tp;
}
this.click = function(){
this.input.value = this.score;
this.show.style.display = "none";
this.input.style.display = "block";
this.typecell.innerHTML = typeNameArr[this.Tp];
this.typecell.className = "att"+this.Tp;
if (this.Tp == 0)
{
// alert('请先在右上方列表中选择测试种类,在左侧单元格单击可更改种类.');
}
this.input.focus();
}
this.blur = function(){
this.score = this.input.value;
this.show.innerHTML = this.score;
this.input.style.display = "none";
this.show.style.display = "block";
// alert(this.show);
}
this.changed = function() { return(this.oldscore != this.score || this.oldTp != this.Tp);}
if(rowindex > scoreArrlength) scoreArrlength = rowindex;
}
var scoreArr = new Array();
var scoreArrlength = 0;
function saveChanged()
{
var t = new Array();
j = 0;
for (i = 0; i <= scoreArrlength; i++)
{
if (scoreArr[i] && scoreArr[i].changed())
{
t[j++] = scoreArr[i].crID + "|"+scoreArr[i].scID+"|"+scoreArr[i].score + "|"+scoreArr[i].Tp;
}
}
if (j > 0)
{
document.getElementById("ChangedInfo").value = t.join(",");
return true;
}
else
{
document.getElementById("ChangedInfo").value = "";
return false;
}
}
</script>
<uc1:ClassCourse ID="ClassCourse" runat="server"></uc1:ClassCourse>
<div style="z-index: 106; left: 206px; width: 77%; position: absolute; top: 1px">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="titlebar">
成绩管理:<asp:Label ID="Path" runat="server"></asp:Label><asp:Label ID="lblCounter" runat="server"></asp:Label></td>
<td style="width: 148px" align="right" class="titlebar">
<asp:Button ID="btnPrevtDay" runat="server" Height="24px" OnClick="btnPrevtDay_Click"
Text="<" Width="20px" /><asp:TextBox ID="txtStartTime" runat="server" Width="84px"></asp:TextBox><asp:Button ID="btnNextDay" runat="server" OnClick="btnNextDay_Click" Text=">" Width="20px" /></td>
<td align="right" class="titlebar" width="140" style="width: 188px">
种类:<asp:DropDownList ID="ddlType" runat="server" DataSourceID="XmlDataSource1" DataTextField="Text"
DataValueField="Value">
</asp:DropDownList>
<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" Width="62px" /></td>
</tr>
</table>
</div>
<div id="divMain">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="cr_ID,sc_ID,cr_Score,cr_Type"
DataSourceID="SqlDataSource3" Width="97%" CssClass="mainView" EmptyDataText="没有发现学生选修这门课."
OnRowDataBound="GridView1_RowDataBound" AllowSorting="True"
PageSize="20">
<Columns>
<asp:BoundField DataField="sc_ID" HeaderText="ID" InsertVisible="False" SortExpression="pe_ID">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle Width="7%" HorizontalAlign="center" />
</asp:BoundField>
<asp:HyperLinkField DataNavigateUrlFields="pe_ID" DataNavigateUrlFormatString="StudentIn.aspx?ID={0}"
DataTextField="pe_Name" HeaderText="姓名" SortExpression="pe_Name">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" Width="10%" />
</asp:HyperLinkField>
<asp:BoundField DataField="部门名称" HeaderText="班级" SortExpression="部门名称">
<HeaderStyle HorizontalAlign="Center" Width="14%" />
</asp:BoundField>
<asp:BoundField DataField="co_Name" HeaderText="课程" SortExpression="co_Name">
<HeaderStyle />
</asp:BoundField>
<asp:TemplateField HeaderText="平时" SortExpression="cr_Type">
<ItemTemplate>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="False" />
<HeaderStyle Wrap="True" />
</asp:TemplateField>
<asp:TemplateField HeaderText="期中" SortExpression="cr_Type">
<ItemTemplate>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="False" />
<HeaderStyle Wrap="True" />
</asp:TemplateField>
<asp:TemplateField HeaderText="期末" SortExpression="cr_Type">
<ItemTemplate>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="False" />
<HeaderStyle Wrap="True" />
</asp:TemplateField>
<asp:TemplateField HeaderText="本次" SortExpression="cr_Type">
<ItemTemplate>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Wrap="False" />
<HeaderStyle Wrap="True" />
</asp:TemplateField>
<asp:BoundField DataField="cr_Score" HeaderText="打分" SortExpression="cr_Score">
<HeaderStyle HorizontalAlign="Center" Width="8%" />
</asp:BoundField>
<asp:HyperLinkField DataNavigateUrlFields="cr_ID,sc_ID" DataNavigateUrlFormatString="~/Personal/StudentScoreIn.aspx?cr_ID={0}&sc_ID={1}"
HeaderText="操作" Text="修改">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" Width="8%" />
</asp:HyperLinkField>
</Columns>
</asp:GridView>
<div id="divDatePicker" style="z-index: 202; left: 49%; visibility: hidden; width: 174px;
position: absolute; top: 2px; height: 156px">
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt"
ForeColor="Black" Height="158px" Width="171px" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="Gray" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</div>
</div>
<!--
<div id="divBottom">
<table style="width: 100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 100px; height: 26px;">
</td>
<td align="right" style="height: 26px">
从<asp:TextBox ID="txtStartDate" runat="server" MaxLength="10" Width="80px" Height="14px"
ToolTip="请输入yyyy-mm-dd格式的起始日期."></asp:TextBox>
~
<asp:TextBox ID="txtEndDate" runat="server" MaxLength="10" Width="80px" Height="14px"
ToolTip="请输入yyyy-mm-dd格式的结束日期."></asp:TextBox>
</td>
<td style="width: 160px; height: 26px;">
<asp:HyperLink ID="hypStat" runat="server" NavigateUrl="#" ToolTip="单击在新窗口统计成绩.">统计成绩</asp:HyperLink>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="#" ToolTip="单击在新窗口统计成绩.">统计毕业生学费</asp:HyperLink></td>
</tr>
</table>
</div>
-->
<script language="javascript" src="../style/common.js" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">
function openStatWindow(classID, txtStartDate, txtEndDate)
{
d1 = document.getElementById(txtStartDate);
d2 = document.getElementById(txtEndDate);
if (!isDate(d1.value))
{
alert("非法的起始日期");
d1.focus();
return false;
}
if (!isDate(d2.value))
{
alert("非法的结束日期");
d2.focus();
return false;
}
w = window.open ("CalcCredit.aspx?de_ID="+classID+"&d1="+d1.value+"&d2="+d2.value);
}
</script>
<div style="z-index: 102; left: 210px; width: 100px; position: absolute; top: 229px;
height: 6px">
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:keke100ConnectionString %>"
SelectCommand="p_CountAllCredit" SelectCommandType="StoredProcedure" OnSelected="SqlDataSource1_Selected">
<SelectParameters>
<asp:Parameter Name="de_ID" Type="Int32" />
<asp:Parameter Name="co_ID" Type="Int32" />
<asp:Parameter Name="ThisDate" Type="DateTime" />
<asp:Parameter Name="EmployeeID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<input type="hidden" id="ChangedInfo" name="ChangedInfo" value="" />
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/CreditType.xml">
</asp:XmlDataSource>
</div>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -