基本信息
源码名称:超市前台结算系统
源码大小:0.09M
文件格式:.rar
开发语言:C#
更新时间:2021-12-29
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
class SQLHelper
{
//连数据库
public static string connString = "server=.;DataBase=StudentManageDB;Uid=sa;Pwd=Sqtj2020";
//增删改
public static int Update(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand(sql, conn);
try
{
conn.Open();
int result = cmd.ExecuteNonQuery();
return result;
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}
public static object GetSingleResult(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand(sql, conn);
try
{
conn.Open();
object result = cmd.ExecuteNonQuery();
return result;
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}
public static SqlDataReader GetReader(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd1 = new SqlCommand(sql, conn);
try
{
conn.Open();
//表示看不懂**********
return cmd1.ExecuteReader (CommandBehavior.CloseConnection);
}
catch (Exception ex)
{
throw ex;
}
}
}
.
├── HYWJ.suo
├── SMProject
│ ├── SMProject
│ │ ├── App.config
│ │ ├── FrmBalance.cs
│ │ ├── FrmBalance.designer.cs
│ │ ├── FrmBalance.resx
│ │ ├── FrmLogin.cs
│ │ ├── FrmLogin.designer.cs
│ │ ├── FrmLogin.resx
│ │ ├── FrmSaleManage.cs
│ │ ├── FrmSaleManage.designer.cs
│ │ ├── FrmSaleManage.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── SMProject.csproj
│ │ ├── bin
│ │ │ ├── Debug
│ │ │ │ ├── SMProject.exe
│ │ │ │ ├── SMProject.exe.config
│ │ │ │ ├── SMProject.pdb
│ │ │ │ ├── SMProject.vshost.exe
│ │ │ │ ├── SMProject.vshost.exe.config
│ │ │ │ └── SMProject.vshost.exe.manifest
│ │ │ └── Release
│ │ └── obj
│ │ └── Debug
│ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── SMProject.FrmBalance.resources
│ │ ├── SMProject.FrmLogin.resources
│ │ ├── SMProject.FrmSaleManage.resources
│ │ ├── SMProject.Properties.Resources.resources
│ │ ├── SMProject.csproj.FileListAbsolute.txt
│ │ ├── SMProject.csproj.GenerateResource.Cache
│ │ ├── SMProject.csprojResolveAssemblyReference.cache
│ │ ├── SMProject.exe
│ │ ├── SMProject.pdb
│ │ └── TempPE
│ ├── SMProject.sln
│ └── SMProject.v12.suo
└── 好例子网_SMProject.rar
9 directories, 38 files
超市前台结算系统
链接数据库,增删改赋值给前台
class SQLHelper
{
//连数据库
public static string connString = "server=.;DataBase=StudentManageDB;Uid=sa;Pwd=Sqtj2020";
//增删改
public static int Update(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand(sql, conn);
try
{
conn.Open();
int result = cmd.ExecuteNonQuery();
return result;
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}
public static object GetSingleResult(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd = new SqlCommand(sql, conn);
try
{
conn.Open();
object result = cmd.ExecuteNonQuery();
return result;
}
catch (Exception ex)
{
throw ex;
}
finally
{
conn.Close();
}
}
public static SqlDataReader GetReader(string sql)
{
SqlConnection conn = new SqlConnection(connString);
SqlCommand cmd1 = new SqlCommand(sql, conn);
try
{
conn.Open();
//表示看不懂**********
return cmd1.ExecuteReader (CommandBehavior.CloseConnection);
}
catch (Exception ex)
{
throw ex;
}
}
}
.
├── HYWJ.suo
├── SMProject
│ ├── SMProject
│ │ ├── App.config
│ │ ├── FrmBalance.cs
│ │ ├── FrmBalance.designer.cs
│ │ ├── FrmBalance.resx
│ │ ├── FrmLogin.cs
│ │ ├── FrmLogin.designer.cs
│ │ ├── FrmLogin.resx
│ │ ├── FrmSaleManage.cs
│ │ ├── FrmSaleManage.designer.cs
│ │ ├── FrmSaleManage.resx
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── SMProject.csproj
│ │ ├── bin
│ │ │ ├── Debug
│ │ │ │ ├── SMProject.exe
│ │ │ │ ├── SMProject.exe.config
│ │ │ │ ├── SMProject.pdb
│ │ │ │ ├── SMProject.vshost.exe
│ │ │ │ ├── SMProject.vshost.exe.config
│ │ │ │ └── SMProject.vshost.exe.manifest
│ │ │ └── Release
│ │ └── obj
│ │ └── Debug
│ │ ├── DesignTimeResolveAssemblyReferences.cache
│ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ ├── SMProject.FrmBalance.resources
│ │ ├── SMProject.FrmLogin.resources
│ │ ├── SMProject.FrmSaleManage.resources
│ │ ├── SMProject.Properties.Resources.resources
│ │ ├── SMProject.csproj.FileListAbsolute.txt
│ │ ├── SMProject.csproj.GenerateResource.Cache
│ │ ├── SMProject.csprojResolveAssemblyReference.cache
│ │ ├── SMProject.exe
│ │ ├── SMProject.pdb
│ │ └── TempPE
│ ├── SMProject.sln
│ └── SMProject.v12.suo
└── 好例子网_SMProject.rar
9 directories, 38 files