You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.5 KiB
67 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using Stone.DataService.Biz.BizPublic;
|
|
|
|
namespace Stone.DataService.Biz.Bill
|
|
{
|
|
public class F_BarCode
|
|
{
|
|
|
|
public static DataSet Exec_DataSet(string sql)
|
|
{
|
|
try
|
|
{
|
|
|
|
using (SqlConnection conn = new SqlConnection(WebConfig.BarCodeDB))
|
|
{
|
|
conn.Open();
|
|
|
|
SqlCommand cmd = conn.CreateCommand();
|
|
cmd.CommandText = sql;
|
|
|
|
DataSet dsData = new DataSet();
|
|
SqlDataAdapter sda = new SqlDataAdapter(cmd);
|
|
sda.Fill(dsData);
|
|
|
|
return dsData;
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception("条码系统错误,原因为:" + ex.Message);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public static void Exec_NonQuery(string sql)
|
|
{
|
|
try
|
|
{
|
|
using (SqlConnection conn = new SqlConnection(WebConfig.BarCodeDB))
|
|
{
|
|
conn.Open();
|
|
|
|
SqlCommand cmd = conn.CreateCommand();
|
|
cmd.CommandText = sql;
|
|
cmd.ExecuteNonQuery();
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw new Exception("条码系统错误,原因为:" + ex.Message);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|