SB 12-Jun-2019, create listView & listFilter
This commit is contained in:
@@ -0,0 +1,129 @@
|
||||
using Sarand.Core.Base;
|
||||
using Sarand.Core.CodeTypes;
|
||||
using Sarand.Core.Interfaces;
|
||||
using Sarand.Core.ItemDocs;
|
||||
using Sarand.Core.ItemOptions;
|
||||
using Sarand.Core.Security;
|
||||
using Sarand.Core.UpdateLog;
|
||||
using Sarand.PatientMgr.Core.Mgr;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Sarand.PatientMgr.Core.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class SpmInternals : SacsDisposable
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private readonly SpmSystem system = SpmGlobals.System;
|
||||
|
||||
// Managers.
|
||||
private SpmAdmissionMgr admissionMgr = null;
|
||||
private SpmDepartmentMgr departmentMgr = null;
|
||||
private SpmInstitutionMgr institutionMgr = null;
|
||||
|
||||
// Consoles.
|
||||
private SaSecurityConsole securityConsole;
|
||||
private SaCodeTypeConsole codeTypeConsole;
|
||||
private SaUpdateLogConsole updateLogConsole;
|
||||
private SaItemOptionConsole itemOptionConsole;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SpmInternals(SpmUserContext userContext)
|
||||
{
|
||||
UserContext = userContext;
|
||||
}
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (admissionMgr != null) admissionMgr.Dispose();
|
||||
if (departmentMgr != null) departmentMgr.Dispose();
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Session.
|
||||
public SpmUserContext UserContext { get; }
|
||||
public SpmSessionContext SessionContext { get { return UserContext.SessionContext; } }
|
||||
public SpmSecurityProfile SecurityProfile { get { return UserContext.SecurityProfile; } }
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Managers.
|
||||
public SpmAdmissionMgr AdmissionMgr {
|
||||
get
|
||||
{
|
||||
if (admissionMgr == null)
|
||||
admissionMgr = system.CreateAdmissionMgr(UserContext);
|
||||
return admissionMgr;
|
||||
}
|
||||
}
|
||||
public SpmDepartmentMgr DepartmentMgr
|
||||
{
|
||||
get
|
||||
{
|
||||
if (departmentMgr == null)
|
||||
departmentMgr = SpmGlobals.System.CreateDepartmentMgr(UserContext);
|
||||
return departmentMgr;
|
||||
}
|
||||
}
|
||||
public SpmInstitutionMgr InstitutionMgr
|
||||
{
|
||||
get
|
||||
{
|
||||
if (institutionMgr == null)
|
||||
institutionMgr = system.CreateInstitutionMgr(UserContext);
|
||||
return institutionMgr;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Consoles.
|
||||
public SaSecurityConsole SecurityConsole
|
||||
{
|
||||
get
|
||||
{
|
||||
if (securityConsole == null)
|
||||
securityConsole = SpmGlobals.GetSecurityConsole(UserContext);
|
||||
return securityConsole;
|
||||
}
|
||||
}
|
||||
public SaCodeTypeConsole CodeTypeConsole
|
||||
{
|
||||
get
|
||||
{
|
||||
if (codeTypeConsole == null)
|
||||
codeTypeConsole = SpmGlobals.GetCodeTypeConsole(UserContext);
|
||||
return codeTypeConsole;
|
||||
}
|
||||
}
|
||||
public SaUpdateLogConsole UpdateLogConsole
|
||||
{
|
||||
get
|
||||
{
|
||||
if (updateLogConsole == null)
|
||||
updateLogConsole = SpmGlobals.GetUpdateLogConsole(UserContext);
|
||||
return updateLogConsole;
|
||||
}
|
||||
}
|
||||
public SaItemOptionConsole ItemOptionConsole
|
||||
{
|
||||
get
|
||||
{
|
||||
if (itemOptionConsole == null)
|
||||
itemOptionConsole = SpmGlobals.GetItemOptionConsole(UserContext);
|
||||
return itemOptionConsole;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user