84 lines
3.0 KiB
C#
84 lines
3.0 KiB
C#
using Sarand.Core.App;
|
|
using Sarand.Core.Base;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Sarand.OperationsMgr.Core.App
|
|
{
|
|
//=======================================================================
|
|
public abstract partial class OpnSystem : SacsSystem
|
|
{
|
|
//-------------------------------------------------------------------
|
|
// Data members.
|
|
|
|
//-------------------------------------------------------------------
|
|
// Extended logging options.
|
|
public enum ExtendedLogginOption
|
|
{
|
|
SecurityProfile,
|
|
DbQueryExecution,
|
|
Printing,
|
|
}
|
|
public static readonly String ExtendedLogging_SecurityProfile = "SecurityProfile";
|
|
public static readonly String ExtendedLogging_DbQueryExecution = "DbQueryExecution";
|
|
public static readonly String ExtendedLogging_Printing = "Printing";
|
|
private List<String> extendedLoggingOptions;
|
|
|
|
//-------------------------------------------------------------------
|
|
// Construction - use derived objects.
|
|
protected OpnSystem (PropertySet properties)
|
|
{
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// Application definitions.
|
|
public static String GetCopyrightNotice (bool html = false)
|
|
{
|
|
return (html ? "© " : "(c) ") + "2002- " + DateTime.Today.Year + " Sarand Ltd";
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// S y s t e m C o d e s
|
|
//-------------------------------------------------------------------
|
|
|
|
//---------------------------------------------------------------------------
|
|
// System code utilities.
|
|
public static Opn.Instance GetInstanceForCode (String instanceCode)
|
|
{
|
|
return Opn.Instance.Unknown;
|
|
}
|
|
public static String GetInstanceCode (Opn.Instance instance)
|
|
{
|
|
return null;
|
|
}
|
|
public static String GetInstanceDesc (Opn.Instance instance)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
// D a t a M a n a g e r s
|
|
//-------------------------------------------------------------------
|
|
|
|
//-------------------------------------------------------------------
|
|
// A p p l i c a t i o n P r o p e r t i e s
|
|
//-------------------------------------------------------------------
|
|
public bool IsExtendedLogging (ExtendedLogginOption extendedLoggingOption)
|
|
{
|
|
if (extendedLoggingOptions == null) return false;
|
|
if (extendedLoggingOption == ExtendedLogginOption.SecurityProfile)
|
|
return extendedLoggingOptions.ContainsCI(ExtendedLogging_SecurityProfile);
|
|
if (extendedLoggingOption == ExtendedLogginOption.DbQueryExecution)
|
|
return extendedLoggingOptions.ContainsCI(ExtendedLogging_DbQueryExecution);
|
|
if (extendedLoggingOption == ExtendedLogginOption.Printing)
|
|
return extendedLoggingOptions.ContainsCI(ExtendedLogging_Printing);
|
|
return false;
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|