110,539
社区成员
发帖
与我相关
我的任务
分享
public OracleConnection Open_db()
{
if (Check_Time())
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
return con;
}
else
{
shutdown.DoExitWin(shutdown.EWX_POWEROFF);
return null;
}
}
private bool Check_Time()
{
bool License_get = false;
DateTime dt = System.DateTime.Now;
if (int.Parse(dt.Year.ToString()) == 2009 && int.Parse(dt.Month.ToString())<10)
{
License_get = true;
}
return License_get;
}