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

资源简介

试验室预约系统.net 3.0 源码,可以多试验室对多个班级,支持.xls导入导出

资源截图

代码片段和文件信息

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using ArrangingClass.Class;

namespace ArrangingClass
{
    public partial class AdminSetting : System.Web.UI.Page
    {
        Common CC;
        ManageData md;
        protected void Page_Load(object sender EventArgs e)
        {
            CC = new Common();
            md = (ManageData)this.Session[“md“];
            ((Infragistics.WebUI.Misc.WebPanel)Master.FindControl(“WebPanel1“)).Header.Text = “基本信息管理“;

        }

        protected void Button1_Click(object sender EventArgs e)
        {

            CC.ExportExcel(this.md.ExecDT(“select name from LaboratoryTeacher“)DateTime.Now“教师信息“);
            this.Response.Write(“ript>alert(‘导出成功!‘);ript>“); 

        }

        protected void Button2_Click(object sender EventArgs e)
        {
            if (this.FileUpload1.FileName != ““ || this.FileUpload1.PostedFile.ContentType == “application/vnd.ms-excel“)
            {
                this.FileUpload1.SaveAs(Server.MapPath(“Excel/“) + FileUpload1.FileName);
                if (CC.ImportSQLServerFromExcel(@“truncate table LaboratoryTeacher;insert into laboratoryTeacher(name) select name from openrowset(‘MICROSOFT.JET.OLEDB.4.0‘‘Excel 8.0;IMEX=1;HDR=YES;DATAbase=“ + this.Server.MapPath(“Excel/“) + FileUpload1.FileName + “‘[sheet1$])“))
                {
                    this.Response.Write(“ript>alert(‘导入成功!‘);ript>“);
                }
                else
                {
                    this.Response.Write(“ript>alert(‘导入失败!‘);ript>“);
                }
            }
            else
            {
                this.Response.Write(“ript>alert(‘所选择的上传文件不正确!‘);ript>“);

            }
        }

        protected void Button4_Click(object sender EventArgs e)
        {
            if (this.FileUpload2.FileName != ““ || this.FileUpload2.PostedFile.ContentType == “application/vnd.ms-excel“)
            {
                this.FileUpload2.SaveAs(Server.MapPath(“Excel/“) + FileUpload2.FileName);
                if (CC.ImportSQLServerFromExcel(@“truncate table class;insert into class(classnameclassteacherpasswordlogincode) select classnameclassteacherpasswordlogincode from openrowset(‘MICROSOFT.JET.OLEDB.4.0‘‘Excel 8.0;IMEX=1;HDR=YES;DATAbase=“ + this.Server.MapPath(“Excel/“) + FileUpload2.FileName + “‘[sheet1$])“))
                {
                    this.Response.Write(“ript>alert(‘导入成功!‘);ript>“);
                }
                else
                {
                    this.Response.Write(“ript>alert(‘导入失败!‘);ript>“);
                }
            }
            else
            {
                this.Response.Write(“ript>alert(‘所选择的上传文件不正确!‘);

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

    .C.....      2178  2010-09-21 23:39  ArrangingClass\ArrangingClass\AdminSetting.aspx

    .C.....      4797  2010-09-22 23:59  ArrangingClass\ArrangingClass\AdminSetting.aspx.cs

    .C.....      3452  2010-09-21 22:51  ArrangingClass\ArrangingClass\AdminSetting.aspx.designer.cs

    .CA....     19213  2010-10-28 15:24  ArrangingClass\ArrangingClass\AdminSetting2.aspx

    .CA....      3908  2010-10-29 09:10  ArrangingClass\ArrangingClass\AdminSetting2.aspx.cs

    .CA....      6096  2010-10-27 11:17  ArrangingClass\ArrangingClass\AdminSetting2.aspx.designer.cs

    .C.....      6333  2010-09-26 15:01  ArrangingClass\ArrangingClass\AlterCourse.aspx

    .C.....      5938  2010-09-26 14:02  ArrangingClass\ArrangingClass\AlterCourse.aspx.cs

    .C.....      4776  2010-09-25 21:51  ArrangingClass\ArrangingClass\AlterCourse.aspx.designer.cs

    .C.....   1294336  2010-09-15 16:09  ArrangingClass\ArrangingClass\App_Data\ArrangingClass.mdb

    .C.....     34353  2010-09-26 16:18  ArrangingClass\ArrangingClass\Arrang.aspx

    .CA....     22898  2010-10-27 11:59  ArrangingClass\ArrangingClass\Arrang.aspx.cs

    .C.....       824  2010-09-19 15:59  ArrangingClass\ArrangingClass\Arrang.aspx.designer.cs

    .CA....     99339  2010-11-08 16:04  ArrangingClass\ArrangingClass\ArrangingClass.csproj

    .CA....      1299  2010-11-08 16:04  ArrangingClass\ArrangingClass\ArrangingClass.csproj.user

    .CA....    152064  2010-11-08 16:04  ArrangingClass\ArrangingClass\bin\ArrangingClass.dll

    .CA....    310784  2010-11-08 16:04  ArrangingClass\ArrangingClass\bin\ArrangingClass.pdb

    .CA....     90112  2005-12-09 02:30  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.Misc.v5.3.dll

    .CA....     53169  2005-12-09 02:30  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.Misc.v5.3.xml

    .CA....    380928  2005-12-09 02:34  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.Shared.v5.3.dll

    .CA....    617812  2005-12-09 02:34  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.Shared.v5.3.xml

    .CA....   1544192  2005-12-09 02:29  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.UltraWebGrid.v5.3.dll

    .CA....   1137936  2005-12-09 02:29  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.UltraWebGrid.v5.3.xml

    .CA....    233472  2005-12-09 02:31  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.UltraWebListbar.v5.3.dll

    .CA....    125582  2005-12-09 02:31  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.UltraWebListbar.v5.3.xml

    .CA....    180224  2010-09-16 16:41  ArrangingClass\ArrangingClass\bin\Infragistics2.WebUI.WebCombo.v5.3.dll

    .CA....   1100392  2007-04-26 15:30  ArrangingClass\ArrangingClass\bin\Microsoft.Office.Interop.Excel.dll

    .CA....   1309492  2005-04-19 14:48  ArrangingClass\ArrangingClass\bin\Microsoft.Office.Interop.Excel.xml

    .C.....       475  2010-09-14 08:52  ArrangingClass\ArrangingClass\CheckCodeImage.aspx

    .C.....      4133  2010-09-14 08:52  ArrangingClass\ArrangingClass\CheckCodeImage.aspx.cs

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

评论

共有 条评论

相关资源