手机销售系统(完整版)


这是我们的毕业项目,付出了不少汗水~~ 如有不足之处,希望大家能见谅,谢谢
资源截图
代码片段和文件信息
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace Tel.SQLServerDAL //可以修改成实际项目的命名空间名称
{
/// 
/// Copyright (C) 2004-2008 LiTianPing 
/// 数据访问基础类(基于SQLServer)
/// 用户可以修改满足自己项目的需要。
/// 

public abstract class DbHelperSQL
{
//数据库连接字符串(web.config来配置)
//se=DATAbase;uid=sa;pwd=“ />
protected static string connectionString = “server=127.0.0.1;database=MobileTelephone;Trusted_connection=true“;
public DbHelperSQL()
{
}

#region 公用方法

public static int GetMaxID(string FieldNamestring TableName)
{
string strsql = “select max(“ + FieldName + “)+1 from “ + TableName;
object obj = GetSingle(strsql);
if (obj == null)
{
return 1;
}
else
{
return int.Parse(obj.ToString());
}
}
public static bool Exists(string strSql params SqlParameter[] cmdParms)
{
object obj = GetSingle(strSql cmdParms);
int cmdresult;
if ((object.Equals(obj null)) || (object.Equals(obj System.DBNull.Value)))
{
cmdresult = 0;
}
else
{
cmdresult = int.Parse(obj.ToString());
}
if (cmdresult == 0)
{
return false;
}
else
{
return true;
}
}
#endregion

#region  执行简单SQL语句

/// 
/// 执行SQL语句,返回影响的记录数
/// 

/// SQL语句
/// 影响的记录数
public static int ExecuteSql(string SQLString)
{
using (SqlConnection connection = new SqlConnection(connectionString))
{
using (SqlCommand cmd = new SqlCommand(SQLStringconnection))
{
try
{
connection.Open();
int rows=cmd.ExecuteNonQuery();
return rows;
}
catch(System.Data.SqlClient.SqlException E)
{
connection.Close();
throw new Exception(E.Message);
}
}
}
}

/// 
/// 执行多条SQL语句,实现数据库事务。
/// 

/// 多条SQL语句
public static void ExecuteSqlTran(ArrayList SQLStringList)
{
using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection=conn;
SqlTransaction tx=conn.BeginTransaction();
cmd.Transaction=tx;
try
{   
for(int n=0;n {
string strsql=SQLStringList[n].ToString();
if (strsql.Trim().Length>1)
{
cmd.CommandText=strsql;
cmd.ExecuteNonQuery();
}
}
tx.Commit();
}
catch(System.Data.SqlClient.SqlException E)
{
tx.Rollback();
throw new Exception(E.Message);
}
}
}
/// 
/// 执行带一个存储过程参数的的SQL语句。
/// 

/// SQL语句
/// 参数内容比如一个字段是格式复杂的文章,有特殊符号,可以通过这个方式添加
/// 

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

     文件       1859  2008-06-26 13:28  MobileTelephoneBLLAssemblyInfo.cs

     文件       1525  2008-06-30 01:38  MobileTelephoneBLLasslevel.cs

     文件       1743  2008-06-30 16:48  MobileTelephoneBLLassociator.cs

     文件     650752  2008-07-02 15:13  MobileTelephoneBLLinDebugBLL.pdb

     文件     118784  2008-07-02 15:13  MobileTelephoneBLLinDebugDAL.dll

     文件     724480  2008-07-02 15:13  MobileTelephoneBLLinDebugDAL.pdb

     文件      40960  2008-07-02 15:13  MobileTelephoneBLLinDebugModel.dll

     文件      36864  2008-07-02 15:13  MobileTelephoneBLLinDebugBLL.dll

     文件     663040  2008-07-02 15:13  MobileTelephoneBLLinDebugModel.pdb

     文件       9125  2008-06-30 16:48  MobileTelephoneBLLBLL.csproj

     文件       1805  2008-07-02 15:44  MobileTelephoneBLLBLL.csproj.user

     文件       1301  2008-06-26 13:28  MobileTelephoneBLLclient.cs

     文件       1293  2008-06-26 13:28  MobileTelephoneBLLcolor.cs

     文件       1285  2008-06-26 13:28  MobileTelephoneBLLduty.cs

     文件       1519  2008-06-29 02:06  MobileTelephoneBLLemployee.cs

     文件       1327  2008-06-30 02:24  MobileTelephoneBLLgathering.cs

     文件       1307  2008-06-26 13:28  MobileTelephoneBLLICType.cs

     文件       1721  2008-07-02 14:29  MobileTelephoneBLLidentityCard.cs

     文件       1341  2008-06-26 13:28  MobileTelephoneBLLmainmenu.cs

     文件       1636  2008-06-26 13:28  MobileTelephoneBLLmerchandise.cs

     文件       1474  2008-06-26 13:28  MobileTelephoneBLLmerchandiseType.cs

    .......    650752  2008-07-02 15:13  MobileTelephoneBLLobjDebugBLL.pdb

    ..A..H.     96392  2008-07-02 15:44  MobileTelephoneBLLobjDebugBLL.projdata

    .......     36864  2008-07-02 15:13  MobileTelephoneBLLobjDebugBLL.dll

     文件       1509  2008-06-29 18:28  MobileTelephoneBLLoperate.cs

     文件       1325  2008-06-26 13:28  MobileTelephoneBLLorderType.cs

     文件       1309  2008-06-30 15:07  MobileTelephoneBLLpayment.cs

     文件       1441  2008-06-26 13:28  MobileTelephoneBLLpointSet.cs

     文件       1309  2008-06-26 13:28  MobileTelephoneBLLpopedom.cs

     文件       1485  2008-06-26 13:28  MobileTelephoneBLLpopedom_list.cs

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)