using Sarand.Core.CodeTypes; using Sarand.Core.ItemOptions; using Sarand.Core.Security; using Sarand.Core.UpdateLog; using Sarand.PatientMgr.Core.App; using Sarand.PatientMgr.Core.Mgr; using Sarand.PatientMgr.Win.Forms.App; using Sarand.Win.Forms; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Sarand.PatientMgr.Win.Forms.Base { //======================================================================= public partial class SpmForm : SacsForm { //------------------------------------------------------------------- // Configuration. [Browsable(false)] public new class Config : SacsForm.Config { } //------------------------------------------------------------------- // Data members. private readonly Config config; private readonly SpmInternals internals; //------------------------------------------------------------------- // Construction. private SpmForm() : this(new Config()) { } protected SpmForm(Config config) : base(config) { this.config = config; InitializeComponent(); } protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } //------------------------------------------------------------------- // Properties. // Session. protected SpmSessionProfile_Win SessionProfile { get; } = SpmGlobals_Win.SessionProfile; protected SpmUserContext UserContext { get { return (SessionProfile != null ? SessionProfile.UserContext : null); } } protected SpmSessionContext SessionContext { get { return (UserContext != null ? UserContext.SessionContext : null); } } // Security. protected SpmSecurityProfile SecurityProfile { get { return internals.SecurityProfile; } } // Managers. protected SpmAdmissionMgr AdmissionMgr { get { return internals.AdmissionMgr; } } protected SpmDepartmentMgr DepartmentMgr { get { return internals.DepartmentMgr; } } protected SpmInstitutionMgr InstitutionMgr { get { return internals.InstitutionMgr; } } // Consoles. protected SaSecurityConsole SecurityConsole { get { return internals.SecurityConsole; } } protected SaCodeTypeConsole CodeTypeConsole { get { return internals.CodeTypeConsole; } } protected SaUpdateLogConsole UpdateLogConsole { get { return internals.UpdateLogConsole; } } protected SaItemOptionConsole ItemOptionConsole { get { return internals.ItemOptionConsole; } } //------------------------------------------------------------------- } //======================================================================= }