• 大小: 78KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-15
  • 语言: C#
  • 标签: C#  

资源简介

C#的课程设计,洗衣管理系统。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace Laundress_System
{
    class DatabaseConnection
    {
        public static SqlConnection sqlconn;
        public static string sql = “server=.;database=Laundress_System;uid=sa;pwd=12345“;

        public SqlConnection getConn()
        {
            sqlconn = new SqlConnection(sql);
            sqlconn.Open();
            return sqlconn;
        }

        public void closeConn()
        {
            if (sqlconn.State == ConnectionState.Open)
            {
                sqlconn.Close();
            }
        }

        public SqlDataReader getCom(string sql)
        {
            getConn();
            SqlCommand sqlcom = sqlconn.CreateCommand();
            sqlcom.CommandText = sql;
            SqlDataReader sqlread = sqlcom.ExecuteReader();
            return sqlread;
        }

        public int getSqlCom(string sql)
        {
            getConn();
            SqlCommand sqlcom = new SqlCommand(sql sqlconn);
            int result = sqlcom.ExecuteNonQuery();
            closeConn();
            return result;
        }

        public DataSet getDataSet(string sql string tableName)
        {
            getConn();
            SqlDataAdapter sqlDataAdap = new SqlDataAdapter(sql sqlconn);
            DataSet dataset = new DataSet();
            sqlDataAdap.Fill(dataset tableName);
            closeConn();
            return dataset;
        }

        public int getRow(string sql)
        {
            getConn();
            SqlCommand sqlcom = new SqlCommand(sql sqlconn);
            return Convert.ToInt32(sqlcom.ExecuteScalar());
        }
    }
}

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

     文件      27648  2016-01-09 01:22  Laundress_System\bin\Debug\Laundress_System.exe

     文件      60928  2016-01-09 01:22  Laundress_System\bin\Debug\Laundress_System.pdb

     文件      11600  2016-01-09 00:06  Laundress_System\bin\Debug\Laundress_System.vshost.exe

     文件        490  2012-06-06 02:06  Laundress_System\bin\Debug\Laundress_System.vshost.exe.manifest

     文件       1801  2016-01-08 20:51  Laundress_System\DatabaseConnection.cs

     文件      15624  2016-01-09 01:22  Laundress_System\Form1.cs

     文件      11179  2016-01-09 00:49  Laundress_System\Form1.Designer.cs

     文件       5817  2016-01-09 00:49  Laundress_System\Form1.resx

     文件       3148  2016-01-09 00:50  Laundress_System\Form2.cs

     文件       4805  2016-01-09 00:50  Laundress_System\Form2.Designer.cs

     文件       5817  2016-01-09 00:50  Laundress_System\Form2.resx

     文件       3668  2016-01-09 01:03  Laundress_System\Form3.cs

     文件       7728  2016-01-09 00:50  Laundress_System\Form3.Designer.cs

     文件       5817  2016-01-09 00:50  Laundress_System\Form3.resx

     文件        593  2016-01-08 00:58  Laundress_System\Item.cs

     文件       4383  2016-01-09 00:34  Laundress_System\Laundress_System.csproj

     文件        873  2016-01-08 00:18  Laundress_System\Laundress_System.sln

    ..A..H.     21504  2016-01-09 01:22  Laundress_System\Laundress_System.suo

     文件       5420  2016-01-08 09:04  Laundress_System\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6296  2016-01-09 01:22  Laundress_System\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        834  2016-01-09 00:34  Laundress_System\obj\x86\Debug\Laundress_System.csproj.FileListAbsolute.txt

     文件       1091  2016-01-09 00:57  Laundress_System\obj\x86\Debug\Laundress_System.csproj.GenerateResource.Cache

     文件       9174  2016-01-08 09:04  Laundress_System\obj\x86\Debug\Laundress_System.csprojResolveAssemblyReference.cache

     文件      27648  2016-01-09 01:22  Laundress_System\obj\x86\Debug\Laundress_System.exe

     文件        180  2016-01-09 00:50  Laundress_System\obj\x86\Debug\Laundress_System.Form1.resources

     文件        180  2016-01-09 00:50  Laundress_System\obj\x86\Debug\Laundress_System.Form2.resources

     文件        180  2016-01-09 00:57  Laundress_System\obj\x86\Debug\Laundress_System.Form3.resources

     文件      60928  2016-01-09 01:22  Laundress_System\obj\x86\Debug\Laundress_System.pdb

     文件        180  2016-01-09 00:34  Laundress_System\obj\x86\Debug\Laundress_System.Properties.Resources.resources

     文件        497  2016-01-08 00:18  Laundress_System\Program.cs

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

评论

共有 条评论