구매 sid 검사 기능 추가

This commit is contained in:
chi
2023-07-12 17:22:24 +09:00
parent 2e484b04e0
commit e4d9011d2f
36 changed files with 961 additions and 689 deletions

View File

@@ -210,13 +210,13 @@ namespace FBS0000
//현재인원값
var bIndate = DateTime.TryParse(item.indate, out DateTime dtIn);
var bOutdate = DateTime.TryParse(item.outdate, out DateTime dtOut);
Boolean usePerson = true;
// Boolean usePerson = true;
//
if (bIndate == true && curDate.ToShortDateString().CompareTo(dtIn.ToShortDateString()) < 0)
usePerson = false;
if (bOutdate == true && curDate.ToShortDateString().CompareTo(dtOut.ToShortDateString()) > 0)
usePerson = false;
//if (bIndate == true && curDate.ToShortDateString().CompareTo(dtIn.ToShortDateString()) < 0)
// usePerson = false;
//if (bOutdate == true && curDate.ToShortDateString().CompareTo(dtOut.ToShortDateString()) > 0)
// usePerson = false;
ps[3] = bholy ? 1 : 0;
ps[2] += 1;

View File

@@ -1,45 +1,45 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
//using System;
//using System.IO;
//using System.Runtime.InteropServices;
namespace SqlServerTypes
{
/// <summary>
/// Utility methods related to CLR Types for SQL Server
/// </summary>
public class Utilities
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr LoadLibrary(string libname);
//namespace SqlServerTypes
//{
// /// <summary>
// /// Utility methods related to CLR Types for SQL Server
// /// </summary>
// public class Utilities
// {
// [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
// private static extern IntPtr LoadLibrary(string libname);
/// <summary>
/// Loads the required native assemblies for the current architecture (x86 or x64)
/// </summary>
/// <param name="rootApplicationPath">
/// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
/// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
/// </param>
public static void LoadNativeAssemblies(string rootApplicationPath)
{
var nativeBinaryPath = IntPtr.Size > 4
? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
: Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
// /// <summary>
// /// Loads the required native assemblies for the current architecture (x86 or x64)
// /// </summary>
// /// <param name="rootApplicationPath">
// /// Root path of the current application. Use Server.MapPath(".") for ASP.NET applications
// /// and AppDomain.CurrentDomain.BaseDirectory for desktop applications.
// /// </param>
// public static void LoadNativeAssemblies(string rootApplicationPath)
// {
// var nativeBinaryPath = IntPtr.Size > 4
// ? Path.Combine(rootApplicationPath, @"SqlServerTypes\x64\")
// : Path.Combine(rootApplicationPath, @"SqlServerTypes\x86\");
LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
}
// LoadNativeAssembly(nativeBinaryPath, "msvcr120.dll");
// LoadNativeAssembly(nativeBinaryPath, "SqlServerSpatial140.dll");
// }
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
{
var path = Path.Combine(nativeBinaryPath, assemblyName);
var ptr = LoadLibrary(path);
if (ptr == IntPtr.Zero)
{
throw new Exception(string.Format(
"Error loading {0} (ErrorCode: {1})",
assemblyName,
Marshal.GetLastWin32Error()));
}
}
}
}
// private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
// {
// var path = Path.Combine(nativeBinaryPath, assemblyName);
// var ptr = LoadLibrary(path);
// if (ptr == IntPtr.Zero)
// {
// throw new Exception(string.Format(
// "Error loading {0} (ErrorCode: {1})",
// assemblyName,
// Marshal.GetLastWin32Error()));
// }
// }
// }
//}