GradeManag/StatisTest.aspx.cs

(开头部分) 15KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
using System.IO;

namespace EasyExam.GradeManag
{
	/// <summary>
	/// StatisTest 的摘要说明。
	/// </summary>
	public partial class StatisTest : System.Web.UI.Page
	{
		protected int RowNum=0;

		string strSql="";
		string myLoginID="";
		PublicFunction ObjFun=new PublicFunction();
		int intPaperID=0,intCount=0;
		int j=0,intSelA=0,intSelB=0,intSelC=0,intSelD=0,intSelE=0,intSelF=0;
		bool bJoySoftware=false;
	
		#region//*******初始化信息********
		protected void Page_Load(object sender, System.EventArgs e)
		{
			try
			{
				myLoginID=Session["LoginID"].ToString();
			}
			catch
			{
			}
			if (myLoginID=="")
			{
				Response.Redirect("../Login.aspx");
			}
			intPaperID=Convert.ToInt32(Request["PaperID"]);
			intCount=Convert.ToInt32(ObjFun.GetValues("select count(*) as count from UserScore where PaperID="+intPaperID+" and ExamState=1","count"));//答卷记录数
			labPaperName.Text=Convert.ToString(Request["PaperName"]);
			bJoySoftware=ObjFun.JoySoftware();
//			if (bJoySoftware==false)
//			{
//				ObjFun.Alert("对不起,未注册用户不能进行试卷统计!");
//			}
			strSql="select e.PaperTestTypeID,a.RubricID,d.TestTypeName,d.BaseTestType,count(a.RubricID)/"+intCount+" as TestCount,round(sum(a.TestMark)/"+intCount+",1) as TestMark,round(sum(a.UserScore)/"+intCount+",1) as TotalMark,round(round(sum(a.UserScore)/"+intCount+",1)/round(sum(a.TestMark)/"+intCount+",1)*100,1) as Rate from UserAnswer a,RubricInfo b,PaperTest c,TestTypeInfo d,PaperTestType e,UserScore f where a.RubricID=b.RubricID and b.RubricID=c.RubricID and b.TestTypeID=d.TestTypeID and b.TestTypeID=e.TestTypeID and c.PaperID=e.PaperID and f.PaperID=e.PaperID and a.UserScoreID=f.UserScoreID and e.PaperID="+intPaperID+" and f.ExamState=1 group by a.RubricID,d.TestTypeName,d.BaseTestType,e.PaperTestTypeID,c.PaperTestID order by e.PaperTestTypeID,c.PaperTestID asc";
			if (!IsPostBack)
			{	
				if (ObjFun.GetValues("select UserType from UserInfo where LoginID='"+myLoginID+"' and UserType=1 and (RoleMenu=1 or (RoleMenu=2 and Exists(select OptionID from UserPower where UserID=UserInfo.UserID and PowerID=3 and OptionID=6)))","UserType")!="1")
				{
					Response.Write("<script>alert('对不起,您没有此操作权限!')</script>");
					Response.End();
				}
后面还有 328 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。