();
+ if (itemData != null)
+ {
+ // Users.
+ string createUser = (securityConsole != null ? securityConsole.GetNameForItemId(itemData.CreateStamp.By) : "");
+ string updateUser = (securityConsole != null ? securityConsole.GetNameForItemId(itemData.UpdateStamp.By) : "");
+ // Display update stamp.
+ body.Add("Created: " + DateUtil.Format(itemData.CreateStamp.On, "d-MMM-yyyy HH:mm") + (!StringUtil.IsEmpty(createUser) ? " by " + createUser : "") + "
");
+ body.Add("Updated: " + DateUtil.Format(itemData.UpdateStamp.On, "d-MMM-yyyy HH:mm") + (!StringUtil.IsEmpty(updateUser) ? " by " + updateUser : "") + "
");
+ }
+ else
+ {
+ body.Add("Created: " + DateUtil.Format(DateTime.Now, "d-MMM-yyyy HH:mm") + "
");
+ }
+ if (htmlPanel.DocumentPopulated && htmlPanel.Document != null && htmlPanel.Document.Body != null && false)
+ {
+ htmlPanel.SetDocumentBody(body.Concat("\n"));
+ }
+ else
+ {
+ List html = new List();
+ html.Add("" + GetStyle() + "");
+ html.AddRange(body);
+ html.Add("");
+ htmlPanel.SetDocumentHtml(html.Concat("\n"));
+ htmlPanel.DocumentPopulated = true;
+ }
+ }
+ private String GetStyle ()
+ {
+ List style = new List();
+ style.Add("");
+ return style.Concat("\n");
+ }
+
+ //-------------------------------------------------------------------
+ // C o n t r o l A c t i v i t y
+ //-------------------------------------------------------------------
+ protected override void SetControlActivity ()
+ {
+ SetControlsReadOnly();
+ }
+ protected override void SetControlsReadOnly ()
+ {
+ }
+
+ //-------------------------------------------------------------------
+ }
+ //=======================================================================
+}
diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_UpdateStamp.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_UpdateStamp.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_UpdateStamp.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.Designer.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.Designer.cs
new file mode 100644
index 0000000..4508fa4
--- /dev/null
+++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.Designer.cs
@@ -0,0 +1,23 @@
+namespace Sarand.PatientMgr.Win.Forms.TabPages
+{
+ partial class SpmTabPage_Department
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ components = new System.ComponentModel.Container();
+ }
+
+ #endregion
+ }
+}
diff --git a/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.cs
new file mode 100644
index 0000000..52ecb7c
--- /dev/null
+++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Department.cs
@@ -0,0 +1,240 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Sarand.PatientMgr.Win.Forms.Base;
+using Sarand.PatientMgr.Core.Bus;
+using Sarand.Core.Base;
+using Sarand.PatientMgr.Win.Forms.Panels;
+using Sarand.Win.Forms.UpdateLog;
+using Sarand.Win.Forms.Controls;
+using Sarand.PatientMgr.Win.Forms.Maint;
+using Sarand.PatientMgr.Core.App;
+using Sarand.Core.Bus;
+using Sarand.Win.Forms.Utils;
+
+namespace Sarand.PatientMgr.Win.Forms.TabPages
+{
+ //=======================================================================
+ public partial class SpmTabPage_Department : SpmTabPage
+ {
+ //-------------------------------------------------------------------
+ // Configuration.
+ public enum PanelType
+ {
+ Unknown = 0,
+ // Department properties.
+ Notes,
+ // Department list.
+ Theatres,
+ Clinics,
+ Wards,
+ // Common.
+ Config,
+ Updates,
+ }
+ public new class Config : SpmTabPage.Config
+ {
+ /// Department form hosting the tab control.
+ public SpmForm_Department DepartmentForm { get; set; } = null;
+ /// Panels to display on this tab page.
+ public List PanelTypes { get; } = new List();
+ /// Number of panels on this tab page.
+ public override int PanelCount { get { return PanelTypes.Count; } }
+ }
+
+ //-------------------------------------------------------------------
+ // Data members.
+ private Config config = new Config();
+ private SpmPanel_Facilities panelTheatres = null;
+ private SpmPanel_Facilities panelWards = null;
+ private SpmPanel_Facilities panelClinics = null;
+ private SaPanel_UpdateLog panelUpdates = null;
+
+ //-------------------------------------------------------------------
+ // Construction.
+ public SpmTabPage_Department (Config config) : base(config)
+ {
+ this.config = config;
+ InitializeComponent();
+ }
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ if (components != null) components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ //-------------------------------------------------------------------
+ // Properties.
+ /// Panels to display on this tab page.
+ public List PanelTypes { get { return config.PanelTypes; } }
+
+ //-------------------------------------------------------------------
+ // Initialisation.
+ protected override void OnCreateControl()
+ {
+ base.OnCreateControl();
+ if (this.IsDesignerHosted()) return;
+
+ // Configure page.
+
+ // Initial panels.
+ List panels = new List();
+ foreach (var panelType in config.PanelTypes)
+ {
+ SacsPanel panel = null;
+ switch (panelType)
+ {
+ case PanelType.Theatres:
+ {
+ SpmPanel_Facilities.Config configPanel = new SpmPanel_Facilities.Config();
+ configPanel.Mode = SpmPanel_Facilities.PanelMode.Maintain;
+ configPanel.FacilityType = Spm.FacilityType.Theatre;
+ panelTheatres = new SpmPanel_Facilities(configPanel);
+ panel = panelTheatres;
+ panel.SizeChanged += Panel_Resize;
+ break;
+ }
+ case PanelType.Clinics:
+ {
+ SpmPanel_Facilities.Config configPanel = new SpmPanel_Facilities.Config();
+ configPanel.Mode = SpmPanel_Facilities.PanelMode.Maintain;
+ configPanel.FacilityType = Spm.FacilityType.Clinic;
+ panelClinics = new SpmPanel_Facilities(configPanel);
+ panel = panelClinics;
+ panel.SizeChanged += Panel_Resize;
+ break;
+ }
+ case PanelType.Wards:
+ {
+ SpmPanel_Facilities.Config configPanel = new SpmPanel_Facilities.Config();
+ configPanel.Mode = SpmPanel_Facilities.PanelMode.Maintain;
+ configPanel.FacilityType = Spm.FacilityType.Ward;
+ panelWards = new SpmPanel_Facilities(configPanel);
+ panel = panelWards;
+ panel.SizeChanged += Panel_Resize;
+ break;
+ }
+ case PanelType.Updates:
+ {
+ SaPanel_UpdateLog.Config configPanel = new SaPanel_UpdateLog.Config();
+ configPanel.UpdateLogConsole = UpdateLogConsole;
+ panelUpdates = new SaPanel_UpdateLog();
+ panelUpdates.SetConfig(configPanel);
+ panel = panelUpdates;
+ panel.SizeChanged += Panel_Resize;
+ break;
+ }
+ }
+ if (panel != null)
+ panels.Add(panel);
+ else Logger.Warn(GetType().Name + ".OnCreateControl Panel type not supported: " + panelType.ToString());
+ }
+ AddPanelsToPage(panels);
+
+ // Complete panel initialisation.
+ SetControlsReadOnly();
+ SetControlActivity();
+ }
+
+ //-------------------------------------------------------------------
+ // P a g e I n t e r f a c e
+ //-------------------------------------------------------------------
+
+ //-------------------------------------------------------------------
+ // P o p u l a t i o n
+ //-------------------------------------------------------------------
+ public void PopulateToControls(SpmDepartment.Data data)
+ {
+ if (panelTheatres != null)
+ panelTheatres.DepartmentId = data.Id;
+ if (panelClinics != null)
+ panelClinics.DepartmentId = data.Id;
+ if (panelWards != null)
+ panelWards.DepartmentId = data.Id;
+ if (panelUpdates != null)
+ panelUpdates.ItemId = new ItemId((short)Spm.DataItemType.Department, data.Id);
+ }
+ public bool IsDataValid(SpmDepartment.Data data)
+ {
+ return true;
+ }
+ public void PopulateFromControls(SpmDepartment.Data data)
+ {
+ }
+ public bool UpdateAssociatedData(SpmDepartment.Data data)
+ {
+ return true;
+ }
+
+ //-------------------------------------------------------------------
+ // C o n t r o l A c t i v i t y
+ //-------------------------------------------------------------------
+ protected void SetControlActivity()
+ {
+ if (panelUpdates != null)
+ panelUpdates.Enabled = Enabled;
+ }
+ public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col)
+ {
+ return false;
+ }
+ protected void SetControlsReadOnly()
+ {
+ return;
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l E v e n t s
+ //-------------------------------------------------------------------
+ private void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
+ {
+ InvokeItemCreatedEvent((short)e.ItemType, e.ItemId);
+ }
+ private void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
+ {
+ InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId);
+ }
+ private void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e)
+ {
+ InvokeItemDeletedEvent((short)e.ItemType, e.ItemId);
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l S i z e a n d P o s i t i o n
+ //-------------------------------------------------------------------
+ protected override void PositionControls()
+ {
+ base.PositionControls();
+ Rectangle clientRect = ClientRectangle;
+
+ }
+
+ //-------------------------------------------------------------------
+ }
+
+ //=======================================================================
+ public static class SpmTabPage_DepartmentList
+ {
+ public static void PopulateToControls (this List tabPages, SpmDepartment.Data data)
+ {
+ foreach (SpmTabPage_Department tabPage in tabPages)
+ tabPage.PopulateToControls(data);
+ }
+ public static void PopulateFromControls (this List tabPages, SpmDepartment.Data data)
+ {
+ foreach (SpmTabPage_Department tabPage in tabPages)
+ tabPage.PopulateFromControls(data);
+ }
+ }
+
+ //=======================================================================
+}
diff --git a/SaPatientMgr/App/Consoles/SpmSecurityConsole_App.cs b/SaPatientMgr/App/Consoles/SpmSecurityConsole_App.cs
index 18a2ad8..8b19bc1 100644
--- a/SaPatientMgr/App/Consoles/SpmSecurityConsole_App.cs
+++ b/SaPatientMgr/App/Consoles/SpmSecurityConsole_App.cs
@@ -1,4 +1,5 @@
using Sarand.Core.Bus;
+using Sarand.Core.UpdateLog;
using Sarand.PatientMgr.Core.App;
using Sarand.PatientMgr.Win.Dbas.Consoles;
using Sarand.PatientMgr.Win.Forms.App;
@@ -25,6 +26,10 @@ namespace Sarand.PatientMgr.App.Consoles
{
}
+ //-------------------------------------------------------------------
+ // Properties.
+ public override SaUpdateLogConsole UpdateLogConsole { get { return SpmGlobals.Application.GetUpdateLogConsole(SessionContext); } }
+
//-------------------------------------------------------------------
// Security events.
protected override bool OnLogin (SysId userId)
diff --git a/SaPatientMgr/App/Forms/SaPatientMgrForm.Designer.cs b/SaPatientMgr/App/Forms/SaPatientMgrForm.Designer.cs
index 6cdf2e3..4b43975 100644
--- a/SaPatientMgr/App/Forms/SaPatientMgrForm.Designer.cs
+++ b/SaPatientMgr/App/Forms/SaPatientMgrForm.Designer.cs
@@ -16,11 +16,12 @@
private void InitializeComponent ()
{
this.buttonGenerateDbDfn = new System.Windows.Forms.Button();
+ this.panelScheduleControl = new Sarand.PatientMgr.App.Panels.SpmPanel_ScheduleControl();
this.SuspendLayout();
//
// buttonGenerateDbDfn
//
- this.buttonGenerateDbDfn.Location = new System.Drawing.Point(58, 63);
+ this.buttonGenerateDbDfn.Location = new System.Drawing.Point(271, 104);
this.buttonGenerateDbDfn.Name = "buttonGenerateDbDfn";
this.buttonGenerateDbDfn.Size = new System.Drawing.Size(100, 23);
this.buttonGenerateDbDfn.TabIndex = 0;
@@ -28,14 +29,27 @@
this.buttonGenerateDbDfn.UseVisualStyleBackColor = true;
this.buttonGenerateDbDfn.Click += new System.EventHandler(this.buttonGenerateDbDfn_Click);
//
+ // panelScheduleControl
+ //
+ this.panelScheduleControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)));
+ this.panelScheduleControl.Location = new System.Drawing.Point(9, 9);
+ this.panelScheduleControl.MainForm = null;
+ this.panelScheduleControl.Margin = new System.Windows.Forms.Padding(0);
+ this.panelScheduleControl.Name = "panelScheduleControl";
+ this.panelScheduleControl.Size = new System.Drawing.Size(147, 543);
+ this.panelScheduleControl.TabIndex = 1;
+ //
// SaPatientMgrForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
+ this.ClientSize = new System.Drawing.Size(784, 561);
+ this.Controls.Add(this.panelScheduleControl);
this.Controls.Add(this.buttonGenerateDbDfn);
+ this.MinimumSize = new System.Drawing.Size(800, 600);
this.Name = "SaPatientMgrForm";
- this.Text = "Form1";
+ this.Text = "Sarand Patient Manager";
this.ResumeLayout(false);
}
@@ -43,6 +57,7 @@
#endregion
private System.Windows.Forms.Button buttonGenerateDbDfn;
+ private Panels.SpmPanel_ScheduleControl panelScheduleControl;
}
}
diff --git a/SaPatientMgr/App/Forms/SaPatientMgrForm.cs b/SaPatientMgr/App/Forms/SaPatientMgrForm.cs
index 63e95cd..8c009cd 100644
--- a/SaPatientMgr/App/Forms/SaPatientMgrForm.cs
+++ b/SaPatientMgr/App/Forms/SaPatientMgrForm.cs
@@ -64,6 +64,10 @@ namespace Sarand.PatientMgr.App.Forms
base.OnCreateControl();
if (this.IsDesignerHosted()) return;
+ // Configure schedule control panel.
+ panelScheduleControl.MainForm = this;
+
+ SetControlActivity();
}
protected override void OnShown (EventArgs e)
{
@@ -92,6 +96,11 @@ namespace Sarand.PatientMgr.App.Forms
else MessageBox.Show("Database definition not generated.\n\n"+result.ErrorMessage, "Database Definition", MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
+ private void spmPanel_ScheduleControl1_Load (object sender, EventArgs e)
+ {
+
+ }
+
//-------------------------------------------------------------------
}
//=======================================================================
diff --git a/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.Designer.cs b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.Designer.cs
new file mode 100644
index 0000000..0c0176a
--- /dev/null
+++ b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.Designer.cs
@@ -0,0 +1,84 @@
+namespace Sarand.PatientMgr.App.Panels
+{
+ partial class SpmPanel_ScheduleControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent ()
+ {
+ this.buttonConfig = new Sarand.Win.Forms.Controls.SacsButton();
+ this.buttonMinimise = new Sarand.Win.Forms.Controls.SacsButton();
+ this.buttonExit = new Sarand.Win.Forms.Controls.SacsButton();
+ this.buttonSetup = new Sarand.Win.Forms.Controls.SacsButton();
+ this.SuspendLayout();
+ //
+ // buttonConfig
+ //
+ this.buttonConfig.Location = new System.Drawing.Point(42, 195);
+ this.buttonConfig.Name = "buttonConfig";
+ this.buttonConfig.Size = new System.Drawing.Size(75, 23);
+ this.buttonConfig.TabIndex = 0;
+ this.buttonConfig.Text = "Config";
+ this.buttonConfig.UseVisualStyleBackColor = true;
+ this.buttonConfig.Click += new System.EventHandler(this.buttonConfig_Click);
+ //
+ // buttonMinimise
+ //
+ this.buttonMinimise.Location = new System.Drawing.Point(42, 253);
+ this.buttonMinimise.Name = "buttonMinimise";
+ this.buttonMinimise.Size = new System.Drawing.Size(75, 23);
+ this.buttonMinimise.TabIndex = 1;
+ this.buttonMinimise.Text = "Minimise";
+ this.buttonMinimise.UseVisualStyleBackColor = true;
+ //
+ // buttonExit
+ //
+ this.buttonExit.Location = new System.Drawing.Point(42, 282);
+ this.buttonExit.Name = "buttonExit";
+ this.buttonExit.Size = new System.Drawing.Size(75, 23);
+ this.buttonExit.TabIndex = 2;
+ this.buttonExit.Text = "Exit";
+ this.buttonExit.UseVisualStyleBackColor = true;
+ this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);
+ //
+ // buttonSetup
+ //
+ this.buttonSetup.Location = new System.Drawing.Point(42, 3);
+ this.buttonSetup.Name = "buttonSetup";
+ this.buttonSetup.Size = new System.Drawing.Size(75, 23);
+ this.buttonSetup.TabIndex = 3;
+ this.buttonSetup.Text = "Setup";
+ this.buttonSetup.UseVisualStyleBackColor = true;
+ //
+ // SpmPanel_ScheduleControl
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.buttonSetup);
+ this.Controls.Add(this.buttonExit);
+ this.Controls.Add(this.buttonMinimise);
+ this.Controls.Add(this.buttonConfig);
+ this.Margin = new System.Windows.Forms.Padding(0);
+ this.Name = "SpmPanel_ScheduleControl";
+ this.Size = new System.Drawing.Size(151, 358);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Sarand.Win.Forms.Controls.SacsButton buttonConfig;
+ private Sarand.Win.Forms.Controls.SacsButton buttonMinimise;
+ private Sarand.Win.Forms.Controls.SacsButton buttonExit;
+ private Sarand.Win.Forms.Controls.SacsButton buttonSetup;
+ }
+}
diff --git a/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.cs b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.cs
new file mode 100644
index 0000000..238cdb7
--- /dev/null
+++ b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.cs
@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Sarand.Win.Forms.Utils;
+using Sarand.PatientMgr.Win.Forms.Base;
+using Sarand.PatientMgr.App.Forms;
+using Sarand.PatientMgr.Win.Forms.App;
+using Sarand.PatientMgr.Win.Forms.Config;
+
+namespace Sarand.PatientMgr.App.Panels
+{
+ //=======================================================================
+ public partial class SpmPanel_ScheduleControl : SpmPanel
+ {
+ //-------------------------------------------------------------------
+ // Configuration.
+ public new class Config : SpmPanel.Config
+ {
+ }
+
+ //-------------------------------------------------------------------
+ // Data members.
+ private Config config = null;
+
+ //-------------------------------------------------------------------
+ // Construction.
+ public SpmPanel_ScheduleControl ()
+ {
+ InitializeComponent();
+ }
+ protected override void Dispose (bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ //-------------------------------------------------------------------
+ // Properties.
+ public SaPatientMgrForm MainForm { get; set; }
+
+ //-------------------------------------------------------------------
+ // I n i t i a l i s a t i o n
+ //-------------------------------------------------------------------
+ protected override void OnCreateControl ()
+ {
+ base.OnCreateControl();
+ if (this.IsDesignerHosted()) return;
+
+ SetControlActivity();
+ }
+
+ //-------------------------------------------------------------------
+ // C o n t r o l A c t i v i t y
+ //-------------------------------------------------------------------
+ protected override void SetControlActivity ()
+ {
+ SetControlsReadOnly();
+ }
+ protected override void SetControlsReadOnly ()
+ {
+ }
+
+ //-------------------------------------------------------------------
+ // P a n e l E v e n t s
+ //-------------------------------------------------------------------
+ private void buttonConfig_Click (object sender, EventArgs e)
+ {
+ SpmForm_Config.Config formConfig = new SpmForm_Config.Config();
+ using (SpmForm_Config form = new SpmForm_Config(formConfig))
+ {
+ if (form.ShowDialog() == DialogResult.OK)
+ {
+ // ToDo Refresh schedule view.
+ }
+ }
+ }
+ private void buttonExit_Click (object sender, EventArgs e)
+ {
+ MainForm.Close();
+ }
+
+ //-------------------------------------------------------------------
+ }
+ //=======================================================================
+}
diff --git a/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.resx b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/SaPatientMgr/App/Panels/SpmPanel_ScheduleControl.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/SaPatientMgr/App/SaPatientMgrApp.cs b/SaPatientMgr/App/SaPatientMgrApp.cs
index 20c3c91..ce69719 100644
--- a/SaPatientMgr/App/SaPatientMgrApp.cs
+++ b/SaPatientMgr/App/SaPatientMgrApp.cs
@@ -57,6 +57,9 @@ namespace Sarand.PatientMgr.App
SessionContext = new SpmSessionContext_Desktop(0, Site);
InitGlobals();
//SpmGlobals.DbConsole.VerifyDatabaseSchema();
+
+ // Login the current windows user.
+ SpmGlobals.Application.GetSecurityConsole(SessionContext).LoginAuthenticatedUser();
}
public void Dispose ()
{
@@ -120,6 +123,8 @@ namespace Sarand.PatientMgr.App
//-------------------------------------------------------------------
private void DeinitGlobals ()
{
+ if (SpmGlobals_Win.SessionProfile != null)
+ SpmGlobals_Win.SessionProfile.StoreProperties();
SpmGlobals.clear();
}
diff --git a/SaPatientMgr/App/SpmApplication_Desktop.cs b/SaPatientMgr/App/SpmApplication_Desktop.cs
index a0d6a6e..277fe20 100644
--- a/SaPatientMgr/App/SpmApplication_Desktop.cs
+++ b/SaPatientMgr/App/SpmApplication_Desktop.cs
@@ -40,11 +40,23 @@ namespace Sarand.PatientMgr.App
{
return Database;
}
+ public override bool TableExists (SpmSessionContext sessionContext, SpmDbDfn.TableIdx tableIdx)
+ {
+ SacsDatabase database = GetDatabase(sessionContext) as SacsDatabase;
+ if (database != null)
+ {
+ String tablename = SpmDbDfn.GetTableName(tableIdx, false);
+ DbDfnTable table = database.GetTableDfn(tablename);
+ if (table != null)
+ return true;
+ }
+ return false;
+ }
public override bool ColumnExists (SpmSessionContext sessionContext, SpmDbDfn.ColumnIdx columnIdx)
{
ISacsDatabase database = GetDatabase(sessionContext);
if (database != null)
- return database.ColumnExists(SpmDbDfn.GetTableName(SpmDbDfn.GetTableForColumn(columnIdx)), SpmDbDfn.GetColumnName(columnIdx));
+ return database.ColumnExists(SpmDbDfn.GetTableName(SpmDbDfn.GetTableForColumn(columnIdx),false), SpmDbDfn.GetColumnName(columnIdx,false));
return false;
}
diff --git a/SaPatientMgr/SaPatientMgr.csproj b/SaPatientMgr/SaPatientMgr.csproj
index f75c8cf..25e3018 100644
--- a/SaPatientMgr/SaPatientMgr.csproj
+++ b/SaPatientMgr/SaPatientMgr.csproj
@@ -58,6 +58,12 @@
SaPatientMgrForm.cs
+
+ UserControl
+
+
+ SpmPanel_ScheduleControl.cs
+
@@ -67,6 +73,9 @@
SaPatientMgrForm.cs
+
+ SpmPanel_ScheduleControl.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
@@ -90,9 +99,7 @@
-
-
-
+
{7528f88e-a24d-4d6b-be6c-9d5fb14f0cb5}