PG数据库连接
This commit is contained in:
parent
ae1e2dc118
commit
338726e2a7
@ -59,6 +59,10 @@
|
|||||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||||
<HintPath>Extensions\Microsoft.Office.Interop.Excel.dll</HintPath>
|
<HintPath>Extensions\Microsoft.Office.Interop.Excel.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Mono.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>Extensions\Mono.Security.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>Extensions\Newtonsoft.Json.dll</HintPath>
|
<HintPath>Extensions\Newtonsoft.Json.dll</HintPath>
|
||||||
@ -1238,6 +1242,8 @@
|
|||||||
<Content Include="Extensions\DevComponents.DotNetBar.SuperGrid.dll" />
|
<Content Include="Extensions\DevComponents.DotNetBar.SuperGrid.dll" />
|
||||||
<Content Include="Extensions\DevComponents.DotNetBar2.dll" />
|
<Content Include="Extensions\DevComponents.DotNetBar2.dll" />
|
||||||
<Content Include="Extensions\Microsoft.Office.Interop.Excel.dll" />
|
<Content Include="Extensions\Microsoft.Office.Interop.Excel.dll" />
|
||||||
|
<Content Include="Extensions\Mono.Security.dll" />
|
||||||
|
<Content Include="Extensions\Npgsql.dll" />
|
||||||
<Content Include="Resources\AttachFile.png" />
|
<Content Include="Resources\AttachFile.png" />
|
||||||
<Content Include="Resources\bg.png" />
|
<Content Include="Resources\bg.png" />
|
||||||
<Content Include="Resources\BookNote.png" />
|
<Content Include="Resources\BookNote.png" />
|
||||||
|
|||||||
BIN
AIMS/Extensions/Mono.Security.dll
Normal file
BIN
AIMS/Extensions/Mono.Security.dll
Normal file
Binary file not shown.
BIN
AIMS/Extensions/Npgsql.dll
Normal file
BIN
AIMS/Extensions/Npgsql.dll
Normal file
Binary file not shown.
@ -1267,7 +1267,7 @@ namespace AIMS.OperationFront.UI
|
|||||||
MessageBox.Show("未找到该患者信息!");
|
MessageBox.Show("未找到该患者信息!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PublicMethod.GetHospitalName().Contains("秦皇岛"))
|
else if (PublicMethod.GetHospitalName().Contains("秦皇岛"))
|
||||||
{
|
{
|
||||||
string sqlStr = string.Format("select * from AIMS_PATIENTS where IPD_NO like '%{0}%'", txtMdrecNo.Text);
|
string sqlStr = string.Format("select * from AIMS_PATIENTS where IPD_NO like '%{0}%'", txtMdrecNo.Text);
|
||||||
DataTable dt = null;
|
DataTable dt = null;
|
||||||
@ -1303,7 +1303,7 @@ namespace AIMS.OperationFront.UI
|
|||||||
rboZQ.Checked = true;
|
rboZQ.Checked = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (PublicMethod.GetHospitalName().Contains("大连市金州区中医医院"))
|
else if (PublicMethod.GetHospitalName().Contains("大连市金州区中医医院"))
|
||||||
{
|
{
|
||||||
string sqlStr = string.Format("select * from AIMS_PATIENTS where IPD_NO like '%{0}%'", txtMdrecNo.Text);
|
string sqlStr = string.Format("select * from AIMS_PATIENTS where IPD_NO like '%{0}%'", txtMdrecNo.Text);
|
||||||
DataTable dt = null;
|
DataTable dt = null;
|
||||||
@ -1337,6 +1337,41 @@ namespace AIMS.OperationFront.UI
|
|||||||
dtpInHosDate.Value = Convert.ToDateTime(row["INHOSPITALTIME"].ToString());
|
dtpInHosDate.Value = Convert.ToDateTime(row["INHOSPITALTIME"].ToString());
|
||||||
rboZQ.Checked = true;
|
rboZQ.Checked = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (PublicMethod.GetHospitalName().Contains("漳浦"))
|
||||||
|
{
|
||||||
|
string sqlStr = string.Format("select * from AIMS_PATIENTS where IPD_NO like '%{0}%'", txtMdrecNo.Text);
|
||||||
|
DataTable dt = null;
|
||||||
|
dt = PGDBHelper.GetDataTable(sqlStr);
|
||||||
|
if (dt != null && dt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataRow row = dt.Rows[0];
|
||||||
|
txtArchivesNo.Text = row["IPD_NO"].ToString();//HIS患者ID
|
||||||
|
cboDepartment.Text = row["department_name"].ToString(); //申请手术科室编码
|
||||||
|
cboApplyDepId.Text = row["department_name"].ToString(); //申请手术科室编码
|
||||||
|
txtName.Text = row["PATIENT_NAME"].ToString();
|
||||||
|
cboSex.Text = row["PATIENT_SEX"].ToString();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
dtpBirthDay.Value = Convert.ToDateTime(row["PATIENT_BIRTH"].ToString());
|
||||||
|
if (row["PATIENT_HEIGHT"].ToString() != "") txtHeight.Text = Convert.ToDecimal(row["PATIENT_HEIGHT"].ToString()).ToString();
|
||||||
|
if (row["PATIENT_WEIGHT"].ToString() != "") txtWeight.Text = Convert.ToDecimal(row["PATIENT_WEIGHT"].ToString()).ToString();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
cboBloodType.Text = row["PATINET_BLOODTYPE"].ToString();
|
||||||
|
cboRHBloodType.Text = row["PATINET_BLOODTYPE_RH"].ToString();
|
||||||
|
txtIdentityCard.Text = row["IDNO"].ToString();
|
||||||
|
cboPatientKind.Text = row["PATIENT_CHARGE_TYPE"].ToString();
|
||||||
|
txtIlldistrict.Text = row["WARD_NO"].ToString();
|
||||||
|
txtSickBed.Text = row["ROOM_NO"].ToString();
|
||||||
|
//patient.ADDRESS = row["PATIENT_ADDRESS"].ToString();
|
||||||
|
txtContacts.Text = row["PATIENT_CONTACTOR"].ToString();
|
||||||
|
txtContactsPhone.Text = row["PATIENT_CONTACTOR_PHONE"].ToString();
|
||||||
|
dtpInHosDate.Value = Convert.ToDateTime(row["INHOSPITALTIME"].ToString());
|
||||||
|
rboZQ.Checked = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -31,11 +31,17 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Mono.Security">
|
||||||
|
<HintPath>..\AIMS\Extensions\Mono.Security.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Npgsql, Version=2.2.7.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\AIMS\Extensions\Npgsql.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Oracle.ManagedDataAccess">
|
<Reference Include="Oracle.ManagedDataAccess">
|
||||||
<HintPath>..\AIMS\Extensions\Oracle.ManagedDataAccess.dll</HintPath>
|
<HintPath>..\AIMS\Extensions\Oracle.ManagedDataAccess.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.configuration" />
|
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
@ -66,6 +72,7 @@
|
|||||||
<Compile Include="MyCodeName.cs" />
|
<Compile Include="MyCodeName.cs" />
|
||||||
<Compile Include="MyNameIntValue.cs" />
|
<Compile Include="MyNameIntValue.cs" />
|
||||||
<Compile Include="NowPhysioData.cs" />
|
<Compile Include="NowPhysioData.cs" />
|
||||||
|
<Compile Include="PGDBHelper.cs" />
|
||||||
<Compile Include="ProgramLogService.cs" />
|
<Compile Include="ProgramLogService.cs" />
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@ -85,7 +92,6 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|||||||
299
AIMSExtension/PGDBHelper.cs
Normal file
299
AIMSExtension/PGDBHelper.cs
Normal file
@ -0,0 +1,299 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Configuration;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Npgsql;
|
||||||
|
using HelperDB;
|
||||||
|
|
||||||
|
namespace AIMSExtension
|
||||||
|
{
|
||||||
|
public static class PGDBHelper
|
||||||
|
{
|
||||||
|
public static readonly string _ConnectionString = new XmlUse(Application.StartupPath + "\\AIMS.xml").GetNode("HisConnectionStringOracel")[0].ToString();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql操作(增、删、改)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql语句</param>
|
||||||
|
/// <returns>执行的记录数</returns>
|
||||||
|
public static int ExecNonQuery(string sql)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
using (NpgsqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = sql;
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql操作(增、删、改),以参数方式传值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql语句</param>
|
||||||
|
/// <param name="values">参数数组</param>
|
||||||
|
/// <returns>执行的记录数</returns>
|
||||||
|
public static int ExecNonQuery(string sql, params SqlParameter[] values)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
using (NpgsqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = sql;
|
||||||
|
cmd.Parameters.AddRange(values);
|
||||||
|
return cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到单个值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="safeSql">得到单个值的sql查询语句</param>
|
||||||
|
/// <returns>单个值对象</returns>
|
||||||
|
public static object ExecuteScalar(string safeSql)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
using (NpgsqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = safeSql;
|
||||||
|
return cmd.ExecuteScalar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到单个值,以参数方式传值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="safeSql">得到单个值的sql查询语句</param>
|
||||||
|
/// <param name="values">参数数组</param>
|
||||||
|
/// <returns>单个值对象</returns>
|
||||||
|
public static object ExecuteScalar(string safeSql, params SqlParameter[] values)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
using (NpgsqlCommand cmd = conn.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.Parameters.Clear();
|
||||||
|
cmd.CommandText = safeSql;
|
||||||
|
cmd.Parameters.AddRange(values);
|
||||||
|
return cmd.ExecuteScalar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到一个DataReader对象,以参数方式传值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql查询语句</param>
|
||||||
|
/// <param name="values">参数数组</param>
|
||||||
|
/// <returns>DataReader对象</returns>
|
||||||
|
public static NpgsqlDataReader GetDataReader(string sql, params SqlParameter[] values)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
|
||||||
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
||||||
|
cmd.Parameters.AddRange(values);
|
||||||
|
NpgsqlDataReader reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
|
||||||
|
return reader;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到一个DataTable对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql查询语句</param>
|
||||||
|
/// <returns>DataTable</returns>
|
||||||
|
public static DataTable GetDataTable(string sql)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
DataSet ds = new DataSet();
|
||||||
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
||||||
|
NpgsqlDataAdapter da = new NpgsqlDataAdapter(cmd);
|
||||||
|
da.Fill(ds);
|
||||||
|
return ds.Tables[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到一个DataTable对象,以参数方式传值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql查询语句</param>
|
||||||
|
/// <param name="values">参数数组</param>
|
||||||
|
/// <returns>DataTable</returns>
|
||||||
|
public static DataTable GetDataTable(string sql, params SqlParameter[] values)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
DataSet ds = new DataSet();
|
||||||
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
||||||
|
if (values != null)
|
||||||
|
cmd.Parameters.AddRange(values);
|
||||||
|
NpgsqlDataAdapter da = new NpgsqlDataAdapter(cmd);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
da.Fill(ds);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
return ds.Tables[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到一个DataSet对象
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql查询语句</param>
|
||||||
|
/// <returns>DataSet</returns>
|
||||||
|
public static DataSet GetDataSet(string sql)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
DataSet ds = new DataSet();
|
||||||
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
||||||
|
NpgsqlDataAdapter da = new NpgsqlDataAdapter(cmd);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
da.Fill(ds);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
return ds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 执行sql查询,得到一个DataSet对象,以参数方式传值
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">sql查询语句</param>
|
||||||
|
/// <param name="values">参数数组</param>
|
||||||
|
/// <returns>DataSet</returns>
|
||||||
|
public static DataSet GetDataSet(string sql, params SqlParameter[] values)
|
||||||
|
{
|
||||||
|
using (NpgsqlConnection conn = new NpgsqlConnection(_ConnectionString))
|
||||||
|
{
|
||||||
|
if (conn.State != ConnectionState.Open)
|
||||||
|
conn.Open();
|
||||||
|
DataSet ds = new DataSet();
|
||||||
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
||||||
|
|
||||||
|
if (values != null)
|
||||||
|
cmd.Parameters.AddRange(values);
|
||||||
|
|
||||||
|
NpgsqlDataAdapter da = new NpgsqlDataAdapter(cmd);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
da.Fill(ds);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
return ds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得int
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static int GetInt(object obj)
|
||||||
|
{
|
||||||
|
return (int)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得float
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static float GetFloat(object obj)
|
||||||
|
{
|
||||||
|
return (float)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得double
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static double GetDouble(object obj)
|
||||||
|
{
|
||||||
|
return (double)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得long
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static long GetLong(object obj)
|
||||||
|
{
|
||||||
|
return (long)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得decimal
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static decimal GetDecimal(object obj)
|
||||||
|
{
|
||||||
|
return (decimal)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得bool
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static bool GetBoolean(object obj)
|
||||||
|
{
|
||||||
|
return (bool)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得DateTime
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DateTime GetDateTime(object obj)
|
||||||
|
{
|
||||||
|
return (DateTime)obj;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 拆箱获得string
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string GetString(object obj)
|
||||||
|
{
|
||||||
|
return obj + "";
|
||||||
|
}
|
||||||
|
public static DateTime SystemDate()
|
||||||
|
{
|
||||||
|
string sqlStr = "select getdate() as SysDate";
|
||||||
|
DataTable dt = GetDataTable(sqlStr);
|
||||||
|
return DateTime.Parse(DateTime.Parse(dt.Rows[0]["SysDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user