Add project files.

This commit is contained in:
Martijn Dijkstra
2025-05-08 09:10:15 +02:00
parent 7be30a6f28
commit 6a44bd4fd2
211 changed files with 729572 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Maser.Feanor.Model;
namespace Maser.Feanor.Biz
{
public static class SQLMethods
{
public static string FormatSQL(this DateTime? dt)
{
if (dt == null)
return null;
// SQL format is '2016-12-15 12:24:32.427'
return String.Format("{0:yyyy-MM-dd HH:mm:ss:fff}", dt);
}
public static string FormatSQL(this DateTime dt)
{
// SQL format is '2016-12-15 12:24:32.427'
return String.Format("{0:yyyy-MM-dd HH:mm:ss:fff}", dt);
}
public static bool DatabaseOnline(Int32 TimeOutSec)
{
DateTime dtTimeout = DateTime.Now.AddSeconds(TimeOutSec);
while (DateTime.Now < dtTimeout)
{
try
{
new Chambers().GetAllActive();
return true;
}
catch { }
System.Threading.Thread.Sleep(1000);
}
return false;
}
}
}