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.
43 lines
1.1 KiB
43 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data.SqlClient;
|
|
using System.Data;
|
|
|
|
namespace Stone.WinBiz.SystemData
|
|
{
|
|
public class F_EDI
|
|
{
|
|
public static DataSet GetData(string sql)
|
|
{
|
|
SqlConnection conn = new System.Data.SqlClient.SqlConnection(GetConnString());
|
|
try
|
|
{
|
|
conn.Open();
|
|
|
|
SqlDataAdapter sda = new SqlDataAdapter(sql, conn);
|
|
|
|
DataSet dsData = new DataSet();
|
|
sda.Fill(dsData);
|
|
|
|
return dsData;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
if (conn.State == System.Data.ConnectionState.Open) conn.Close();
|
|
}
|
|
|
|
}
|
|
|
|
public static string GetConnString()
|
|
{
|
|
Entity.Entity_t_Sys_Appconfig t_Sys_Appconfig = new Entity.Entity_t_Sys_Appconfig();
|
|
return t_Sys_Appconfig.GetData("[Code]='EDI_Database'").Tables[0].Rows[0]["Value"].ToString();
|
|
}
|
|
}
|
|
}
|
|
|