• 大小: 21.71MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-17
  • 语言: C#
  • 标签:

资源简介

C#教务系统namespace xitong { public class DataAccess { public String connstr; //连接字符串 SqlConnection conn; // 连接对象 SqlCommand cmd; //命名对象 SqlDataAdapter da;//数据适配器 public String getconn() //定义一个连接字符串的方法 { connstr = @"data source=.\SQLEXPRESS;initial catalog=sscggl;integrated security=true;"; return connstr; } public bool excutesql(string sql) //返回影响的行数 { try { conn = new SqlConnection(getconn()); conn.Open(); } catch { MessageBox.Show("数据连接失败", "温馨提示"); } try { cmd = new SqlCommand(sql, conn); cmd.ExecuteNonQuery(); // conn.Close(); return true; } catch (Exception ex) { MessageBox.Show(ex.Message, "操作失败"); return false; } finally { conn.Close(); } } public DataSet getdataset(string sql, string tablename) //返回数据集 { DataSet ds = new DataSet(); //定义一个数据集 conn = new SqlConnection(getconn()); //连接对象 conn.Open(); //打开连接 try { da = new SqlDataAdapter(sql, conn); da.Fill(ds, tablename); //conn.Close(); return ds; } catch (Exception ex) { throw new Exception(ex.ToString()); } finally { conn.Close();

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace xitong
{
    public partial class Bangzhu : Form
    {
        public Bangzhu()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            this.Close();
        }

      
    }
}

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

     文件    1048576  2013-12-19 01:43  C#\sscggl.Ldf

     文件    3145728  2013-12-19 01:43  C#\sscggl.Mdf

     文件     460800  2014-12-15 10:32  C#\xitong1\Setup1\Debug\setup.exe

     文件    6282240  2014-12-15 10:32  C#\xitong1\Setup1\Debug\Setup1.msi

     文件      46349  2014-12-15 10:32  C#\xitong1\Setup1\Setup1.vdproj

     文件        122  2014-12-25 17:43  C#\xitong1\xitong\app.config

     文件        485  2014-11-28 10:34  C#\xitong1\xitong\Bangzhu.cs

     文件       3153  2014-11-28 10:34  C#\xitong1\xitong\Bangzhu.Designer.cs

     文件       5814  2014-11-28 10:34  C#\xitong1\xitong\Bangzhu.resx

     文件    1100392  2007-10-10 09:48  C#\xitong1\xitong\bin\Debug\Microsoft.Office.Interop.Excel.dll

     文件      64088  2007-10-10 09:48  C#\xitong1\xitong\bin\Debug\Microsoft.Vbe.Interop.dll

     文件     223800  2007-10-10 09:48  C#\xitong1\xitong\bin\Debug\office.dll

     文件       4608  2014-12-25 17:43  C#\xitong1\xitong\bin\Debug\sr-Latn-CS\xitong.resources.dll

     文件    4314112  2014-12-25 17:43  C#\xitong1\xitong\bin\Debug\xitong.exe

     文件        122  2014-12-25 17:43  C#\xitong1\xitong\bin\Debug\xitong.exe.config

     文件     349696  2014-12-25 17:43  C#\xitong1\xitong\bin\Debug\xitong.pdb

     文件      14328  2014-12-25 16:50  C#\xitong1\xitong\bin\Debug\xitong.vshost.exe

     文件        122  2014-12-25 17:43  C#\xitong1\xitong\bin\Debug\xitong.vshost.exe.config

     文件        490  2009-06-11 05:14  C#\xitong1\xitong\bin\Debug\xitong.vshost.exe.manifest

     文件       2279  2013-10-30 20:28  C#\xitong1\xitong\DataAccess.cs

     文件      18980  2013-12-19 01:18  C#\xitong1\xitong\Form1.cs

     文件      40622  2013-12-18 20:52  C#\xitong1\xitong\Form1.Designer.cs

     文件       6012  2013-12-18 20:52  C#\xitong1\xitong\Form1.resx

     文件       1502  2014-11-19 10:28  C#\xitong1\xitong\Frmaddcj.cs

     文件       9175  2014-11-14 11:39  C#\xitong1\xitong\Frmaddcj.Designer.cs

     文件       5814  2014-11-14 11:39  C#\xitong1\xitong\Frmaddcj.resx

     文件       1244  2013-12-05 18:08  C#\xitong1\xitong\FrmaddClass.cs

     文件       6923  2013-12-05 18:08  C#\xitong1\xitong\FrmaddClass.Designer.cs

     文件       5814  2013-12-05 18:08  C#\xitong1\xitong\FrmaddClass.resx

     文件       1483  2014-11-28 11:23  C#\xitong1\xitong\FrmaddCourseInfo.cs

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

评论

共有 条评论

相关资源