• 大小: 741KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-10-26
  • 语言: 数据库
  • 标签: C#  SQl  

资源简介

1.1 课题研究现状分析    在各大高校里,实验设备各式各样。在实验设备的管理中,如果通过使用计算机可以减少大量的手工操作,提高工作效率。实验设备管理系统过去采用人工处理方式,由于工作量非常之大,为了提高工作效率,方便管理,因此需要开发一个实验设备管理系统。    本次课题为:实验设备管理系统,它的主要功能是先通过用户身份验证,然后即可登录实验设备管理系统,然后通过增、删、查、改操作对实验设备信息进行管理和维护。 1.1.1 本领域内已开展的研究工作    1.理论研究基础    (1)后台以SQL数据库支持。    (2)前台以 NeatBeans为开发环境,实现学生基本信息管理的增、删、查、改操作。    2.技术层面的支持    (1)系统的设计与实现应采用MVC分层模式。    (2)系统界面采用MDI方式,即用户登录后进入主窗体,主窗体通过菜单进入子窗体。

资源截图

代码片段和文件信息

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;
using System.Data.SqlClient;

namespace WindowsFormsApplication1
{
    public partial class AddEquipment : Form
    {
        public AddEquipment()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender EventArgs e)
        {
           String connectionStr = “Data Source=‘.‘; Initial Catalog=‘Equipment‘; Integrated Security=‘true‘“;
            SqlConnection connection = new SqlConnection(connectionStr);
            connection.Open();

          
            SqlCommand com = new SqlCommand();
            com.Connection = connection;
            com.CommandText = string.Format(“select count(*) from Equipment where EquipmentNO=‘{0}‘“this.txtNO.Text);
            int count = (int)com.ExecuteScalar();
            if (count > 0)
            {
                MessageBox.Show(“编号已存在!“);
            }
            else
            {
                String sql = String.Format(“insert into Equipment “ + “(EquipmentNO EquipmentNameKindProducerStateEnterDate)“ +
                “values (‘{0}‘ ‘{1}‘ ‘{2}‘ ‘{3}‘ ‘{4}‘‘{5}‘)“ this.txtNO.Text this.txtName.Text
                this.comKind.Text this.txtProducer.Text this.comState.Text this.txtDataTime.Text);
                SqlCommand command = new SqlCommand();
                command.Connection = connection;
                command.CommandText = sql;
                int dd = command.ExecuteNonQuery();
                if (dd == 1)
                {
                    MessageBox.Show(“添加成功!“);
                }
            

                String sql1 = String.Format(“select * from Equipment “);
                SqlCommand command1 = new SqlCommand(sql1 connection);
                SqlDataReader reader1 = command1.ExecuteReader();
                this.listView1.Items.Clear();
                while (reader1.Read())
                {
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = reader1[“EquipmentNO“].ToString();
                    lvi.SubItems.Add(reader1[“EquipmentName“].ToString());
                    lvi.SubItems.Add(reader1[“Kind“].ToString());
                    lvi.SubItems.Add(reader1[“Producer“].ToString());
                    lvi.SubItems.Add(reader1[“State“].ToString());
                    lvi.SubItems.Add(reader1[“Beizhu“].ToString());
                    this.listView1.Items.Add(lvi);
                }
                reader1.Close();
                connection.Close();
            }
        
        }

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

        private void button1_Click(object sender EventArgs e)
        {
            String connectionStr = “Data Source=

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-12-18 11:01  20114052126苏雪源\
     目录           0  2013-12-02 19:49  20114052126苏雪源\WindowsFormsApplication1\
     目录           0  2013-12-10 14:54  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\
     文件       24774  2013-12-07 20:12  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddEquipment.Designer.cs
     文件       13234  2013-12-10 17:45  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddEquipment.cs
     文件        5817  2013-12-07 20:12  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddEquipment.resx
     文件        6774  2013-12-06 15:01  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddType.Designer.cs
     文件        3723  2013-12-10 17:04  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddType.cs
     文件        5817  2013-12-06 15:01  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddType.resx
     文件       16432  2013-12-05 22:07  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddUser.Designer.cs
     文件        3900  2013-12-05 22:07  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddUser.cs
     文件        5817  2013-12-05 22:07  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\AddUser.resx
     文件        6963  2013-12-07 19:56  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Bumen.Designer.cs
     文件        3801  2013-12-10 17:19  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Bumen.cs
     文件        5817  2013-12-07 19:56  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Bumen.resx
     文件       20146  2013-12-10 14:51  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeManage.Designer.cs
     文件        4364  2013-12-10 14:51  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeManage.cs
     文件        6610  2013-12-10 14:51  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeManage.resx
     文件        8233  2013-12-06 10:40  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangePass.Designer.cs
     文件        1688  2013-12-06 10:40  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangePass.cs
     文件        5817  2013-12-06 10:40  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangePass.resx
     文件       19133  2013-12-05 22:08  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeUser.Designer.cs
     文件        3811  2013-12-05 22:08  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeUser.cs
     文件        6438  2013-12-05 22:08  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\ChangeUser.resx
     文件        5344  2013-12-06 17:01  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\EquipView.Designer.cs
     文件        1709  2013-12-06 17:01  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\EquipView.cs
     文件        5817  2013-12-06 17:01  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\EquipView.resx
     文件       13402  2013-12-10 15:17  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Equipment.csproj
     文件         452  2013-12-03 15:32  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Equipment.csproj.user
     文件      151552  2013-12-03 16:07  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\Equipment.sdf
     文件       20593  2013-12-03 15:31  20114052126苏雪源\WindowsFormsApplication1\WindowsFormsApplication1\EquipmentCache.Designer.cs
............此处省略96个文件信息

评论

共有 条评论