• 大小: 4.97MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-17
  • 语言: 其他
  • 标签: 仓库  

资源简介

这是一款功能比较齐全的进销存管理系统,比较适合毕业设计或者二次开发使用。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
namespace HcitPos
{
    public class DbHelper : IDisposable
    {
        private SqlConnection sqlConn = new SqlConnection();
        private SqlCommand sqlCmd = new SqlCommand();
        public SqlCommand SqlCmd
        {
            get { return sqlCmd; }
        }
        public DbHelper()
        {
            string connString = ConfigurationManager.ConnectionStrings[“HcitPosConnectionString“].ConnectionString;
            sqlConn.ConnectionString = connString;
            sqlCmd.Connection = sqlConn;
        }
        public DbHelper(string connString)
        {
            sqlConn.ConnectionString = connString;
            sqlCmd.Connection = sqlConn;
        }
        public void AddParameter(string name object value)
        {
            SqlParameter p = new SqlParameter();
            p.ParameterName = name;
            p.Value = value;
            sqlCmd.Parameters.Add(p);
        }
        public void AddParameter(SqlParameter parameter)
        {
            sqlCmd.Parameters.Add(parameter);
        }
        public void BeginTransaction()
        {
            if (sqlConn.State == ConnectionState.Closed)
                sqlConn.Open();
            sqlCmd.Transaction = sqlConn.BeginTransaction();
        }
        public void CommitTransaction()
        {
            sqlCmd.Transaction.Commit();
            sqlConn.Close();
        }
        public void RollbackTransaction()
        {
            sqlCmd.Transaction.Rollback();
            sqlConn.Close();
        }
        public int ExecuteNonQuery(string query CommandType commandType ConnState connectionState)
        {
            sqlCmd.CommandText = query;
            sqlCmd.CommandType = commandType;
            try
            {
                if (sqlConn.State == ConnectionState.Closed)
                    sqlConn.Open();
                int i = sqlCmd.ExecuteNonQuery();
                return i;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                sqlCmd.Parameters.Clear();
                if (connectionState == ConnState.CloseOnExit)
                    sqlConn.Close();
            }
        }
        public int ExecuteNonQuery(string query)
        {
            return ExecuteNonQuery(query CommandType.Text ConnState.CloseOnExit);
        }

        public int ExecuteNonQuery(string query CommandType commandType)
        {
            return ExecuteNonQuery(query commandType ConnState.CloseOnExit);
        }

        public int ExecuteNonQuery(string query ConnState connectionState)
        {
            return ExecuteNonQuery(query CommandType.Text connectionState);
        }

        public object ExecuteScalar(string query Comman

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        3320  2014-12-08 11:35  51Aspx源码必读.txt
     目录           0  2014-12-08 10:52  DB_51aspx\
     文件     3145728  2014-12-08 11:36  DB_51aspx\HcitPos.mdf
     文件     1048576  2014-12-08 11:36  DB_51aspx\HcitPos_log.ldf
     目录           0  2014-12-08 10:52  HcitPos\
     目录           0  2014-12-08 10:52  HcitPos\Assistant\
     文件       10093  2009-01-06 12:14  HcitPos\Assistant\FrmTips.Designer.cs
     文件        2749  2009-01-06 12:17  HcitPos\Assistant\FrmTips.cs
     文件        6742  2009-01-06 12:14  HcitPos\Assistant\FrmTips.resx
     文件       22790  2009-01-22 11:16  HcitPos\Assistant\FrmTipsSet.Designer.cs
     文件        7694  2009-01-22 11:16  HcitPos\Assistant\FrmTipsSet.cs
     文件        5814  2009-01-22 11:16  HcitPos\Assistant\FrmTipsSet.resx
     目录           0  2014-12-08 10:52  HcitPos\baseInfo\
     文件        9801  2009-01-01 14:54  HcitPos\baseInfo\FrmClassInfo.Designer.cs
     文件        2413  2009-07-21 16:38  HcitPos\baseInfo\FrmClassInfo.cs
     文件        6747  2008-12-28 20:41  HcitPos\baseInfo\FrmClassInfo.resx
     文件        8547  2008-12-28 19:06  HcitPos\baseInfo\FrmClassInfoSet.Designer.cs
     文件        3244  2008-12-28 19:06  HcitPos\baseInfo\FrmClassInfoSet.cs
     文件        5814  2008-12-28 18:45  HcitPos\baseInfo\FrmClassInfoSet.resx
     文件       16695  2009-01-01 14:53  HcitPos\baseInfo\FrmGoodsInfo.Designer.cs
     文件        4092  2009-07-21 21:38  HcitPos\baseInfo\FrmGoodsInfo.cs
     文件        7677  2008-12-28 20:49  HcitPos\baseInfo\FrmGoodsInfo.resx
     文件       15085  2009-01-01 14:53  HcitPos\baseInfo\FrmGoodsInfoSet.Designer.cs
     文件        6590  2009-07-21 21:26  HcitPos\baseInfo\FrmGoodsInfoSet.cs
     文件        5814  2008-12-28 20:32  HcitPos\baseInfo\FrmGoodsInfoSet.resx
     文件       14016  2009-01-01 14:53  HcitPos\baseInfo\FrmSupplierInfo.Designer.cs
     文件        2102  2009-01-01 14:53  HcitPos\baseInfo\FrmSupplierInfo.cs
     文件        8578  2009-01-01 14:50  HcitPos\baseInfo\FrmSupplierInfo.resx
     文件       19316  2009-01-01 14:53  HcitPos\baseInfo\FrmSupplierInfoSet.Designer.cs
     文件        6040  2009-01-01 14:52  HcitPos\baseInfo\FrmSupplierInfoSet.cs
     文件        5814  2008-12-29 20:54  HcitPos\baseInfo\FrmSupplierInfoSet.resx
............此处省略213个文件信息

评论

共有 条评论