• 大小: 7.85MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-16
  • 语言: 其他
  • 标签: javaweb  

资源简介

学生:注册登录,点卡充值,修改个人信息,作文上传,上传管理,请求老师批改,查询批改内容 教师:登录,批改学生作文,获取点数,修改个人信息 管理员:管理学生,管理教师,管理上传作文,查询管理批改情况,查询老师点数,查询管理学生充值点数。修改登录信息密码

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// 
/// DB 的摘要说明
/// 

public class DB
{
    SqlConnection con = null;
    SqlCommand cmd = new SqlCommand();

    public DB()
    {
        con = new SqlConnection(ConfigurationManager.AppSettings[“SqlConString“]);
    }

    public SqlConnection getCon()
    {
        if (con.State == ConnectionState.Closed)
            con.Open();//打开连接
        return con;
    }

    public void clear()
    {
        if (con.State == ConnectionState.Open)
            con.Close();
    }

    public int sqlDone(string strSql)
    {
        cmd.Connection = getCon();
        cmd.CommandText = strSql;
        int i = cmd.ExecuteNonQuery();
        clear();
        return i;
    }

    public string sqlBack(string strSql)
    {
        cmd.Connection = getCon();
        cmd.CommandText = strSql;
        string result = cmd.ExecuteScalar().ToString();
        clear();
        return result;
    }

    public SqlDataReader getSdr(string strSql)
    {
        cmd.Connection = getCon();
        cmd.CommandText = strSql;
        SqlDataReader sdr = cmd.ExecuteReader();
        //clear();
        return sdr;

    }

    public DataSet getDs(string strSql string tableName)
    {
        SqlDataAdapter sda = new SqlDataAdapter(strSql getCon());
        DataSet ds = new DataSet();
        sda.Fill(ds tableName);
        clear();
        return ds;
    }

    public bool executeTranaction(string[] arrSql)
    {
        bool flag = false;
        con = getCon();
        cmd.Connection = con;
        SqlTransaction myTransaction;
        myTransaction = con.BeginTransaction();
        try
        {
            for (int i = 0; i < arrSql.Length; i++)
            {
                cmd.Transaction = myTransaction;
                cmd.CommandText = arrSql[i];
                cmd.ExecuteNonQuery();
            }
            myTransaction.Commit();
            flag = true;
        }
        catch (Exception e)
        {
            myTransaction.Rollback();
            flag = false;
        }
        finally
        {
            clear();
        }

        return flag;
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    2031616  2016-05-19 21:44  作业批改系统\App_Data\Systembase_Data.MDF

     文件    3211264  2016-05-19 21:44  作业批改系统\App_Data\Systembase_Log.LDF

     文件       2492  2016-05-13 17:01  作业批改系统\Code\App_Code\DB.cs

     文件        739  2016-05-13 09:01  作业批改系统\Code\App_Code\smart.cs

     文件       4266  2016-05-13 09:01  作业批改系统\Code\Edit\Admin_Add.aspx

     文件       1828  2016-05-13 14:01  作业批改系统\Code\Edit\Admin_Add.aspx.cs

     文件       8986  2016-05-13 17:01  作业批改系统\Code\Edit\Admin_Manage.aspx

     文件       3436  2016-05-13 11:01  作业批改系统\Code\Edit\Admin_Manage.aspx.cs

     文件       4048  2016-05-13 17:01  作业批改系统\Code\Edit\Admin_Update.aspx

     文件       2244  2016-05-13 17:01  作业批改系统\Code\Edit\Admin_Update.aspx.cs

     文件        733  2016-05-13 19:01  作业批改系统\Code\Edit\components\dtree\dtree.css

     文件      12377  2016-05-13 17:01  作业批改系统\Code\Edit\components\dtree\dtree.js

     文件        621  2016-05-13 14:01  作业批改系统\Code\Edit\components\dtree\img\base.gif

     文件        239  2016-05-13 11:01  作业批改系统\Code\Edit\components\dtree\img\cd.gif

     文件         62  2016-05-13 18:01  作业批改系统\Code\Edit\components\dtree\img\empty.gif

     文件        372  2016-05-13 09:01  作业批改系统\Code\Edit\components\dtree\img\folder.gif

     文件        376  2016-05-13 14:01  作业批改系统\Code\Edit\components\dtree\img\folderopen.gif

     文件       1095  2016-05-13 17:01  作业批改系统\Code\Edit\components\dtree\img\globe.gif

     文件        622  2016-05-13 12:01  作业批改系统\Code\Edit\components\dtree\img\imgfolder.gif

     文件         69  2016-05-13 11:01  作业批改系统\Code\Edit\components\dtree\img\join.gif

     文件         66  2016-05-13 13:01  作业批改系统\Code\Edit\components\dtree\img\joinbottom.gif

     文件         66  2016-05-13 16:01  作业批改系统\Code\Edit\components\dtree\img\line.gif

     文件         86  2016-05-13 13:01  作业批改系统\Code\Edit\components\dtree\img\minus.gif

     文件         85  2016-05-13 11:01  作业批改系统\Code\Edit\components\dtree\img\minusbottom.gif

     文件        633  2016-05-13 19:01  作业批改系统\Code\Edit\components\dtree\img\musicfolder.gif

     文件        861  2016-05-13 14:01  作业批改系统\Code\Edit\components\dtree\img\nolines_minus.gif

     文件        870  2016-05-13 18:01  作业批改系统\Code\Edit\components\dtree\img\nolines_plus.gif

     文件        582  2016-05-13 19:01  作业批改系统\Code\Edit\components\dtree\img\page.gif

     文件         89  2016-05-13 10:01  作业批改系统\Code\Edit\components\dtree\img\plus.gif

     文件         88  2016-05-13 18:01  作业批改系统\Code\Edit\components\dtree\img\plusbottom.gif

............此处省略969个文件信息

评论

共有 条评论