From 15541b77aa50ea090632f2a8d46e0830d8a879cd Mon Sep 17 00:00:00 2001 From: sbrignell Date: Thu, 20 Jun 2019 14:49:34 +0100 Subject: [PATCH] SB 20-Jun-2019 --- SaPatMgrCore/Core/App/SpmInternals.cs | 3 +- SaPatMgrCore/Core/App/SpmUserContext.cs | 2 + SaPatMgrWinForms/SaPatMgrWinForms.csproj | 265 ++++++- .../Win/Forms/Base/SpmForm.Designer.cs | 26 + SaPatMgrWinForms/Win/Forms/Base/SpmForm.cs | 79 ++ .../Win/Forms/Base/SpmForm_Item.Designer.cs | 26 + .../Win/Forms/Base/SpmForm_Item.cs | 52 ++ .../Win/Forms/Base/SpmGroupBox.Designer.cs | 23 + .../Win/Forms/Base/SpmGroupBox.cs | 61 ++ SaPatMgrWinForms/Win/Forms/Base/SpmPanel.cs | 7 +- .../Win/Forms/Base/SpmTabPage.Designer.cs | 23 + SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.cs | 210 +++++ .../Controls/SpmContextMenuStrip.Designer.cs | 23 + .../Win/Forms/Controls/SpmContextMenuStrip.cs | 36 + .../SpmItemListFilter_Admission.Designer.cs | 5 + .../Filters/SpmItemListFilter_Admission.cs | 11 + ...ItemListFilter_AdmissionAction.Designer.cs | 5 + .../SpmItemListFilter_AdmissionAction.cs | 12 + ...pmItemListFilter_AdmissionData.Designer.cs | 5 + .../SpmItemListFilter_AdmissionData.cs | 11 + ...pmItemListFilter_AdmissionRole.Designer.cs | 5 + .../SpmItemListFilter_AdmissionRole.cs | 11 + .../SpmItemListFilter_Department.Designer.cs | 5 + .../Filters/SpmItemListFilter_Department.cs | 11 + .../SpmItemListFilter_Employee.Designer.cs | 5 + .../Filters/SpmItemListFilter_Employee.cs | 11 + ...SpmItemListFilter_EmployeeRole.Designer.cs | 5 + .../Filters/SpmItemListFilter_EmployeeRole.cs | 11 + .../SpmItemListFilter_Facility.Designer.cs | 5 + .../Filters/SpmItemListFilter_Facility.cs | 11 + ...ItemListFilter_FacilitySession.Designer.cs | 5 + .../SpmItemListFilter_FacilitySession.cs | 11 + ...temListFilter_FacilityTemplate.Designer.cs | 5 + .../SpmItemListFilter_FacilityTemplate.cs | 11 + .../SpmItemListFilter_Institution.Designer.cs | 5 + .../Filters/SpmItemListFilter_Institution.cs | 11 + .../SpmItemListFilter_Operation.Designer.cs | 5 + .../Filters/SpmItemListFilter_Operation.cs | 11 + .../SpmItemListFilter_Patient.Designer.cs | 5 + .../Filters/SpmItemListFilter_Patient.cs | 11 + .../SpmItemListFilter_Procedure.Designer.cs | 5 + .../Filters/SpmItemListFilter_Procedure.cs | 11 + ...SpmItemListFilter_TemplateData.Designer.cs | 5 + .../Filters/SpmItemListFilter_TemplateData.cs | 11 + .../Forms/Maint/SpmForm_Admission.Designer.cs | 124 +++ .../Win/Forms/Maint/SpmForm_Admission.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Admission.resx | 120 +++ .../Maint/SpmForm_Department.Designer.cs | 302 +++++++ .../Win/Forms/Maint/SpmForm_Department.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Department.resx | 120 +++ .../Forms/Maint/SpmForm_Employee.Designer.cs | 236 ++++++ .../Win/Forms/Maint/SpmForm_Employee.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Employee.resx | 120 +++ .../Maint/SpmForm_EmployeeRole.Designer.cs | 241 ++++++ .../Win/Forms/Maint/SpmForm_EmployeeRole.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_EmployeeRole.resx | 120 +++ .../Forms/Maint/SpmForm_Facility.Designer.cs | 220 ++++++ .../Win/Forms/Maint/SpmForm_Facility.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Facility.resx | 120 +++ .../Maint/SpmForm_FacilitySession.Designer.cs | 26 + .../Forms/Maint/SpmForm_FacilitySession.cs | 56 ++ ...SpmForm_FacilitySession_Clinic.Designer.cs | 735 ++++++++++++++++++ .../Maint/SpmForm_FacilitySession_Clinic.cs | 161 ++++ .../Maint/SpmForm_FacilitySession_Clinic.resx | 120 +++ ...pmForm_FacilitySession_Theatre.Designer.cs | 395 ++++++++++ .../Maint/SpmForm_FacilitySession_Theatre.cs | 161 ++++ .../SpmForm_FacilitySession_Theatre.resx | 120 +++ .../SpmForm_FacilitySession_Ward.Designer.cs | 231 ++++++ .../Maint/SpmForm_FacilitySession_Ward.cs | 161 ++++ .../Maint/SpmForm_FacilitySession_Ward.resx | 120 +++ .../SpmForm_FacilityTemplate.Designer.cs | 26 + .../Forms/Maint/SpmForm_FacilityTemplate.cs | 56 ++ ...pmForm_FacilityTemplate_Clinic.Designer.cs | 541 +++++++++++++ .../Maint/SpmForm_FacilityTemplate_Clinic.cs | 161 ++++ .../SpmForm_FacilityTemplate_Clinic.resx | 120 +++ .../SpmForm_FacilityTemplate_Slot.Designer.cs | 290 +++++++ .../Maint/SpmForm_FacilityTemplate_Slot.cs | 161 ++++ .../Maint/SpmForm_FacilityTemplate_Slot.resx | 120 +++ ...mForm_FacilityTemplate_Theatre.Designer.cs | 377 +++++++++ .../Maint/SpmForm_FacilityTemplate_Theatre.cs | 161 ++++ .../SpmForm_FacilityTemplate_Theatre.resx | 120 +++ .../SpmForm_FacilityTemplate_Ward.Designer.cs | 317 ++++++++ .../Maint/SpmForm_FacilityTemplate_Ward.cs | 161 ++++ .../Maint/SpmForm_FacilityTemplate_Ward.resx | 120 +++ .../Forms/Maint/SpmForm_Operation.Designer.cs | 155 ++++ .../Win/Forms/Maint/SpmForm_Operation.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Operation.resx | 120 +++ .../Forms/Maint/SpmForm_Patient.Designer.cs | 262 +++++++ .../Win/Forms/Maint/SpmForm_Patient.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Patient.resx | 120 +++ .../Forms/Maint/SpmForm_Procedure.Designer.cs | 356 +++++++++ .../Win/Forms/Maint/SpmForm_Procedure.cs | 162 ++++ .../Win/Forms/Maint/SpmForm_Procedure.resx | 120 +++ .../Panels/SpmPanel_Departments.Designer.cs | 142 ++++ .../Win/Forms/Panels/SpmPanel_Departments.cs | 347 +++++++++ .../Forms/Panels/SpmPanel_Departments.resx | 120 +++ .../Panels/SpmPanel_EmployeeRoles.Designer.cs | 142 ++++ .../Forms/Panels/SpmPanel_EmployeeRoles.cs | 348 +++++++++ .../Forms/Panels/SpmPanel_EmployeeRoles.resx | 120 +++ .../Panels/SpmPanel_Facilities.Designer.cs | 142 ++++ .../Win/Forms/Panels/SpmPanel_Facilities.cs | 348 +++++++++ .../Win/Forms/Panels/SpmPanel_Facilities.resx | 120 +++ .../SpmPanel_FacilitySessions.Designer.cs | 142 ++++ .../Forms/Panels/SpmPanel_FacilitySessions.cs | 348 +++++++++ .../Panels/SpmPanel_FacilitySessions.resx | 120 +++ .../SpmPanel_FacilityTemplates.Designer.cs | 142 ++++ .../Panels/SpmPanel_FacilityTemplates.cs | 348 +++++++++ .../Panels/SpmPanel_FacilityTemplates.resx | 120 +++ .../Forms/Panels/SpmPanel_Items.Designer.cs | 24 + .../Win/Forms/Panels/SpmPanel_Items.cs | 197 +++++ .../Panels/SpmPanel_Procedures.Designer.cs | 142 ++++ .../Win/Forms/Panels/SpmPanel_Procedures.cs | 348 +++++++++ .../Win/Forms/Panels/SpmPanel_Procedures.resx | 120 +++ .../TabPages/SpmTabPage_Admission.Designer.cs | 23 + .../Forms/TabPages/SpmTabPage_Admission.cs | 178 +++++ .../TabPages/SpmTabPage_Facility.Designer.cs | 23 + .../Win/Forms/TabPages/SpmTabPage_Facility.cs | 178 +++++ .../SpmTabPage_FacilitySession.Designer.cs | 23 + .../TabPages/SpmTabPage_FacilitySession.cs | 178 +++++ .../SpmTabPage_FacilityTemplate.Designer.cs | 23 + .../TabPages/SpmTabPage_FacilityTemplate.cs | 178 +++++ 121 files changed, 14923 insertions(+), 7 deletions(-) create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmForm.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmForm.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.resx create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.cs create mode 100644 SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.resx create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.Designer.cs create mode 100644 SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.cs diff --git a/SaPatMgrCore/Core/App/SpmInternals.cs b/SaPatMgrCore/Core/App/SpmInternals.cs index 36459cf..4fe1aaa 100644 --- a/SaPatMgrCore/Core/App/SpmInternals.cs +++ b/SaPatMgrCore/Core/App/SpmInternals.cs @@ -1,5 +1,6 @@ using Sarand.Core.Base; using Sarand.Core.CodeTypes; +using Sarand.Core.Dbas.Base; using Sarand.Core.Interfaces; using Sarand.Core.ItemDocs; using Sarand.Core.ItemOptions; @@ -53,7 +54,7 @@ namespace Sarand.PatientMgr.Core.App public SpmUserContext UserContext { get; } public SpmSessionContext SessionContext { get { return UserContext.SessionContext; } } public SpmSecurityProfile SecurityProfile { get { return UserContext.SecurityProfile; } } - + public DbUpdateInfo DbUpdateInfo { get { return UserContext.DbUpdateInfo; } } //------------------------------------------------------------------- // Managers. diff --git a/SaPatMgrCore/Core/App/SpmUserContext.cs b/SaPatMgrCore/Core/App/SpmUserContext.cs index e164a17..1551c52 100644 --- a/SaPatMgrCore/Core/App/SpmUserContext.cs +++ b/SaPatMgrCore/Core/App/SpmUserContext.cs @@ -1,4 +1,5 @@ using Sarand.Core.Bus; +using Sarand.Core.Dbas.Base; using System; using System.Collections.Generic; using System.Text; @@ -30,6 +31,7 @@ namespace Sarand.PatientMgr.Core.App public SpmSessionContext SessionContext { get; } public UserData User { get; } = new UserData(); public SpmSecurityProfile SecurityProfile { get; } = new SpmSecurityProfile(false); + public DbUpdateInfo DbUpdateInfo { get; private set; } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/SaPatMgrWinForms.csproj b/SaPatMgrWinForms/SaPatMgrWinForms.csproj index ec38b9d..a213ca5 100644 --- a/SaPatMgrWinForms/SaPatMgrWinForms.csproj +++ b/SaPatMgrWinForms/SaPatMgrWinForms.csproj @@ -45,6 +45,36 @@ + + Form + + + SpmForm.cs + + + Form + + + SpmForm_Item.cs + + + Component + + + SpmGroupBox.cs + + + Component + + + SpmTabPage.cs + + + Component + + + SpmContextMenuStrip.cs + Component @@ -243,6 +273,174 @@ SpmPanel.cs + + Form + + + SpmForm_Admission.cs + + + Form + + + SpmForm_FacilitySession.cs + + + Form + + + SpmForm_FacilitySession_Clinic.cs + + + Form + + + SpmForm_FacilitySession_Theatre.cs + + + Form + + + SpmForm_FacilitySession_Ward.cs + + + Form + + + SpmForm_FacilityTemplate.cs + + + Form + + + SpmForm_FacilityTemplate_Slot.cs + + + Form + + + SpmForm_EmployeeRole.cs + + + Form + + + SpmForm_FacilityTemplate_Clinic.cs + + + Form + + + SpmForm_FacilityTemplate_Theatre.cs + + + Form + + + SpmForm_FacilityTemplate_Ward.cs + + + Form + + + SpmForm_Operation.cs + + + Form + + + SpmForm_Patient.cs + + + Form + + + SpmForm_Procedure.cs + + + Form + + + SpmForm_Employee.cs + + + Form + + + SpmForm_Facility.cs + + + Form + + + SpmForm_Department.cs + + + UserControl + + + SpmPanel_Departments.cs + + + UserControl + + + SpmPanel_EmployeeRoles.cs + + + UserControl + + + SpmPanel_Facilities.cs + + + UserControl + + + SpmPanel_FacilitySessions.cs + + + UserControl + + + SpmPanel_FacilityTemplates.cs + + + UserControl + + + SpmPanel_Items.cs + + + UserControl + + + SpmPanel_Procedures.cs + + + Component + + + SpmTabPage_Admission.cs + + + Component + + + SpmTabPage_Facility.cs + + + Component + + + SpmTabPage_FacilitySession.cs + + + Component + + + SpmTabPage_FacilityTemplate.cs + @@ -262,11 +460,7 @@ - - - - @@ -316,6 +510,69 @@ SpmItemListFilter_Admission.cs + + SpmForm_Admission.cs + + + SpmForm_EmployeeRole.cs + + + SpmForm_FacilitySession_Clinic.cs + + + SpmForm_FacilitySession_Theatre.cs + + + SpmForm_FacilitySession_Ward.cs + + + SpmForm_FacilityTemplate_Clinic.cs + + + SpmForm_FacilityTemplate_Slot.cs + + + SpmForm_FacilityTemplate_Theatre.cs + + + SpmForm_FacilityTemplate_Ward.cs + + + SpmForm_Operation.cs + + + SpmForm_Patient.cs + + + SpmForm_Procedure.cs + + + SpmForm_Employee.cs + + + SpmForm_Facility.cs + + + SpmForm_Department.cs + + + SpmPanel_Departments.cs + + + SpmPanel_EmployeeRoles.cs + + + SpmPanel_Facilities.cs + + + SpmPanel_FacilitySessions.cs + + + SpmPanel_FacilityTemplates.cs + + + SpmPanel_Procedures.cs + \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmForm.Designer.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmForm.Designer.cs new file mode 100644 index 0000000..44ae0a0 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmForm.Designer.cs @@ -0,0 +1,26 @@ +namespace Sarand.PatientMgr.Win.Forms.Base +{ + partial class SpmForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "SpmForm"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmForm.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmForm.cs new file mode 100644 index 0000000..f3b9e2e --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmForm.cs @@ -0,0 +1,79 @@ +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; } } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.Designer.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.Designer.cs new file mode 100644 index 0000000..46be4c1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.Designer.cs @@ -0,0 +1,26 @@ +namespace Sarand.PatientMgr.Win.Forms.Base +{ + partial class SpmForm_Item + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "SpmForm_Item"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.cs new file mode 100644 index 0000000..08f1ccd --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmForm_Item.cs @@ -0,0 +1,52 @@ +using Sarand.Core.Bus; +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_Item : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = null; + + //------------------------------------------------------------------- + // Construction. + private SpmForm_Item() : this(new Config()) { } + protected SpmForm_Item(Config config) : base(config) + { + this.config = config; + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public SysId NewItemId { get; protected set; } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.Designer.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.Designer.cs new file mode 100644 index 0000000..60d9020 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.Base +{ + partial class SpmGroupBox + { + /// + /// 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/Base/SpmGroupBox.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.cs new file mode 100644 index 0000000..b676829 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmGroupBox.cs @@ -0,0 +1,61 @@ +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.Controls; +using Sarand.Win.Forms.Utils; + +namespace Sarand.PatientMgr.Win.Forms.Base +{ + //======================================================================= + public partial class SpmGroupBox : SacsGroupBox + { + //------------------------------------------------------------------- + // Data members. + + //------------------------------------------------------------------- + // Construction. + public SpmGroupBox() + { + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Assign current font to all child controls so that they don't use the new font. + Font fontControls = this.Font; + foreach (Control control in Controls) + if (control.Font == null || control.Font == fontControls) control.Font = fontControls; + + // Default font settings. + Font fontGroupBox = new Font(fontControls.FontFamily, 10.0f, FontStyle.Bold); + this.Font = fontGroupBox; + + Rectangle displayRectangle = DisplayRectangle; + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmPanel.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmPanel.cs index 25680cc..512a49c 100644 --- a/SaPatMgrWinForms/Win/Forms/Base/SpmPanel.cs +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmPanel.cs @@ -15,15 +15,16 @@ using Sarand.Core.Security; using Sarand.Core.CodeTypes; using Sarand.Core.ItemOptions; using Sarand.Core.UpdateLog; +using Sarand.Core.Dbas.Base; namespace Sarand.PatientMgr.Win.Forms.Base { //======================================================================= - public partial class SpmPanel : SacsChildPanel + public partial class SpmPanel : SacsPanel { //------------------------------------------------------------------- // Configuration. - public new class Config : SacsChildPanel.Config + public new class Config : SacsPanel.Config { } @@ -58,12 +59,14 @@ namespace Sarand.PatientMgr.Win.Forms.Base 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); } } + protected DbUpdateInfo DbUpdateInfo { get { return internals.DbUpdateInfo; } } // 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; } } diff --git a/SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.Designer.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.Designer.cs new file mode 100644 index 0000000..d5a802a --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.Base +{ + partial class SpmTabPage + { + /// + /// 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/Base/SpmTabPage.cs b/SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.cs new file mode 100644 index 0000000..4fdf6a5 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Base/SpmTabPage.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +using Sarand.Core.UpdateLog; +using Sarand.Core.CodeTypes; +using Sarand.Win.Forms.Controls; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.App; +using Sarand.Core.Base; +using Sarand.Core.Interfaces; +using Sarand.Core.Dbas.Base; +using Sarand.PatientMgr.Win.Forms.Panels; +using Sarand.Win.Forms.Utils; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Core.Mgr; +using Sarand.Core.Security; +using Sarand.Core.ItemDocs; +using Sarand.Core.ItemOptions; + +namespace Sarand.PatientMgr.Win.Forms.Base +{ + //======================================================================= + public partial class SpmTabPage : SacsTabPage + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SacsTabPage.Config + { + /// Wrap single panel on tab page in group box. Default - no group box for single panel. + public virtual bool WrapSinglePanelInGroupBox { get; protected set; } = false; + /// Wrap multiple panels on tab page in group boxes. Default - multiple panels are wrapped in group boxes. + public virtual bool WrapMultiplePanelsInGroupBoxes { get; protected set; } = true; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + private readonly SpmInternals internals; + + //------------------------------------------------------------------- + // Construction. + private SpmTabPage() : this(new Config()) { } + protected SpmTabPage(Config config) : base(config) + { + this.config = config; + InitializeComponent(); + internals = new SpmInternals(SessionProfile != null ? SessionProfile.UserContext : null); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + if (components != null) components.Dispose(); + if (internals != null) internals.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public bool PanelsAddedToPage { get; private set; } = false; + protected bool WrapPanelsInGroupBoxes { get { return (config.PanelCount == 1 && config.WrapSinglePanelInGroupBox) || (config.PanelCount > 1 && config.WrapMultiplePanelsInGroupBoxes); } } + // Session. + protected SpmSessionProfile_Win SessionProfile { get; } = SpmGlobals_Win.SessionProfile; + protected SpmUserContext UserContext { get { return SessionProfile.UserContext; } } + protected SpmSessionContext SessionContext { get { return SessionProfile.SessionContext; } } + + // 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; } } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (!this.IsDesignerHosted()) return; + } + + //------------------------------------------------------------------- + // P a n e l s + //------------------------------------------------------------------- + protected void AddPanelsToPage(List panels) + { + if (Controls.Count > 0) throw new NotSupportedException(GetType().Name + ".AddPanelsToPage TabPage already contains controls"); + + // Adjust width from default (maybe as little as 200) to parent's width to ensure panels with minimum width are sized correctly. + int initialWidth = Parent.Width - (Parent.Padding.Left + Parent.Padding.Right) - (Margin.Left + Margin.Right); + if (Width < initialWidth) + Width = initialWidth; + + int panelTop = Parent.Padding.Top; + int tabIndex = 0; + foreach (SacsPanel panel in panels) + { + if (WrapPanelsInGroupBoxes) + { + // Group box. + SpmGroupBox groupBox = new SpmGroupBox(); + groupBox.Text = panel.Text; + groupBox.TabIndex = ++tabIndex; + PositionPanel(groupBox, panelTop); + Controls.Add(groupBox); + // Explicitly set the panel's font to avoid group box's font cascading. + panel.Font = this.Font; + // Add panel to group box's controls and resize. + panel.Top = groupBox.DisplayRectangle.Top + panel.Margin.Top; + panel.Left = groupBox.DisplayRectangle.Left + panel.Margin.Left; + panel.Width = groupBox.DisplayRectangle.Width - panel.Left - panel.Margin.Right; + if (config.PanelCount == 1) + { + panel.Height = groupBox.DisplayRectangle.Bottom - panel.Top - panel.Margin.Bottom; + panel.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; + } + else + panel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + groupBox.Controls.Add(panel); + groupBox.SetHeightToControls(); + panelTop += groupBox.Height + groupBox.Margin.Bottom; + //Logger.Trace(GetType().Name + ".AddPanelsToPage GroupBox: " + groupBox.GetType().Name + " . Width: " + groupBox.Width); + //Logger.Trace(GetType().Name + ".AddPanelsToPage Panel: " + panel.GetType().Name + " . Width: " + panel.Width); + } + else + { + // Position panel. + panel.TabIndex = ++tabIndex; + PositionPanel(panel, panelTop); + panelTop += panel.Height + panel.Margin.Bottom; + panelTop += panel.Height + panel.Margin.Bottom; + Controls.Add(panel); + } + } + PanelsAddedToPage = true; + } + + //------------------------------------------------------------------- + // P a n e l S i z e a n d P o s i t i o n + //------------------------------------------------------------------- + protected override void PositionControls() + { + //String fn = GetType().Name + ".PositionControls"; + base.PositionControls(); + Rectangle clientRect = ClientRectangle; + PositionPanels(); + } + protected void PositionPanel(Control panel, int panelTop) + { + panel.Top = panelTop + panel.Margin.Top; + panel.Left = (Parent.Padding.Left + panel.Margin.Left); + panel.Width = ClientSize.Width - panel.Left - (Parent.Padding.Right + panel.Margin.Right); + // Single panel fills page. + if (config.PanelCount == 1) + panel.Dock = DockStyle.Fill; + else + panel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; + } + protected void PositionPanels() + { + if (!PanelsAddedToPage) return; + //Logger.Trace(GetType().Name + ".PositionPanels"); + int panelTop = Parent.Padding.Top; + + // Refresh each panel's position. + foreach (Control panel in Controls) + { + PositionPanel(panel, panelTop); + panelTop += panel.Height + panel.Margin.Bottom; + } + } + + //------------------------------------------------------------------- + // P a n e l E v e n t s + //------------------------------------------------------------------- + protected void Panel_Resize(object sender, EventArgs e) + { + if (!PanelsAddedToPage) return; + //Logger.Trace(GetType().Name + ".Panel_Resize Sender: " + sender.ToString()); + PositionControls(); + } + protected virtual void panel_ItemCreated(object sender, SpmPanel_Items.ItemModifiedEventArgs e) + { + InvokeItemCreatedEvent((short)e.ItemType, e.ItemId); + } + protected virtual void panel_ItemUpdated(object sender, SpmPanel_Items.ItemModifiedEventArgs e) + { + InvokeItemUpdatedEvent((short)e.ItemType, e.ItemId); + } + protected virtual void panel_ItemDeleted(object sender, SpmPanel_Items.ItemModifiedEventArgs e) + { + InvokeItemDeletedEvent((short)e.ItemType, e.ItemId); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.Designer.cs b/SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.Designer.cs new file mode 100644 index 0000000..891299b --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.Controls +{ + partial class SpmContextMenuStrip + { + /// + /// 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/Controls/SpmContextMenuStrip.cs b/SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.cs new file mode 100644 index 0000000..a3503c8 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Controls/SpmContextMenuStrip.cs @@ -0,0 +1,36 @@ +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.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Controls +{ + //======================================================================= + public partial class SpmContextMenuStrip : SacsContextMenuStrip + { + //------------------------------------------------------------------- + // Construction. + public SpmContextMenuStrip() + { + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.Designer.cs index d76f05c..4ef2732 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Admission // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.cs index 7fece54..651e0ef 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Admission.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.Designer.cs index 348cb13..a93831d 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_AdmissionAction // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.cs index 6acdf0e..96ad5e7 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionAction.cs @@ -120,6 +120,18 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.Designer.cs index 9dc7b91..41f2418 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_AdmissionData // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.cs index 36252f0..004c150 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionData.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.Designer.cs index 465b31e..84e70ee 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_AdmissionRole // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.cs index 38344a8..7d238f8 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_AdmissionRole.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.Designer.cs index 36a4426..0cd0f14 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Department // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.cs index 67a793c..381742b 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Department.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.Designer.cs index 7b9a104..f8c0b0c 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Employee // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.cs index e99a9de..4bdee9a 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Employee.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.Designer.cs index 3b67e41..052dd81 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_EmployeeRole // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.cs index 3d9ea4e..712fdc0 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_EmployeeRole.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.Designer.cs index c213d78..f99c122 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Facility // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.cs index afb379a..a3b9ef2 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Facility.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.Designer.cs index 8c5f517..6773225 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_FacilitySession // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.cs index b71e038..e5af99b 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilitySession.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.Designer.cs index ba438a3..0aae4b9 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_FacilityTemplate // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.cs index e0b1a80..ab47991 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_FacilityTemplate.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.Designer.cs index d98af38..ceef373 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Institution // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.cs index c4befd6..a7d855f 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Institution.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.Designer.cs index f4c6e37..6deb1b1 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Operation // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.cs index 1de1e96..e72e1a3 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Operation.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.Designer.cs index 0bc8391..fc98cd7 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Patient // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.cs index 3b4ea9e..91de43f 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Patient.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.Designer.cs index dd3ebaa..f3376c4 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_Procedure // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.cs index c8c25bd..9b6394e 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_Procedure.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.Designer.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.Designer.cs index ef72ff3..56f8ab1 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.Designer.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.Designer.cs @@ -22,12 +22,16 @@ // // panelAttrFilter // + this.panelAttrFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panelAttrFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panelAttrFilter.Location = new System.Drawing.Point(5, 4); this.panelAttrFilter.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panelAttrFilter.Name = "panelAttrFilter"; this.panelAttrFilter.Size = new System.Drawing.Size(273, 30); this.panelAttrFilter.TabIndex = 0; + this.panelAttrFilter.AttrFilterChanged += new System.EventHandler(this.panelAttrFilter_AttrFilterChanged); // // buttonClear // @@ -39,6 +43,7 @@ this.buttonClear.TabIndex = 1; this.buttonClear.Text = "Clear"; this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); // // SpmItemListFilter_TemplateData // diff --git a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.cs b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.cs index 06ef8d0..f3c9396 100644 --- a/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.cs +++ b/SaPatMgrWinForms/Win/Forms/Filters/SpmItemListFilter_TemplateData.cs @@ -120,6 +120,17 @@ namespace Sarand.PatientMgr.Win.Forms.Filters //------------------------------------------------------------------- // F i l t e r E v e n t s //------------------------------------------------------------------- + private void panelAttrFilter_AttrFilterChanged(object sender, SacsPanelAttrFilter.AttrFilterChangedEventArgs e) + { + InvokeFilterChangedEvent(e); + SetControlActivity(); + } + private void buttonClear_Click(object sender, EventArgs e) + { + panelAttrFilter.RefreshFilterConfig(); + InvokeFilterChangedEvent(e); + SetControlActivity(); + } //------------------------------------------------------------------- } diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.Designer.cs new file mode 100644 index 0000000..deeac81 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.Designer.cs @@ -0,0 +1,124 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Admission + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 441); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 6; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 197); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(600, 68); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(12, 208); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 226); + this.tabControl.TabIndex = 5; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 441); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 7; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 190); + this.groupBoxProperties.TabIndex = 4; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // SpmForm_Admission + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 482); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 500); + this.Name = "SpmForm_Admission"; + this.ShowIcon = false; + this.Text = "Update Admission"; + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabControl tabControl; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.cs new file mode 100644 index 0000000..67ca8b0 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Admission : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmAdmission AdmissionToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Admission() : this(new Config()) { } + public SpmForm_Admission(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Admission"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmAdmission.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmAdmission.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmAdmission.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Admission.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/Maint/SpmForm_Department.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.Designer.cs new file mode 100644 index 0000000..4922464 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.Designer.cs @@ -0,0 +1,302 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Department + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelApplication = new System.Windows.Forms.Label(); + this.labelthrough = new System.Windows.Forms.Label(); + this.dateTimePickerApplicTo = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.checkBoxAllowAnyWards = new System.Windows.Forms.CheckBox(); + this.checkBoxAllowAnyClinics = new System.Windows.Forms.CheckBox(); + this.checkBoxWards = new System.Windows.Forms.CheckBox(); + this.checkBoxClinics = new System.Windows.Forms.CheckBox(); + this.checkBoxAllowAnyTheatres = new System.Windows.Forms.CheckBox(); + this.checkBoxTheatres = new System.Windows.Forms.CheckBox(); + this.dateTimePickerApplicFrom = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelName = new System.Windows.Forms.Label(); + this.labelInstitution = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxInstitution = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelApplication); + this.groupBoxProperties.Controls.Add(this.labelthrough); + this.groupBoxProperties.Controls.Add(this.dateTimePickerApplicTo); + this.groupBoxProperties.Controls.Add(this.checkBoxAllowAnyWards); + this.groupBoxProperties.Controls.Add(this.checkBoxAllowAnyClinics); + this.groupBoxProperties.Controls.Add(this.checkBoxWards); + this.groupBoxProperties.Controls.Add(this.checkBoxClinics); + this.groupBoxProperties.Controls.Add(this.checkBoxAllowAnyTheatres); + this.groupBoxProperties.Controls.Add(this.checkBoxTheatres); + this.groupBoxProperties.Controls.Add(this.dateTimePickerApplicFrom); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.labelInstitution); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.textBoxInstitution); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 190); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelApplication + // + this.labelApplication.AutoSize = true; + this.labelApplication.Location = new System.Drawing.Point(72, 158); + this.labelApplication.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelApplication.Name = "labelApplication"; + this.labelApplication.Size = new System.Drawing.Size(109, 17); + this.labelApplication.TabIndex = 10; + this.labelApplication.Text = "Application from"; + // + // labelthrough + // + this.labelthrough.AutoSize = true; + this.labelthrough.Location = new System.Drawing.Point(364, 160); + this.labelthrough.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelthrough.Name = "labelthrough"; + this.labelthrough.Size = new System.Drawing.Size(57, 17); + this.labelthrough.TabIndex = 12; + this.labelthrough.Text = "through"; + // + // dateTimePickerApplicTo + // + this.dateTimePickerApplicTo.Location = new System.Drawing.Point(426, 157); + this.dateTimePickerApplicTo.Name = "dateTimePickerApplicTo"; + this.dateTimePickerApplicTo.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerApplicTo.TabIndex = 13; + this.dateTimePickerApplicTo.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // checkBoxAllowAnyWards + // + this.checkBoxAllowAnyWards.AutoSize = true; + this.checkBoxAllowAnyWards.Location = new System.Drawing.Point(387, 130); + this.checkBoxAllowAnyWards.Name = "checkBoxAllowAnyWards"; + this.checkBoxAllowAnyWards.Size = new System.Drawing.Size(141, 21); + this.checkBoxAllowAnyWards.TabIndex = 9; + this.checkBoxAllowAnyWards.Text = "Allow \'Any\' Wards"; + this.checkBoxAllowAnyWards.UseVisualStyleBackColor = true; + // + // checkBoxAllowAnyClinics + // + this.checkBoxAllowAnyClinics.AutoSize = true; + this.checkBoxAllowAnyClinics.Location = new System.Drawing.Point(387, 103); + this.checkBoxAllowAnyClinics.Name = "checkBoxAllowAnyClinics"; + this.checkBoxAllowAnyClinics.Size = new System.Drawing.Size(140, 21); + this.checkBoxAllowAnyClinics.TabIndex = 7; + this.checkBoxAllowAnyClinics.Text = "Allow \'Any\' Clinics"; + this.checkBoxAllowAnyClinics.UseVisualStyleBackColor = true; + // + // checkBoxWards + // + this.checkBoxWards.AutoSize = true; + this.checkBoxWards.Location = new System.Drawing.Point(188, 130); + this.checkBoxWards.Name = "checkBoxWards"; + this.checkBoxWards.Size = new System.Drawing.Size(71, 21); + this.checkBoxWards.TabIndex = 8; + this.checkBoxWards.Text = "Wards"; + this.checkBoxWards.UseVisualStyleBackColor = true; + // + // checkBoxClinics + // + this.checkBoxClinics.AutoSize = true; + this.checkBoxClinics.Location = new System.Drawing.Point(188, 103); + this.checkBoxClinics.Name = "checkBoxClinics"; + this.checkBoxClinics.Size = new System.Drawing.Size(70, 21); + this.checkBoxClinics.TabIndex = 6; + this.checkBoxClinics.Text = "Clinics"; + this.checkBoxClinics.UseVisualStyleBackColor = true; + // + // checkBoxAllowAnyTheatres + // + this.checkBoxAllowAnyTheatres.AutoSize = true; + this.checkBoxAllowAnyTheatres.Location = new System.Drawing.Point(387, 76); + this.checkBoxAllowAnyTheatres.Name = "checkBoxAllowAnyTheatres"; + this.checkBoxAllowAnyTheatres.Size = new System.Drawing.Size(157, 21); + this.checkBoxAllowAnyTheatres.TabIndex = 5; + this.checkBoxAllowAnyTheatres.Text = "Allow \'Any\' Theatres"; + this.checkBoxAllowAnyTheatres.UseVisualStyleBackColor = true; + // + // checkBoxTheatres + // + this.checkBoxTheatres.AutoSize = true; + this.checkBoxTheatres.Location = new System.Drawing.Point(188, 76); + this.checkBoxTheatres.Name = "checkBoxTheatres"; + this.checkBoxTheatres.Size = new System.Drawing.Size(87, 21); + this.checkBoxTheatres.TabIndex = 4; + this.checkBoxTheatres.Text = "Theatres"; + this.checkBoxTheatres.UseVisualStyleBackColor = true; + // + // dateTimePickerApplicFrom + // + this.dateTimePickerApplicFrom.Location = new System.Drawing.Point(188, 157); + this.dateTimePickerApplicFrom.Name = "dateTimePickerApplicFrom"; + this.dateTimePickerApplicFrom.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerApplicFrom.TabIndex = 11; + this.dateTimePickerApplicFrom.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(136, 51); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(45, 17); + this.labelName.TabIndex = 2; + this.labelName.Text = "Name"; + // + // labelInstitution + // + this.labelInstitution.AutoSize = true; + this.labelInstitution.Location = new System.Drawing.Point(113, 23); + this.labelInstitution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInstitution.Name = "labelInstitution"; + this.labelInstitution.Size = new System.Drawing.Size(68, 17); + this.labelInstitution.TabIndex = 0; + this.labelInstitution.Text = "Institution"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(188, 48); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.Size = new System.Drawing.Size(408, 22); + this.textBoxName.TabIndex = 3; + // + // textBoxInstitution + // + this.textBoxInstitution.Location = new System.Drawing.Point(188, 20); + this.textBoxInstitution.Name = "textBoxInstitution"; + this.textBoxInstitution.ReadOnly = true; + this.textBoxInstitution.Size = new System.Drawing.Size(408, 22); + this.textBoxInstitution.TabIndex = 1; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(12, 208); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 197); + this.tabControl.TabIndex = 1; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 168); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(600, 168); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 412); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 412); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); + // + // SpmForm_Department + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 453); + this.ControlBox = false; + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 500); + this.Name = "SpmForm_Department"; + this.ShowIcon = false; + this.Text = "Update Department"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label labelthrough; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerApplicTo; + private System.Windows.Forms.CheckBox checkBoxAllowAnyWards; + private System.Windows.Forms.CheckBox checkBoxAllowAnyClinics; + private System.Windows.Forms.CheckBox checkBoxWards; + private System.Windows.Forms.CheckBox checkBoxClinics; + private System.Windows.Forms.CheckBox checkBoxAllowAnyTheatres; + private System.Windows.Forms.CheckBox checkBoxTheatres; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerApplicFrom; + private System.Windows.Forms.Label labelName; + private System.Windows.Forms.Label labelInstitution; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxInstitution; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private System.Windows.Forms.Label labelApplication; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.cs new file mode 100644 index 0000000..251bab0 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Department : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmDepartment DepartmentToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Department() : this(new Config()) { } + public SpmForm_Department(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Department"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmDepartment.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmDepartment.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmDepartment.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Department.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/Maint/SpmForm_Employee.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.Designer.cs new file mode 100644 index 0000000..b3cf6eb --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.Designer.cs @@ -0,0 +1,236 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Employee + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelExcludeSurname = new System.Windows.Forms.Label(); + this.labelForename = new System.Windows.Forms.Label(); + this.textBoxForename = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSurname = new System.Windows.Forms.Label(); + this.textBoxSurname = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelInitials = new System.Windows.Forms.Label(); + this.textBoxInitials = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelTitle = new System.Windows.Forms.Label(); + this.comboBoxTitle = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelCode = new System.Windows.Forms.Label(); + this.textBoxCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelInstitution = new System.Windows.Forms.Label(); + this.textBoxInstitution = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 212); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 212); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelExcludeSurname); + this.groupBoxProperties.Controls.Add(this.labelForename); + this.groupBoxProperties.Controls.Add(this.textBoxForename); + this.groupBoxProperties.Controls.Add(this.labelSurname); + this.groupBoxProperties.Controls.Add(this.textBoxSurname); + this.groupBoxProperties.Controls.Add(this.labelInitials); + this.groupBoxProperties.Controls.Add(this.textBoxInitials); + this.groupBoxProperties.Controls.Add(this.labelTitle); + this.groupBoxProperties.Controls.Add(this.comboBoxTitle); + this.groupBoxProperties.Controls.Add(this.labelCode); + this.groupBoxProperties.Controls.Add(this.textBoxCode); + this.groupBoxProperties.Controls.Add(this.labelInstitution); + this.groupBoxProperties.Controls.Add(this.textBoxInstitution); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 190); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelExcludeSurname + // + this.labelExcludeSurname.AutoSize = true; + this.labelExcludeSurname.Location = new System.Drawing.Point(297, 109); + this.labelExcludeSurname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelExcludeSurname.Name = "labelExcludeSurname"; + this.labelExcludeSurname.Size = new System.Drawing.Size(136, 17); + this.labelExcludeSurname.TabIndex = 8; + this.labelExcludeSurname.Text = "(excluding surname)"; + // + // labelForename + // + this.labelForename.AutoSize = true; + this.labelForename.Location = new System.Drawing.Point(109, 165); + this.labelForename.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelForename.Name = "labelForename"; + this.labelForename.Size = new System.Drawing.Size(72, 17); + this.labelForename.TabIndex = 11; + this.labelForename.Text = "Forename"; + // + // textBoxForename + // + this.textBoxForename.Location = new System.Drawing.Point(188, 162); + this.textBoxForename.Name = "textBoxForename"; + this.textBoxForename.Size = new System.Drawing.Size(204, 22); + this.textBoxForename.TabIndex = 12; + // + // labelSurname + // + this.labelSurname.AutoSize = true; + this.labelSurname.Location = new System.Drawing.Point(116, 137); + this.labelSurname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSurname.Name = "labelSurname"; + this.labelSurname.Size = new System.Drawing.Size(65, 17); + this.labelSurname.TabIndex = 9; + this.labelSurname.Text = "Surname"; + // + // textBoxSurname + // + this.textBoxSurname.Location = new System.Drawing.Point(188, 134); + this.textBoxSurname.Name = "textBoxSurname"; + this.textBoxSurname.Size = new System.Drawing.Size(204, 22); + this.textBoxSurname.TabIndex = 10; + // + // labelInitials + // + this.labelInitials.AutoSize = true; + this.labelInitials.Location = new System.Drawing.Point(134, 109); + this.labelInitials.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInitials.Name = "labelInitials"; + this.labelInitials.Size = new System.Drawing.Size(47, 17); + this.labelInitials.TabIndex = 6; + this.labelInitials.Text = "Initials"; + // + // textBoxInitials + // + this.textBoxInitials.Location = new System.Drawing.Point(188, 106); + this.textBoxInitials.Name = "textBoxInitials"; + this.textBoxInitials.Size = new System.Drawing.Size(102, 22); + this.textBoxInitials.TabIndex = 7; + // + // labelTitle + // + this.labelTitle.AutoSize = true; + this.labelTitle.Location = new System.Drawing.Point(146, 79); + this.labelTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTitle.Name = "labelTitle"; + this.labelTitle.Size = new System.Drawing.Size(35, 17); + this.labelTitle.TabIndex = 4; + this.labelTitle.Text = "Title"; + // + // comboBoxTitle + // + this.comboBoxTitle.FormattingEnabled = true; + this.comboBoxTitle.Location = new System.Drawing.Point(188, 76); + this.comboBoxTitle.Name = "comboBoxTitle"; + this.comboBoxTitle.Size = new System.Drawing.Size(204, 24); + this.comboBoxTitle.TabIndex = 5; + // + // labelCode + // + this.labelCode.AutoSize = true; + this.labelCode.Location = new System.Drawing.Point(140, 51); + this.labelCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelCode.Name = "labelCode"; + this.labelCode.Size = new System.Drawing.Size(41, 17); + this.labelCode.TabIndex = 2; + this.labelCode.Text = "Code"; + // + // textBoxCode + // + this.textBoxCode.Location = new System.Drawing.Point(188, 48); + this.textBoxCode.Name = "textBoxCode"; + this.textBoxCode.Size = new System.Drawing.Size(102, 22); + this.textBoxCode.TabIndex = 3; + // + // labelInstitution + // + this.labelInstitution.AutoSize = true; + this.labelInstitution.Location = new System.Drawing.Point(113, 23); + this.labelInstitution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInstitution.Name = "labelInstitution"; + this.labelInstitution.Size = new System.Drawing.Size(68, 17); + this.labelInstitution.TabIndex = 0; + this.labelInstitution.Text = "Institution"; + // + // textBoxInstitution + // + this.textBoxInstitution.Location = new System.Drawing.Point(188, 20); + this.textBoxInstitution.Name = "textBoxInstitution"; + this.textBoxInstitution.ReadOnly = true; + this.textBoxInstitution.Size = new System.Drawing.Size(408, 22); + this.textBoxInstitution.TabIndex = 1; + // + // SpmForm_Employee + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 253); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MinimumSize = new System.Drawing.Size(650, 300); + this.Name = "SpmForm_Employee"; + this.ShowIcon = false; + this.Text = "Update Employee"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelInstitution; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxInstitution; + private System.Windows.Forms.Label labelCode; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxCode; + private System.Windows.Forms.Label labelTitle; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxTitle; + private System.Windows.Forms.Label labelExcludeSurname; + private System.Windows.Forms.Label labelForename; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxForename; + private System.Windows.Forms.Label labelSurname; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSurname; + private System.Windows.Forms.Label labelInitials; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxInitials; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.cs new file mode 100644 index 0000000..7d10c7b --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Employee : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmEmployee EmployeeToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Employee() : this(new Config()) { } + public SpmForm_Employee(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Employee"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmEmployee.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmEmployee.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmEmployee.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Employee.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/Maint/SpmForm_EmployeeRole.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.Designer.cs new file mode 100644 index 0000000..cd0a871 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.Designer.cs @@ -0,0 +1,241 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_EmployeeRole + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelApplication = new System.Windows.Forms.Label(); + this.labelthrough = new System.Windows.Forms.Label(); + this.dateTimePickerApplicTo = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerApplicFrom = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelRole = new System.Windows.Forms.Label(); + this.comboBoxRole = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.buttonSearch = new Sarand.Win.Forms.Controls.SacsButton(); + this.labelName = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelEmployeeCode = new System.Windows.Forms.Label(); + this.textBoxEmployeeCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 212); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 212); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelApplication); + this.groupBoxProperties.Controls.Add(this.labelthrough); + this.groupBoxProperties.Controls.Add(this.dateTimePickerApplicTo); + this.groupBoxProperties.Controls.Add(this.dateTimePickerApplicFrom); + this.groupBoxProperties.Controls.Add(this.labelRole); + this.groupBoxProperties.Controls.Add(this.comboBoxRole); + this.groupBoxProperties.Controls.Add(this.buttonSearch); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.labelEmployeeCode); + this.groupBoxProperties.Controls.Add(this.textBoxEmployeeCode); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 191); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelApplication + // + this.labelApplication.AutoSize = true; + this.labelApplication.Location = new System.Drawing.Point(72, 135); + this.labelApplication.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelApplication.Name = "labelApplication"; + this.labelApplication.Size = new System.Drawing.Size(109, 17); + this.labelApplication.TabIndex = 9; + this.labelApplication.Text = "Application from"; + // + // labelthrough + // + this.labelthrough.AutoSize = true; + this.labelthrough.Location = new System.Drawing.Point(364, 137); + this.labelthrough.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelthrough.Name = "labelthrough"; + this.labelthrough.Size = new System.Drawing.Size(57, 17); + this.labelthrough.TabIndex = 11; + this.labelthrough.Text = "through"; + // + // dateTimePickerApplicTo + // + this.dateTimePickerApplicTo.Location = new System.Drawing.Point(426, 134); + this.dateTimePickerApplicTo.Name = "dateTimePickerApplicTo"; + this.dateTimePickerApplicTo.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerApplicTo.TabIndex = 12; + this.dateTimePickerApplicTo.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerApplicFrom + // + this.dateTimePickerApplicFrom.Location = new System.Drawing.Point(188, 134); + this.dateTimePickerApplicFrom.Name = "dateTimePickerApplicFrom"; + this.dateTimePickerApplicFrom.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerApplicFrom.TabIndex = 10; + this.dateTimePickerApplicFrom.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelRole + // + this.labelRole.AutoSize = true; + this.labelRole.Location = new System.Drawing.Point(144, 107); + this.labelRole.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelRole.Name = "labelRole"; + this.labelRole.Size = new System.Drawing.Size(37, 17); + this.labelRole.TabIndex = 7; + this.labelRole.Text = "Role"; + // + // comboBoxRole + // + this.comboBoxRole.FormattingEnabled = true; + this.comboBoxRole.Location = new System.Drawing.Point(188, 104); + this.comboBoxRole.Name = "comboBoxRole"; + this.comboBoxRole.Size = new System.Drawing.Size(408, 24); + this.comboBoxRole.TabIndex = 8; + // + // buttonSearch + // + this.buttonSearch.Location = new System.Drawing.Point(297, 46); + this.buttonSearch.Margin = new System.Windows.Forms.Padding(4); + this.buttonSearch.Name = "buttonSearch"; + this.buttonSearch.Size = new System.Drawing.Size(100, 28); + this.buttonSearch.TabIndex = 4; + this.buttonSearch.Text = "Search"; + this.buttonSearch.UseVisualStyleBackColor = true; + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(136, 79); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(45, 17); + this.labelName.TabIndex = 5; + this.labelName.Text = "Name"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(188, 76); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.ReadOnly = true; + this.textBoxName.Size = new System.Drawing.Size(408, 22); + this.textBoxName.TabIndex = 6; + // + // labelEmployeeCode + // + this.labelEmployeeCode.AutoSize = true; + this.labelEmployeeCode.Location = new System.Drawing.Point(76, 51); + this.labelEmployeeCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelEmployeeCode.Name = "labelEmployeeCode"; + this.labelEmployeeCode.Size = new System.Drawing.Size(105, 17); + this.labelEmployeeCode.TabIndex = 2; + this.labelEmployeeCode.Text = "Employee code"; + // + // textBoxEmployeeCode + // + this.textBoxEmployeeCode.Location = new System.Drawing.Point(188, 48); + this.textBoxEmployeeCode.Name = "textBoxEmployeeCode"; + this.textBoxEmployeeCode.Size = new System.Drawing.Size(102, 22); + this.textBoxEmployeeCode.TabIndex = 3; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 23); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 0; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 20); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 1; + // + // SpmForm_EmployeeRole + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 253); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 300); + this.Name = "SpmForm_EmployeeRole"; + this.ShowIcon = false; + this.Text = "Update EmployeeRole"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.Label labelEmployeeCode; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxEmployeeCode; + private System.Windows.Forms.Label labelName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private System.Windows.Forms.Label labelRole; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxRole; + private Sarand.Win.Forms.Controls.SacsButton buttonSearch; + private System.Windows.Forms.Label labelApplication; + private System.Windows.Forms.Label labelthrough; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerApplicTo; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerApplicFrom; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.cs new file mode 100644 index 0000000..31e8782 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_EmployeeRole : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmEmployeeRole EmployeeRoleToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_EmployeeRole() : this(new Config()) { } + public SpmForm_EmployeeRole(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "EmployeeRole"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmEmployeeRole.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmEmployeeRole.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmEmployeeRole.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_EmployeeRole.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/Maint/SpmForm_Facility.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.Designer.cs new file mode 100644 index 0000000..715cabb --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.Designer.cs @@ -0,0 +1,220 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Facility + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelSortCode = new System.Windows.Forms.Label(); + this.labelName = new System.Windows.Forms.Label(); + this.textBoxSortCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 412); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 248); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(750, 248); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(12, 128); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 277); + this.tabControl.TabIndex = 1; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 412); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelSortCode); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.textBoxSortCode); + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 110); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelSortCode + // + this.labelSortCode.AutoSize = true; + this.labelSortCode.Location = new System.Drawing.Point(418, 51); + this.labelSortCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSortCode.Name = "labelSortCode"; + this.labelSortCode.Size = new System.Drawing.Size(69, 17); + this.labelSortCode.TabIndex = 4; + this.labelSortCode.Text = "Sort code"; + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(100, 51); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(81, 17); + this.labelName.TabIndex = 2; + this.labelName.Text = "Short name"; + // + // textBoxSortCode + // + this.textBoxSortCode.Location = new System.Drawing.Point(494, 48); + this.textBoxSortCode.Name = "textBoxSortCode"; + this.textBoxSortCode.Size = new System.Drawing.Size(102, 22); + this.textBoxSortCode.TabIndex = 5; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(102, 79); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 6; + this.labelDesc.Text = "Description"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(188, 48); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.Size = new System.Drawing.Size(204, 22); + this.textBoxName.TabIndex = 3; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(188, 76); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxDesc.TabIndex = 7; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 23); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 0; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 20); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 1; + // + // SpmForm_Facility + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 453); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 500); + this.Name = "SpmForm_Facility"; + this.ShowIcon = false; + this.Text = "Update Facility"; + this.tabControl.ResumeLayout(false); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabControl tabControl; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.Label labelSortCode; + private System.Windows.Forms.Label labelName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSortCode; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.cs new file mode 100644 index 0000000..d120290 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Facility : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmFacility FacilityToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Facility() : this(new Config()) { } + public SpmForm_Facility(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Facility"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmFacility.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacility.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacility.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Facility.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/Maint/SpmForm_FacilitySession.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.Designer.cs new file mode 100644 index 0000000..ec4d5fc --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.Designer.cs @@ -0,0 +1,26 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilitySession + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "SpmForm_FacilitySession"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.cs new file mode 100644 index 0000000..d6afe24 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession.cs @@ -0,0 +1,56 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilitySession : SpmForm_Item + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmFacilitySession FacilitySessionToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilitySession() : this(new Config()) { } + public SpmForm_FacilitySession(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.Designer.cs new file mode 100644 index 0000000..991aaf7 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.Designer.cs @@ -0,0 +1,735 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilitySession_Clinic + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.sacsButtonReset = new Sarand.Win.Forms.Controls.SacsButton(); + this.sacsTextBox4 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox3 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox1 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelOptions = new System.Windows.Forms.Label(); + this.checkBoxHideTemplateNotes = new System.Windows.Forms.CheckBox(); + this.checkBoxNotAvailable = new System.Windows.Forms.CheckBox(); + this.labelNotes = new System.Windows.Forms.Label(); + this.textBoxNotes = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxTemplate = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.sacsTextBox9 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox8 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox7 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox6 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox5 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox2 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.comboBoxConsultant = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelStartAt = new System.Windows.Forms.Label(); + this.textBoxConsultantCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsComboBoxSpeciality = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelConsultantCode = new System.Windows.Forms.Label(); + this.labelSpeciality = new System.Windows.Forms.Label(); + this.dateTimePickerStartAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerFinishAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelTheatre = new System.Windows.Forms.Label(); + this.textBoxTheatre = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSessionDate = new System.Windows.Forms.Label(); + this.textBoxSessionDate = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.checkBoxHighlightSessionNotes = new System.Windows.Forms.CheckBox(); + this.labelMaximum = new System.Windows.Forms.Label(); + this.labelMinimum = new System.Windows.Forms.Label(); + this.textBoxSlotLengthMax = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSlotLength = new System.Windows.Forms.Label(); + this.textBoxSlotLengthMin = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.comboBoxSlotLength = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelUnits = new System.Windows.Forms.Label(); + this.textBoxUnits = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.comboBoxSessionType = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelSessionType = new System.Windows.Forms.Label(); + this.labelName = new System.Windows.Forms.Label(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxIdentify = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.checkBoxOverrideName = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideDesc = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideListType = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideConsultant = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideSpeciality = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideTimes = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideUnits = new System.Windows.Forms.CheckBox(); + this.checkBoxOverrideDuration = new System.Windows.Forms.CheckBox(); + this.groupBoxTemplate.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.groupBoxIdentify.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(562, 572); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(670, 572); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // sacsButtonReset + // + this.sacsButtonReset.Location = new System.Drawing.Point(64, 381); + this.sacsButtonReset.Margin = new System.Windows.Forms.Padding(4); + this.sacsButtonReset.Name = "sacsButtonReset"; + this.sacsButtonReset.Size = new System.Drawing.Size(156, 28); + this.sacsButtonReset.TabIndex = 9; + this.sacsButtonReset.Text = "Restore defaults"; + this.sacsButtonReset.UseVisualStyleBackColor = true; + // + // sacsTextBox4 + // + this.sacsTextBox4.Location = new System.Drawing.Point(6, 245); + this.sacsTextBox4.Multiline = true; + this.sacsTextBox4.Name = "sacsTextBox4"; + this.sacsTextBox4.ReadOnly = true; + this.sacsTextBox4.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.sacsTextBox4.Size = new System.Drawing.Size(274, 106); + this.sacsTextBox4.TabIndex = 8; + // + // sacsTextBox3 + // + this.sacsTextBox3.Location = new System.Drawing.Point(6, 217); + this.sacsTextBox3.Name = "sacsTextBox3"; + this.sacsTextBox3.ReadOnly = true; + this.sacsTextBox3.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox3.TabIndex = 7; + // + // sacsTextBox1 + // + this.sacsTextBox1.Location = new System.Drawing.Point(6, 105); + this.sacsTextBox1.Name = "sacsTextBox1"; + this.sacsTextBox1.ReadOnly = true; + this.sacsTextBox1.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox1.TabIndex = 3; + // + // labelOptions + // + this.labelOptions.AutoSize = true; + this.labelOptions.Location = new System.Drawing.Point(108, 408); + this.labelOptions.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelOptions.Name = "labelOptions"; + this.labelOptions.Size = new System.Drawing.Size(57, 17); + this.labelOptions.TabIndex = 34; + this.labelOptions.Text = "Options"; + // + // checkBoxHideTemplateNotes + // + this.checkBoxHideTemplateNotes.AutoSize = true; + this.checkBoxHideTemplateNotes.Location = new System.Drawing.Point(172, 405); + this.checkBoxHideTemplateNotes.Name = "checkBoxHideTemplateNotes"; + this.checkBoxHideTemplateNotes.Size = new System.Drawing.Size(288, 21); + this.checkBoxHideTemplateNotes.TabIndex = 36; + this.checkBoxHideTemplateNotes.Text = "Hide templates notes (on admissions list)"; + this.checkBoxHideTemplateNotes.UseVisualStyleBackColor = true; + // + // checkBoxNotAvailable + // + this.checkBoxNotAvailable.AutoSize = true; + this.checkBoxNotAvailable.Location = new System.Drawing.Point(172, 378); + this.checkBoxNotAvailable.Name = "checkBoxNotAvailable"; + this.checkBoxNotAvailable.Size = new System.Drawing.Size(234, 21); + this.checkBoxNotAvailable.TabIndex = 35; + this.checkBoxNotAvailable.Text = "Not available (prohibit bookings)"; + this.checkBoxNotAvailable.UseVisualStyleBackColor = true; + // + // labelNotes + // + this.labelNotes.AutoSize = true; + this.labelNotes.Location = new System.Drawing.Point(126, 271); + this.labelNotes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelNotes.Name = "labelNotes"; + this.labelNotes.Size = new System.Drawing.Size(45, 17); + this.labelNotes.TabIndex = 32; + this.labelNotes.Text = "Notes"; + // + // textBoxNotes + // + this.textBoxNotes.Location = new System.Drawing.Point(178, 268); + this.textBoxNotes.Multiline = true; + this.textBoxNotes.Name = "textBoxNotes"; + this.textBoxNotes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBoxNotes.Size = new System.Drawing.Size(280, 104); + this.textBoxNotes.TabIndex = 33; + // + // groupBoxTemplate + // + this.groupBoxTemplate.BorderColour = System.Drawing.Color.Gray; + this.groupBoxTemplate.Controls.Add(this.sacsTextBox9); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox8); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox7); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox6); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox5); + this.groupBoxTemplate.Controls.Add(this.sacsButtonReset); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox4); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox3); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox2); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox1); + this.groupBoxTemplate.Location = new System.Drawing.Point(464, 21); + this.groupBoxTemplate.Name = "groupBoxTemplate"; + this.groupBoxTemplate.Size = new System.Drawing.Size(288, 432); + this.groupBoxTemplate.TabIndex = 38; + this.groupBoxTemplate.TabStop = false; + this.groupBoxTemplate.Text = "Template defaults"; + // + // sacsTextBox9 + // + this.sacsTextBox9.Location = new System.Drawing.Point(6, 189); + this.sacsTextBox9.Name = "sacsTextBox9"; + this.sacsTextBox9.ReadOnly = true; + this.sacsTextBox9.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox9.TabIndex = 6; + // + // sacsTextBox8 + // + this.sacsTextBox8.Location = new System.Drawing.Point(6, 161); + this.sacsTextBox8.Name = "sacsTextBox8"; + this.sacsTextBox8.ReadOnly = true; + this.sacsTextBox8.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox8.TabIndex = 5; + // + // sacsTextBox7 + // + this.sacsTextBox7.Location = new System.Drawing.Point(6, 77); + this.sacsTextBox7.Name = "sacsTextBox7"; + this.sacsTextBox7.ReadOnly = true; + this.sacsTextBox7.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox7.TabIndex = 2; + // + // sacsTextBox6 + // + this.sacsTextBox6.Location = new System.Drawing.Point(6, 49); + this.sacsTextBox6.Name = "sacsTextBox6"; + this.sacsTextBox6.ReadOnly = true; + this.sacsTextBox6.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox6.TabIndex = 1; + // + // sacsTextBox5 + // + this.sacsTextBox5.Location = new System.Drawing.Point(6, 21); + this.sacsTextBox5.Name = "sacsTextBox5"; + this.sacsTextBox5.ReadOnly = true; + this.sacsTextBox5.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox5.TabIndex = 0; + // + // sacsTextBox2 + // + this.sacsTextBox2.Location = new System.Drawing.Point(6, 133); + this.sacsTextBox2.Name = "sacsTextBox2"; + this.sacsTextBox2.ReadOnly = true; + this.sacsTextBox2.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox2.TabIndex = 4; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(287, 215); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 17); + this.label2.TabIndex = 23; + this.label2.Text = "Finish at"; + // + // comboBoxConsultant + // + this.comboBoxConsultant.FormattingEnabled = true; + this.comboBoxConsultant.Location = new System.Drawing.Point(253, 126); + this.comboBoxConsultant.Name = "comboBoxConsultant"; + this.comboBoxConsultant.Size = new System.Drawing.Size(204, 24); + this.comboBoxConsultant.TabIndex = 13; + // + // labelStartAt + // + this.labelStartAt.AutoSize = true; + this.labelStartAt.Location = new System.Drawing.Point(117, 215); + this.labelStartAt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelStartAt.Name = "labelStartAt"; + this.labelStartAt.Size = new System.Drawing.Size(54, 17); + this.labelStartAt.TabIndex = 21; + this.labelStartAt.Text = "Start at"; + // + // textBoxConsultantCode + // + this.textBoxConsultantCode.Location = new System.Drawing.Point(178, 126); + this.textBoxConsultantCode.Name = "textBoxConsultantCode"; + this.textBoxConsultantCode.Size = new System.Drawing.Size(69, 22); + this.textBoxConsultantCode.TabIndex = 12; + // + // sacsComboBoxSpeciality + // + this.sacsComboBoxSpeciality.FormattingEnabled = true; + this.sacsComboBoxSpeciality.Location = new System.Drawing.Point(178, 154); + this.sacsComboBoxSpeciality.Name = "sacsComboBoxSpeciality"; + this.sacsComboBoxSpeciality.Size = new System.Drawing.Size(204, 24); + this.sacsComboBoxSpeciality.TabIndex = 16; + // + // labelConsultantCode + // + this.labelConsultantCode.AutoSize = true; + this.labelConsultantCode.Location = new System.Drawing.Point(97, 129); + this.labelConsultantCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelConsultantCode.Name = "labelConsultantCode"; + this.labelConsultantCode.Size = new System.Drawing.Size(75, 17); + this.labelConsultantCode.TabIndex = 11; + this.labelConsultantCode.Text = "Consultant"; + // + // labelSpeciality + // + this.labelSpeciality.AutoSize = true; + this.labelSpeciality.Location = new System.Drawing.Point(103, 157); + this.labelSpeciality.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSpeciality.Name = "labelSpeciality"; + this.labelSpeciality.Size = new System.Drawing.Size(68, 17); + this.labelSpeciality.TabIndex = 15; + this.labelSpeciality.Text = "Speciality"; + // + // dateTimePickerStartAt + // + this.dateTimePickerStartAt.Location = new System.Drawing.Point(178, 210); + this.dateTimePickerStartAt.Name = "dateTimePickerStartAt"; + this.dateTimePickerStartAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerStartAt.TabIndex = 22; + this.dateTimePickerStartAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerFinishAt + // + this.dateTimePickerFinishAt.Location = new System.Drawing.Point(355, 210); + this.dateTimePickerFinishAt.Name = "dateTimePickerFinishAt"; + this.dateTimePickerFinishAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerFinishAt.TabIndex = 24; + this.dateTimePickerFinishAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelTheatre + // + this.labelTheatre.AutoSize = true; + this.labelTheatre.Location = new System.Drawing.Point(123, 51); + this.labelTheatre.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTheatre.Name = "labelTheatre"; + this.labelTheatre.Size = new System.Drawing.Size(58, 17); + this.labelTheatre.TabIndex = 2; + this.labelTheatre.Text = "Theatre"; + // + // textBoxTheatre + // + this.textBoxTheatre.Location = new System.Drawing.Point(188, 48); + this.textBoxTheatre.Name = "textBoxTheatre"; + this.textBoxTheatre.ReadOnly = true; + this.textBoxTheatre.Size = new System.Drawing.Size(280, 22); + this.textBoxTheatre.TabIndex = 3; + // + // labelSessionDate + // + this.labelSessionDate.AutoSize = true; + this.labelSessionDate.Location = new System.Drawing.Point(91, 23); + this.labelSessionDate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSessionDate.Name = "labelSessionDate"; + this.labelSessionDate.Size = new System.Drawing.Size(90, 17); + this.labelSessionDate.TabIndex = 0; + this.labelSessionDate.Text = "Session date"; + // + // textBoxSessionDate + // + this.textBoxSessionDate.Location = new System.Drawing.Point(188, 20); + this.textBoxSessionDate.Name = "textBoxSessionDate"; + this.textBoxSessionDate.ReadOnly = true; + this.textBoxSessionDate.Size = new System.Drawing.Size(280, 22); + this.textBoxSessionDate.TabIndex = 1; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideDuration); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideUnits); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideTimes); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideSpeciality); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideConsultant); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideListType); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideDesc); + this.groupBoxProperties.Controls.Add(this.checkBoxOverrideName); + this.groupBoxProperties.Controls.Add(this.label1); + this.groupBoxProperties.Controls.Add(this.checkBoxHighlightSessionNotes); + this.groupBoxProperties.Controls.Add(this.labelMaximum); + this.groupBoxProperties.Controls.Add(this.labelMinimum); + this.groupBoxProperties.Controls.Add(this.textBoxSlotLengthMax); + this.groupBoxProperties.Controls.Add(this.labelSlotLength); + this.groupBoxProperties.Controls.Add(this.textBoxSlotLengthMin); + this.groupBoxProperties.Controls.Add(this.comboBoxSlotLength); + this.groupBoxProperties.Controls.Add(this.labelUnits); + this.groupBoxProperties.Controls.Add(this.textBoxUnits); + this.groupBoxProperties.Controls.Add(this.comboBoxSessionType); + this.groupBoxProperties.Controls.Add(this.labelSessionType); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.labelOptions); + this.groupBoxProperties.Controls.Add(this.checkBoxHideTemplateNotes); + this.groupBoxProperties.Controls.Add(this.checkBoxNotAvailable); + this.groupBoxProperties.Controls.Add(this.labelNotes); + this.groupBoxProperties.Controls.Add(this.textBoxNotes); + this.groupBoxProperties.Controls.Add(this.groupBoxTemplate); + this.groupBoxProperties.Controls.Add(this.label2); + this.groupBoxProperties.Controls.Add(this.comboBoxConsultant); + this.groupBoxProperties.Controls.Add(this.labelStartAt); + this.groupBoxProperties.Controls.Add(this.textBoxConsultantCode); + this.groupBoxProperties.Controls.Add(this.sacsComboBoxSpeciality); + this.groupBoxProperties.Controls.Add(this.labelConsultantCode); + this.groupBoxProperties.Controls.Add(this.labelSpeciality); + this.groupBoxProperties.Controls.Add(this.dateTimePickerStartAt); + this.groupBoxProperties.Controls.Add(this.dateTimePickerFinishAt); + this.groupBoxProperties.Location = new System.Drawing.Point(22, 100); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(758, 460); + this.groupBoxProperties.TabIndex = 1; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(19, 21); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 17); + this.label1.TabIndex = 0; + this.label1.Text = "Override"; + // + // checkBoxHighlightSessionNotes + // + this.checkBoxHighlightSessionNotes.AutoSize = true; + this.checkBoxHighlightSessionNotes.Location = new System.Drawing.Point(172, 432); + this.checkBoxHighlightSessionNotes.Name = "checkBoxHighlightSessionNotes"; + this.checkBoxHighlightSessionNotes.Size = new System.Drawing.Size(176, 21); + this.checkBoxHighlightSessionNotes.TabIndex = 37; + this.checkBoxHighlightSessionNotes.Text = "Highlight session notes"; + this.checkBoxHighlightSessionNotes.UseVisualStyleBackColor = true; + // + // labelMaximum + // + this.labelMaximum.AutoSize = true; + this.labelMaximum.Location = new System.Drawing.Point(373, 241); + this.labelMaximum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMaximum.Name = "labelMaximum"; + this.labelMaximum.Size = new System.Drawing.Size(33, 17); + this.labelMaximum.TabIndex = 30; + this.labelMaximum.Text = "Max"; + // + // labelMinimum + // + this.labelMinimum.AutoSize = true; + this.labelMinimum.Location = new System.Drawing.Point(278, 241); + this.labelMinimum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMinimum.Name = "labelMinimum"; + this.labelMinimum.Size = new System.Drawing.Size(30, 17); + this.labelMinimum.TabIndex = 28; + this.labelMinimum.Text = "Min"; + // + // textBoxSlotLengthMax + // + this.textBoxSlotLengthMax.Location = new System.Drawing.Point(406, 238); + this.textBoxSlotLengthMax.Name = "textBoxSlotLengthMax"; + this.textBoxSlotLengthMax.Size = new System.Drawing.Size(51, 22); + this.textBoxSlotLengthMax.TabIndex = 31; + // + // labelSlotLength + // + this.labelSlotLength.AutoSize = true; + this.labelSlotLength.Location = new System.Drawing.Point(96, 241); + this.labelSlotLength.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSlotLength.Name = "labelSlotLength"; + this.labelSlotLength.Size = new System.Drawing.Size(75, 17); + this.labelSlotLength.TabIndex = 26; + this.labelSlotLength.Text = "Slot length"; + // + // textBoxSlotLengthMin + // + this.textBoxSlotLengthMin.Location = new System.Drawing.Point(315, 238); + this.textBoxSlotLengthMin.Name = "textBoxSlotLengthMin"; + this.textBoxSlotLengthMin.Size = new System.Drawing.Size(51, 22); + this.textBoxSlotLengthMin.TabIndex = 29; + // + // comboBoxSlotLength + // + this.comboBoxSlotLength.FormattingEnabled = true; + this.comboBoxSlotLength.Location = new System.Drawing.Point(178, 238); + this.comboBoxSlotLength.Name = "comboBoxSlotLength"; + this.comboBoxSlotLength.Size = new System.Drawing.Size(76, 24); + this.comboBoxSlotLength.TabIndex = 27; + // + // labelUnits + // + this.labelUnits.AutoSize = true; + this.labelUnits.Location = new System.Drawing.Point(127, 185); + this.labelUnits.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelUnits.Name = "labelUnits"; + this.labelUnits.Size = new System.Drawing.Size(40, 17); + this.labelUnits.TabIndex = 18; + this.labelUnits.Text = "Units"; + // + // textBoxUnits + // + this.textBoxUnits.Location = new System.Drawing.Point(178, 182); + this.textBoxUnits.Name = "textBoxUnits"; + this.textBoxUnits.Size = new System.Drawing.Size(51, 22); + this.textBoxUnits.TabIndex = 19; + // + // comboBoxSessionType + // + this.comboBoxSessionType.FormattingEnabled = true; + this.comboBoxSessionType.Location = new System.Drawing.Point(178, 98); + this.comboBoxSessionType.Name = "comboBoxSessionType"; + this.comboBoxSessionType.Size = new System.Drawing.Size(102, 24); + this.comboBoxSessionType.TabIndex = 9; + // + // labelSessionType + // + this.labelSessionType.AutoSize = true; + this.labelSessionType.Location = new System.Drawing.Point(110, 101); + this.labelSessionType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSessionType.Name = "labelSessionType"; + this.labelSessionType.Size = new System.Drawing.Size(61, 17); + this.labelSessionType.TabIndex = 8; + this.labelSessionType.Text = "List type"; + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(90, 45); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(81, 17); + this.labelName.TabIndex = 2; + this.labelName.Text = "Short name"; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(92, 73); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 5; + this.labelDesc.Text = "Description"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(178, 42); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.Size = new System.Drawing.Size(204, 22); + this.textBoxName.TabIndex = 3; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(178, 70); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(280, 22); + this.textBoxDesc.TabIndex = 6; + // + // groupBoxIdentify + // + this.groupBoxIdentify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxIdentify.BorderColour = System.Drawing.Color.Gray; + this.groupBoxIdentify.Controls.Add(this.labelTheatre); + this.groupBoxIdentify.Controls.Add(this.textBoxTheatre); + this.groupBoxIdentify.Controls.Add(this.labelSessionDate); + this.groupBoxIdentify.Controls.Add(this.textBoxSessionDate); + this.groupBoxIdentify.Location = new System.Drawing.Point(12, 12); + this.groupBoxIdentify.Name = "groupBoxIdentify"; + this.groupBoxIdentify.Size = new System.Drawing.Size(758, 82); + this.groupBoxIdentify.TabIndex = 0; + this.groupBoxIdentify.TabStop = false; + this.groupBoxIdentify.Text = "Identify"; + // + // checkBoxOverrideName + // + this.checkBoxOverrideName.AutoSize = true; + this.checkBoxOverrideName.Location = new System.Drawing.Point(32, 46); + this.checkBoxOverrideName.Name = "checkBoxOverrideName"; + this.checkBoxOverrideName.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideName.TabIndex = 1; + this.checkBoxOverrideName.UseVisualStyleBackColor = true; + // + // checkBoxOverrideDesc + // + this.checkBoxOverrideDesc.AutoSize = true; + this.checkBoxOverrideDesc.Location = new System.Drawing.Point(32, 74); + this.checkBoxOverrideDesc.Name = "checkBoxOverrideDesc"; + this.checkBoxOverrideDesc.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideDesc.TabIndex = 4; + this.checkBoxOverrideDesc.UseVisualStyleBackColor = true; + // + // checkBoxOverrideListType + // + this.checkBoxOverrideListType.AutoSize = true; + this.checkBoxOverrideListType.Location = new System.Drawing.Point(32, 102); + this.checkBoxOverrideListType.Name = "checkBoxOverrideListType"; + this.checkBoxOverrideListType.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideListType.TabIndex = 7; + this.checkBoxOverrideListType.UseVisualStyleBackColor = true; + // + // checkBoxOverrideConsultant + // + this.checkBoxOverrideConsultant.AutoSize = true; + this.checkBoxOverrideConsultant.Location = new System.Drawing.Point(32, 130); + this.checkBoxOverrideConsultant.Name = "checkBoxOverrideConsultant"; + this.checkBoxOverrideConsultant.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideConsultant.TabIndex = 10; + this.checkBoxOverrideConsultant.UseVisualStyleBackColor = true; + // + // checkBoxOverrideSpeciality + // + this.checkBoxOverrideSpeciality.AutoSize = true; + this.checkBoxOverrideSpeciality.Location = new System.Drawing.Point(32, 158); + this.checkBoxOverrideSpeciality.Name = "checkBoxOverrideSpeciality"; + this.checkBoxOverrideSpeciality.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideSpeciality.TabIndex = 14; + this.checkBoxOverrideSpeciality.UseVisualStyleBackColor = true; + // + // checkBoxOverrideTimes + // + this.checkBoxOverrideTimes.AutoSize = true; + this.checkBoxOverrideTimes.Location = new System.Drawing.Point(32, 216); + this.checkBoxOverrideTimes.Name = "checkBoxOverrideTimes"; + this.checkBoxOverrideTimes.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideTimes.TabIndex = 20; + this.checkBoxOverrideTimes.UseVisualStyleBackColor = true; + // + // checkBoxOverrideUnits + // + this.checkBoxOverrideUnits.AutoSize = true; + this.checkBoxOverrideUnits.Location = new System.Drawing.Point(32, 186); + this.checkBoxOverrideUnits.Name = "checkBoxOverrideUnits"; + this.checkBoxOverrideUnits.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideUnits.TabIndex = 17; + this.checkBoxOverrideUnits.UseVisualStyleBackColor = true; + // + // checkBoxOverrideDuration + // + this.checkBoxOverrideDuration.AutoSize = true; + this.checkBoxOverrideDuration.Location = new System.Drawing.Point(32, 242); + this.checkBoxOverrideDuration.Name = "checkBoxOverrideDuration"; + this.checkBoxOverrideDuration.Size = new System.Drawing.Size(18, 17); + this.checkBoxOverrideDuration.TabIndex = 25; + this.checkBoxOverrideDuration.UseVisualStyleBackColor = true; + // + // SpmForm_FacilitySession_Clinic + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(782, 613); + this.ControlBox = false; + this.Controls.Add(this.groupBoxProperties); + this.Controls.Add(this.groupBoxIdentify); + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(800, 660); + this.Name = "SpmForm_FacilitySession_Clinic"; + this.ShowIcon = false; + this.Text = "Clinic Session"; + this.groupBoxTemplate.ResumeLayout(false); + this.groupBoxTemplate.PerformLayout(); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.groupBoxIdentify.ResumeLayout(false); + this.groupBoxIdentify.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsButton sacsButtonReset; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox4; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox3; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox1; + private System.Windows.Forms.Label labelOptions; + private System.Windows.Forms.CheckBox checkBoxHideTemplateNotes; + private System.Windows.Forms.CheckBox checkBoxNotAvailable; + private System.Windows.Forms.Label labelNotes; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxNotes; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxTemplate; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox2; + private System.Windows.Forms.Label label2; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxConsultant; + private System.Windows.Forms.Label labelStartAt; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxConsultantCode; + private Sarand.Win.Forms.Controls.SacsComboBox sacsComboBoxSpeciality; + private System.Windows.Forms.Label labelConsultantCode; + private System.Windows.Forms.Label labelSpeciality; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerStartAt; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerFinishAt; + private System.Windows.Forms.Label labelTheatre; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxTheatre; + private System.Windows.Forms.Label labelSessionDate; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSessionDate; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxIdentify; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox5; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox6; + private System.Windows.Forms.Label labelName; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox7; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxSessionType; + private System.Windows.Forms.Label labelSessionType; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox9; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox8; + private System.Windows.Forms.Label labelUnits; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxUnits; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.CheckBox checkBoxHighlightSessionNotes; + private System.Windows.Forms.Label labelMaximum; + private System.Windows.Forms.Label labelMinimum; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSlotLengthMax; + private System.Windows.Forms.Label labelSlotLength; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSlotLengthMin; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxSlotLength; + private System.Windows.Forms.CheckBox checkBoxOverrideDuration; + private System.Windows.Forms.CheckBox checkBoxOverrideUnits; + private System.Windows.Forms.CheckBox checkBoxOverrideTimes; + private System.Windows.Forms.CheckBox checkBoxOverrideSpeciality; + private System.Windows.Forms.CheckBox checkBoxOverrideConsultant; + private System.Windows.Forms.CheckBox checkBoxOverrideListType; + private System.Windows.Forms.CheckBox checkBoxOverrideDesc; + private System.Windows.Forms.CheckBox checkBoxOverrideName; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.cs new file mode 100644 index 0000000..9a18b23 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilitySession_Clinic : SpmForm_FacilitySession + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilitySession.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilitySession_Clinic() : this(new Config()) { } + public SpmForm_FacilitySession_Clinic(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilitySession_Clinic"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilitySession_Clinic.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilitySession_Clinic.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilitySession_Clinic.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Clinic.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/Maint/SpmForm_FacilitySession_Theatre.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.Designer.cs new file mode 100644 index 0000000..e7817a7 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.Designer.cs @@ -0,0 +1,395 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilitySession_Theatre + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxIdentify = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelTheatre = new System.Windows.Forms.Label(); + this.textBoxTheatre = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSessionDate = new System.Windows.Forms.Label(); + this.textBoxSessionDate = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.dateTimePickerFinishAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerStartAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelSpeciality = new System.Windows.Forms.Label(); + this.labelConsultantCode = new System.Windows.Forms.Label(); + this.sacsComboBoxSpeciality = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.textBoxConsultantCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelStartAt = new System.Windows.Forms.Label(); + this.comboBoxConsultant = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelOptions = new System.Windows.Forms.Label(); + this.checkBoxHideTemplateNotes = new System.Windows.Forms.CheckBox(); + this.checkBoxNotAvailable = new System.Windows.Forms.CheckBox(); + this.labelNotes = new System.Windows.Forms.Label(); + this.textBoxNotes = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxTemplate = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.sacsButtonReset = new Sarand.Win.Forms.Controls.SacsButton(); + this.sacsTextBox4 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox3 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox2 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.sacsTextBox1 = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxIdentify.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.groupBoxTemplate.SuspendLayout(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(670, 412); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(562, 412); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // groupBoxIdentify + // + this.groupBoxIdentify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxIdentify.BorderColour = System.Drawing.Color.Gray; + this.groupBoxIdentify.Controls.Add(this.labelTheatre); + this.groupBoxIdentify.Controls.Add(this.textBoxTheatre); + this.groupBoxIdentify.Controls.Add(this.labelSessionDate); + this.groupBoxIdentify.Controls.Add(this.textBoxSessionDate); + this.groupBoxIdentify.Location = new System.Drawing.Point(13, 12); + this.groupBoxIdentify.Name = "groupBoxIdentify"; + this.groupBoxIdentify.Size = new System.Drawing.Size(758, 82); + this.groupBoxIdentify.TabIndex = 0; + this.groupBoxIdentify.TabStop = false; + this.groupBoxIdentify.Text = "Identify"; + // + // labelTheatre + // + this.labelTheatre.AutoSize = true; + this.labelTheatre.Location = new System.Drawing.Point(123, 51); + this.labelTheatre.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTheatre.Name = "labelTheatre"; + this.labelTheatre.Size = new System.Drawing.Size(58, 17); + this.labelTheatre.TabIndex = 2; + this.labelTheatre.Text = "Theatre"; + // + // textBoxTheatre + // + this.textBoxTheatre.Location = new System.Drawing.Point(188, 48); + this.textBoxTheatre.Name = "textBoxTheatre"; + this.textBoxTheatre.ReadOnly = true; + this.textBoxTheatre.Size = new System.Drawing.Size(280, 22); + this.textBoxTheatre.TabIndex = 3; + // + // labelSessionDate + // + this.labelSessionDate.AutoSize = true; + this.labelSessionDate.Location = new System.Drawing.Point(91, 23); + this.labelSessionDate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSessionDate.Name = "labelSessionDate"; + this.labelSessionDate.Size = new System.Drawing.Size(90, 17); + this.labelSessionDate.TabIndex = 0; + this.labelSessionDate.Text = "Session date"; + // + // textBoxSessionDate + // + this.textBoxSessionDate.Location = new System.Drawing.Point(188, 20); + this.textBoxSessionDate.Name = "textBoxSessionDate"; + this.textBoxSessionDate.ReadOnly = true; + this.textBoxSessionDate.Size = new System.Drawing.Size(280, 22); + this.textBoxSessionDate.TabIndex = 1; + // + // dateTimePickerFinishAt + // + this.dateTimePickerFinishAt.Location = new System.Drawing.Point(355, 100); + this.dateTimePickerFinishAt.Name = "dateTimePickerFinishAt"; + this.dateTimePickerFinishAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerFinishAt.TabIndex = 8; + this.dateTimePickerFinishAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerStartAt + // + this.dateTimePickerStartAt.Location = new System.Drawing.Point(178, 100); + this.dateTimePickerStartAt.Name = "dateTimePickerStartAt"; + this.dateTimePickerStartAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerStartAt.TabIndex = 6; + this.dateTimePickerStartAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelSpeciality + // + this.labelSpeciality.AutoSize = true; + this.labelSpeciality.Location = new System.Drawing.Point(103, 73); + this.labelSpeciality.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSpeciality.Name = "labelSpeciality"; + this.labelSpeciality.Size = new System.Drawing.Size(68, 17); + this.labelSpeciality.TabIndex = 3; + this.labelSpeciality.Text = "Speciality"; + // + // labelConsultantCode + // + this.labelConsultantCode.AutoSize = true; + this.labelConsultantCode.Location = new System.Drawing.Point(96, 45); + this.labelConsultantCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelConsultantCode.Name = "labelConsultantCode"; + this.labelConsultantCode.Size = new System.Drawing.Size(75, 17); + this.labelConsultantCode.TabIndex = 0; + this.labelConsultantCode.Text = "Consultant"; + // + // sacsComboBoxSpeciality + // + this.sacsComboBoxSpeciality.FormattingEnabled = true; + this.sacsComboBoxSpeciality.Location = new System.Drawing.Point(178, 70); + this.sacsComboBoxSpeciality.Name = "sacsComboBoxSpeciality"; + this.sacsComboBoxSpeciality.Size = new System.Drawing.Size(204, 24); + this.sacsComboBoxSpeciality.TabIndex = 4; + // + // textBoxConsultantCode + // + this.textBoxConsultantCode.Location = new System.Drawing.Point(178, 42); + this.textBoxConsultantCode.Name = "textBoxConsultantCode"; + this.textBoxConsultantCode.Size = new System.Drawing.Size(69, 22); + this.textBoxConsultantCode.TabIndex = 1; + // + // labelStartAt + // + this.labelStartAt.AutoSize = true; + this.labelStartAt.Location = new System.Drawing.Point(117, 105); + this.labelStartAt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelStartAt.Name = "labelStartAt"; + this.labelStartAt.Size = new System.Drawing.Size(54, 17); + this.labelStartAt.TabIndex = 5; + this.labelStartAt.Text = "Start at"; + // + // comboBoxConsultant + // + this.comboBoxConsultant.FormattingEnabled = true; + this.comboBoxConsultant.Location = new System.Drawing.Point(254, 40); + this.comboBoxConsultant.Name = "comboBoxConsultant"; + this.comboBoxConsultant.Size = new System.Drawing.Size(204, 24); + this.comboBoxConsultant.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(287, 105); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 17); + this.label2.TabIndex = 7; + this.label2.Text = "Finish at"; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelOptions); + this.groupBoxProperties.Controls.Add(this.checkBoxHideTemplateNotes); + this.groupBoxProperties.Controls.Add(this.checkBoxNotAvailable); + this.groupBoxProperties.Controls.Add(this.labelNotes); + this.groupBoxProperties.Controls.Add(this.textBoxNotes); + this.groupBoxProperties.Controls.Add(this.groupBoxTemplate); + this.groupBoxProperties.Controls.Add(this.label2); + this.groupBoxProperties.Controls.Add(this.comboBoxConsultant); + this.groupBoxProperties.Controls.Add(this.labelStartAt); + this.groupBoxProperties.Controls.Add(this.textBoxConsultantCode); + this.groupBoxProperties.Controls.Add(this.sacsComboBoxSpeciality); + this.groupBoxProperties.Controls.Add(this.labelConsultantCode); + this.groupBoxProperties.Controls.Add(this.labelSpeciality); + this.groupBoxProperties.Controls.Add(this.dateTimePickerStartAt); + this.groupBoxProperties.Controls.Add(this.dateTimePickerFinishAt); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 100); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(769, 298); + this.groupBoxProperties.TabIndex = 1; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelOptions + // + this.labelOptions.AutoSize = true; + this.labelOptions.Location = new System.Drawing.Point(113, 248); + this.labelOptions.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelOptions.Name = "labelOptions"; + this.labelOptions.Size = new System.Drawing.Size(57, 17); + this.labelOptions.TabIndex = 11; + this.labelOptions.Text = "Options"; + // + // checkBoxHideTemplateNotes + // + this.checkBoxHideTemplateNotes.AutoSize = true; + this.checkBoxHideTemplateNotes.Location = new System.Drawing.Point(177, 265); + this.checkBoxHideTemplateNotes.Name = "checkBoxHideTemplateNotes"; + this.checkBoxHideTemplateNotes.Size = new System.Drawing.Size(288, 21); + this.checkBoxHideTemplateNotes.TabIndex = 13; + this.checkBoxHideTemplateNotes.Text = "Hide templates notes (on admissions list)"; + this.checkBoxHideTemplateNotes.UseVisualStyleBackColor = true; + // + // checkBoxNotAvailable + // + this.checkBoxNotAvailable.AutoSize = true; + this.checkBoxNotAvailable.Location = new System.Drawing.Point(177, 238); + this.checkBoxNotAvailable.Name = "checkBoxNotAvailable"; + this.checkBoxNotAvailable.Size = new System.Drawing.Size(234, 21); + this.checkBoxNotAvailable.TabIndex = 12; + this.checkBoxNotAvailable.Text = "Not available (prohibit bookings)"; + this.checkBoxNotAvailable.UseVisualStyleBackColor = true; + // + // labelNotes + // + this.labelNotes.AutoSize = true; + this.labelNotes.Location = new System.Drawing.Point(126, 131); + this.labelNotes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelNotes.Name = "labelNotes"; + this.labelNotes.Size = new System.Drawing.Size(45, 17); + this.labelNotes.TabIndex = 9; + this.labelNotes.Text = "Notes"; + // + // textBoxNotes + // + this.textBoxNotes.Location = new System.Drawing.Point(178, 128); + this.textBoxNotes.Multiline = true; + this.textBoxNotes.Name = "textBoxNotes"; + this.textBoxNotes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBoxNotes.Size = new System.Drawing.Size(280, 104); + this.textBoxNotes.TabIndex = 10; + // + // groupBoxTemplate + // + this.groupBoxTemplate.BorderColour = System.Drawing.Color.Gray; + this.groupBoxTemplate.Controls.Add(this.sacsButtonReset); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox4); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox3); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox2); + this.groupBoxTemplate.Controls.Add(this.sacsTextBox1); + this.groupBoxTemplate.Location = new System.Drawing.Point(464, 21); + this.groupBoxTemplate.Name = "groupBoxTemplate"; + this.groupBoxTemplate.Size = new System.Drawing.Size(288, 265); + this.groupBoxTemplate.TabIndex = 14; + this.groupBoxTemplate.TabStop = false; + this.groupBoxTemplate.Text = "Template defaults"; + // + // sacsButtonReset + // + this.sacsButtonReset.Location = new System.Drawing.Point(65, 222); + this.sacsButtonReset.Margin = new System.Windows.Forms.Padding(4); + this.sacsButtonReset.Name = "sacsButtonReset"; + this.sacsButtonReset.Size = new System.Drawing.Size(156, 28); + this.sacsButtonReset.TabIndex = 4; + this.sacsButtonReset.Text = "Restore defaults"; + this.sacsButtonReset.UseVisualStyleBackColor = true; + // + // sacsTextBox4 + // + this.sacsTextBox4.Location = new System.Drawing.Point(6, 105); + this.sacsTextBox4.Multiline = true; + this.sacsTextBox4.Name = "sacsTextBox4"; + this.sacsTextBox4.ReadOnly = true; + this.sacsTextBox4.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.sacsTextBox4.Size = new System.Drawing.Size(274, 106); + this.sacsTextBox4.TabIndex = 3; + // + // sacsTextBox3 + // + this.sacsTextBox3.Location = new System.Drawing.Point(6, 77); + this.sacsTextBox3.Name = "sacsTextBox3"; + this.sacsTextBox3.ReadOnly = true; + this.sacsTextBox3.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox3.TabIndex = 2; + // + // sacsTextBox2 + // + this.sacsTextBox2.Location = new System.Drawing.Point(6, 49); + this.sacsTextBox2.Name = "sacsTextBox2"; + this.sacsTextBox2.ReadOnly = true; + this.sacsTextBox2.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox2.TabIndex = 1; + // + // sacsTextBox1 + // + this.sacsTextBox1.Location = new System.Drawing.Point(6, 21); + this.sacsTextBox1.Name = "sacsTextBox1"; + this.sacsTextBox1.ReadOnly = true; + this.sacsTextBox1.Size = new System.Drawing.Size(276, 22); + this.sacsTextBox1.TabIndex = 0; + // + // SpmForm_FacilitySession_Theatre + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(782, 453); + this.ControlBox = false; + this.Controls.Add(this.groupBoxProperties); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.groupBoxIdentify); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(800, 500); + this.Name = "SpmForm_FacilitySession_Theatre"; + this.ShowIcon = false; + this.Text = "Theatre Session"; + this.groupBoxIdentify.ResumeLayout(false); + this.groupBoxIdentify.PerformLayout(); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.groupBoxTemplate.ResumeLayout(false); + this.groupBoxTemplate.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxIdentify; + private System.Windows.Forms.Label labelTheatre; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxTheatre; + private System.Windows.Forms.Label labelSessionDate; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSessionDate; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerFinishAt; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerStartAt; + private System.Windows.Forms.Label labelSpeciality; + private System.Windows.Forms.Label labelConsultantCode; + private Sarand.Win.Forms.Controls.SacsComboBox sacsComboBoxSpeciality; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxConsultantCode; + private System.Windows.Forms.Label labelStartAt; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxConsultant; + private System.Windows.Forms.Label label2; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxTemplate; + private System.Windows.Forms.Label labelNotes; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxNotes; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox4; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox3; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox2; + private Sarand.Win.Forms.Controls.SacsTextBox sacsTextBox1; + private System.Windows.Forms.Label labelOptions; + private System.Windows.Forms.CheckBox checkBoxHideTemplateNotes; + private System.Windows.Forms.CheckBox checkBoxNotAvailable; + private Sarand.Win.Forms.Controls.SacsButton sacsButtonReset; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.cs new file mode 100644 index 0000000..764ab57 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilitySession_Theatre : SpmForm_FacilitySession + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilitySession.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilitySession_Theatre() : this(new Config()) { } + public SpmForm_FacilitySession_Theatre(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilitySession_Theatre"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilitySession_Theatre.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilitySession_Theatre.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilitySession_Theatre.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Theatre.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/Maint/SpmForm_FacilitySession_Ward.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.Designer.cs new file mode 100644 index 0000000..a3390a8 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.Designer.cs @@ -0,0 +1,231 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilitySession_Ward + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxIdentify = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelTheatre = new System.Windows.Forms.Label(); + this.textBoxTheatre = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSessionDate = new System.Windows.Forms.Label(); + this.textBoxSessionDate = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.buttonReset = new Sarand.Win.Forms.Controls.SacsButton(); + this.textBoxNotes = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelNotes = new System.Windows.Forms.Label(); + this.checkBoxNotAvailable = new System.Windows.Forms.CheckBox(); + this.checkBoxHideTemplateNotes = new System.Windows.Forms.CheckBox(); + this.labelOptions = new System.Windows.Forms.Label(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.groupBoxIdentify.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(520, 412); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(412, 412); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // groupBoxIdentify + // + this.groupBoxIdentify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxIdentify.BorderColour = System.Drawing.Color.Gray; + this.groupBoxIdentify.Controls.Add(this.labelTheatre); + this.groupBoxIdentify.Controls.Add(this.textBoxTheatre); + this.groupBoxIdentify.Controls.Add(this.labelSessionDate); + this.groupBoxIdentify.Controls.Add(this.textBoxSessionDate); + this.groupBoxIdentify.Location = new System.Drawing.Point(12, 12); + this.groupBoxIdentify.Name = "groupBoxIdentify"; + this.groupBoxIdentify.Size = new System.Drawing.Size(608, 82); + this.groupBoxIdentify.TabIndex = 0; + this.groupBoxIdentify.TabStop = false; + this.groupBoxIdentify.Text = "Identify"; + // + // labelTheatre + // + this.labelTheatre.AutoSize = true; + this.labelTheatre.Location = new System.Drawing.Point(123, 51); + this.labelTheatre.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTheatre.Name = "labelTheatre"; + this.labelTheatre.Size = new System.Drawing.Size(58, 17); + this.labelTheatre.TabIndex = 2; + this.labelTheatre.Text = "Theatre"; + // + // textBoxTheatre + // + this.textBoxTheatre.Location = new System.Drawing.Point(188, 48); + this.textBoxTheatre.Name = "textBoxTheatre"; + this.textBoxTheatre.ReadOnly = true; + this.textBoxTheatre.Size = new System.Drawing.Size(280, 22); + this.textBoxTheatre.TabIndex = 3; + // + // labelSessionDate + // + this.labelSessionDate.AutoSize = true; + this.labelSessionDate.Location = new System.Drawing.Point(91, 23); + this.labelSessionDate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSessionDate.Name = "labelSessionDate"; + this.labelSessionDate.Size = new System.Drawing.Size(90, 17); + this.labelSessionDate.TabIndex = 0; + this.labelSessionDate.Text = "Session date"; + // + // textBoxSessionDate + // + this.textBoxSessionDate.Location = new System.Drawing.Point(188, 20); + this.textBoxSessionDate.Name = "textBoxSessionDate"; + this.textBoxSessionDate.ReadOnly = true; + this.textBoxSessionDate.Size = new System.Drawing.Size(280, 22); + this.textBoxSessionDate.TabIndex = 1; + // + // buttonReset + // + this.buttonReset.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.buttonReset.Location = new System.Drawing.Point(448, 263); + this.buttonReset.Margin = new System.Windows.Forms.Padding(4); + this.buttonReset.MinimumSize = new System.Drawing.Size(156, 28); + this.buttonReset.Name = "buttonReset"; + this.buttonReset.Size = new System.Drawing.Size(156, 28); + this.buttonReset.TabIndex = 5; + this.buttonReset.Text = "Restore defaults"; + this.buttonReset.UseVisualStyleBackColor = true; + // + // textBoxNotes + // + this.textBoxNotes.Location = new System.Drawing.Point(188, 52); + this.textBoxNotes.Multiline = true; + this.textBoxNotes.Name = "textBoxNotes"; + this.textBoxNotes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.textBoxNotes.Size = new System.Drawing.Size(408, 104); + this.textBoxNotes.TabIndex = 1; + // + // labelNotes + // + this.labelNotes.AutoSize = true; + this.labelNotes.Location = new System.Drawing.Point(136, 55); + this.labelNotes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelNotes.Name = "labelNotes"; + this.labelNotes.Size = new System.Drawing.Size(45, 17); + this.labelNotes.TabIndex = 0; + this.labelNotes.Text = "Notes"; + // + // checkBoxNotAvailable + // + this.checkBoxNotAvailable.AutoSize = true; + this.checkBoxNotAvailable.Location = new System.Drawing.Point(188, 190); + this.checkBoxNotAvailable.Name = "checkBoxNotAvailable"; + this.checkBoxNotAvailable.Size = new System.Drawing.Size(234, 21); + this.checkBoxNotAvailable.TabIndex = 3; + this.checkBoxNotAvailable.Text = "Not available (prohibit bookings)"; + this.checkBoxNotAvailable.UseVisualStyleBackColor = true; + // + // checkBoxHideTemplateNotes + // + this.checkBoxHideTemplateNotes.AutoSize = true; + this.checkBoxHideTemplateNotes.Location = new System.Drawing.Point(188, 217); + this.checkBoxHideTemplateNotes.Name = "checkBoxHideTemplateNotes"; + this.checkBoxHideTemplateNotes.Size = new System.Drawing.Size(288, 21); + this.checkBoxHideTemplateNotes.TabIndex = 4; + this.checkBoxHideTemplateNotes.Text = "Hide templates notes (on admissions list)"; + this.checkBoxHideTemplateNotes.UseVisualStyleBackColor = true; + // + // labelOptions + // + this.labelOptions.AutoSize = true; + this.labelOptions.Location = new System.Drawing.Point(124, 200); + this.labelOptions.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelOptions.Name = "labelOptions"; + this.labelOptions.Size = new System.Drawing.Size(57, 17); + this.labelOptions.TabIndex = 2; + this.labelOptions.Text = "Options"; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelOptions); + this.groupBoxProperties.Controls.Add(this.checkBoxHideTemplateNotes); + this.groupBoxProperties.Controls.Add(this.checkBoxNotAvailable); + this.groupBoxProperties.Controls.Add(this.labelNotes); + this.groupBoxProperties.Controls.Add(this.textBoxNotes); + this.groupBoxProperties.Controls.Add(this.buttonReset); + this.groupBoxProperties.Location = new System.Drawing.Point(9, 100); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(611, 298); + this.groupBoxProperties.TabIndex = 1; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // SpmForm_FacilitySession_Ward + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 453); + this.ControlBox = false; + this.Controls.Add(this.groupBoxProperties); + this.Controls.Add(this.groupBoxIdentify); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOk); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 500); + this.Name = "SpmForm_FacilitySession_Ward"; + this.ShowIcon = false; + this.Text = "Ward Session"; + this.groupBoxIdentify.ResumeLayout(false); + this.groupBoxIdentify.PerformLayout(); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxIdentify; + private System.Windows.Forms.Label labelTheatre; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxTheatre; + private System.Windows.Forms.Label labelSessionDate; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSessionDate; + private Sarand.Win.Forms.Controls.SacsButton buttonReset; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxNotes; + private System.Windows.Forms.Label labelNotes; + private System.Windows.Forms.CheckBox checkBoxNotAvailable; + private System.Windows.Forms.CheckBox checkBoxHideTemplateNotes; + private System.Windows.Forms.Label labelOptions; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.cs new file mode 100644 index 0000000..f8946a0 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilitySession_Ward : SpmForm_FacilitySession + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilitySession.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilitySession_Ward() : this(new Config()) { } + public SpmForm_FacilitySession_Ward(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilitySession_Ward"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilitySession_Ward.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilitySession_Ward.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilitySession_Ward.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilitySession_Ward.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/Maint/SpmForm_FacilityTemplate.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.Designer.cs new file mode 100644 index 0000000..0045a5b --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.Designer.cs @@ -0,0 +1,26 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilityTemplate + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "SpmForm_FacilityTemplate"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.cs new file mode 100644 index 0000000..8ad4aea --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate.cs @@ -0,0 +1,56 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilityTemplate : SpmForm_Item + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmFacilityTemplate FacilityTemplateToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilityTemplate() : this(new Config()) { } + public SpmForm_FacilityTemplate(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.Designer.cs new file mode 100644 index 0000000..ec7618d --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.Designer.cs @@ -0,0 +1,541 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilityTemplate_Clinic + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label2 = new System.Windows.Forms.Label(); + this.labelStartAt = new System.Windows.Forms.Label(); + this.labelApplication = new System.Windows.Forms.Label(); + this.labelthrough = new System.Windows.Forms.Label(); + this.sacsDateTimePicker1 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.sacsDateTimePicker2 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerFinishAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerStartAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelSpeciality = new System.Windows.Forms.Label(); + this.sacsComboBoxSpeciality = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.comboBoxConsultant = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelConsultantCode = new System.Windows.Forms.Label(); + this.textBoxConsultantCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDayOfWeek = new System.Windows.Forms.Label(); + this.comboBoxDayOfWeek = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelWeekOfMonth = new System.Windows.Forms.Label(); + this.comboBoxWeekOfMonth = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelFacility = new System.Windows.Forms.Label(); + this.textBoxFacility = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelMaximum = new System.Windows.Forms.Label(); + this.labelMinimum = new System.Windows.Forms.Label(); + this.textBoxSlotLengthMax = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.comboBoxSessionType = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelSessionType = new System.Windows.Forms.Label(); + this.labelSlotLength = new System.Windows.Forms.Label(); + this.labelOccupancy = new System.Windows.Forms.Label(); + this.textBoxSlotLengthMin = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.comboBoxSlotLength = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.comboBoxOccupany = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelName = new System.Windows.Forms.Label(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(339, 255); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(80, 17); + this.label2.TabIndex = 23; + this.label2.Text = "Finishing at"; + // + // labelStartAt + // + this.labelStartAt.AutoSize = true; + this.labelStartAt.Location = new System.Drawing.Point(108, 255); + this.labelStartAt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelStartAt.Name = "labelStartAt"; + this.labelStartAt.Size = new System.Drawing.Size(73, 17); + this.labelStartAt.TabIndex = 21; + this.labelStartAt.Text = "Starting at"; + // + // labelApplication + // + this.labelApplication.AutoSize = true; + this.labelApplication.Location = new System.Drawing.Point(72, 311); + this.labelApplication.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelApplication.Name = "labelApplication"; + this.labelApplication.Size = new System.Drawing.Size(109, 17); + this.labelApplication.TabIndex = 31; + this.labelApplication.Text = "Application from"; + // + // labelthrough + // + this.labelthrough.AutoSize = true; + this.labelthrough.Location = new System.Drawing.Point(364, 311); + this.labelthrough.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelthrough.Name = "labelthrough"; + this.labelthrough.Size = new System.Drawing.Size(57, 17); + this.labelthrough.TabIndex = 33; + this.labelthrough.Text = "through"; + // + // sacsDateTimePicker1 + // + this.sacsDateTimePicker1.Location = new System.Drawing.Point(426, 308); + this.sacsDateTimePicker1.Name = "sacsDateTimePicker1"; + this.sacsDateTimePicker1.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker1.TabIndex = 34; + this.sacsDateTimePicker1.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // sacsDateTimePicker2 + // + this.sacsDateTimePicker2.Location = new System.Drawing.Point(188, 308); + this.sacsDateTimePicker2.Name = "sacsDateTimePicker2"; + this.sacsDateTimePicker2.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker2.TabIndex = 32; + this.sacsDateTimePicker2.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerFinishAt + // + this.dateTimePickerFinishAt.Location = new System.Drawing.Point(426, 250); + this.dateTimePickerFinishAt.Name = "dateTimePickerFinishAt"; + this.dateTimePickerFinishAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerFinishAt.TabIndex = 24; + this.dateTimePickerFinishAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerStartAt + // + this.dateTimePickerStartAt.Location = new System.Drawing.Point(188, 250); + this.dateTimePickerStartAt.Name = "dateTimePickerStartAt"; + this.dateTimePickerStartAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerStartAt.TabIndex = 22; + this.dateTimePickerStartAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelSpeciality + // + this.labelSpeciality.AutoSize = true; + this.labelSpeciality.Location = new System.Drawing.Point(113, 223); + this.labelSpeciality.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSpeciality.Name = "labelSpeciality"; + this.labelSpeciality.Size = new System.Drawing.Size(68, 17); + this.labelSpeciality.TabIndex = 19; + this.labelSpeciality.Text = "Speciality"; + // + // sacsComboBoxSpeciality + // + this.sacsComboBoxSpeciality.FormattingEnabled = true; + this.sacsComboBoxSpeciality.Location = new System.Drawing.Point(188, 220); + this.sacsComboBoxSpeciality.Name = "sacsComboBoxSpeciality"; + this.sacsComboBoxSpeciality.Size = new System.Drawing.Size(204, 24); + this.sacsComboBoxSpeciality.TabIndex = 20; + // + // comboBoxConsultant + // + this.comboBoxConsultant.FormattingEnabled = true; + this.comboBoxConsultant.Location = new System.Drawing.Point(245, 190); + this.comboBoxConsultant.Name = "comboBoxConsultant"; + this.comboBoxConsultant.Size = new System.Drawing.Size(204, 24); + this.comboBoxConsultant.TabIndex = 18; + // + // labelConsultantCode + // + this.labelConsultantCode.AutoSize = true; + this.labelConsultantCode.Location = new System.Drawing.Point(106, 195); + this.labelConsultantCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelConsultantCode.Name = "labelConsultantCode"; + this.labelConsultantCode.Size = new System.Drawing.Size(75, 17); + this.labelConsultantCode.TabIndex = 16; + this.labelConsultantCode.Text = "Consultant"; + // + // textBoxConsultantCode + // + this.textBoxConsultantCode.Location = new System.Drawing.Point(188, 192); + this.textBoxConsultantCode.Name = "textBoxConsultantCode"; + this.textBoxConsultantCode.Size = new System.Drawing.Size(51, 22); + this.textBoxConsultantCode.TabIndex = 17; + // + // labelDayOfWeek + // + this.labelDayOfWeek.AutoSize = true; + this.labelDayOfWeek.Location = new System.Drawing.Point(96, 135); + this.labelDayOfWeek.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDayOfWeek.Name = "labelDayOfWeek"; + this.labelDayOfWeek.Size = new System.Drawing.Size(85, 17); + this.labelDayOfWeek.TabIndex = 8; + this.labelDayOfWeek.Text = "Day of week"; + // + // comboBoxDayOfWeek + // + this.comboBoxDayOfWeek.FormattingEnabled = true; + this.comboBoxDayOfWeek.Location = new System.Drawing.Point(188, 132); + this.comboBoxDayOfWeek.Name = "comboBoxDayOfWeek"; + this.comboBoxDayOfWeek.Size = new System.Drawing.Size(102, 24); + this.comboBoxDayOfWeek.TabIndex = 9; + // + // labelWeekOfMonth + // + this.labelWeekOfMonth.AutoSize = true; + this.labelWeekOfMonth.Location = new System.Drawing.Point(384, 135); + this.labelWeekOfMonth.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelWeekOfMonth.Name = "labelWeekOfMonth"; + this.labelWeekOfMonth.Size = new System.Drawing.Size(103, 17); + this.labelWeekOfMonth.TabIndex = 10; + this.labelWeekOfMonth.Text = "Week of month"; + // + // comboBoxWeekOfMonth + // + this.comboBoxWeekOfMonth.FormattingEnabled = true; + this.comboBoxWeekOfMonth.Location = new System.Drawing.Point(494, 132); + this.comboBoxWeekOfMonth.Name = "comboBoxWeekOfMonth"; + this.comboBoxWeekOfMonth.Size = new System.Drawing.Size(102, 24); + this.comboBoxWeekOfMonth.TabIndex = 11; + // + // labelFacility + // + this.labelFacility.AutoSize = true; + this.labelFacility.Location = new System.Drawing.Point(130, 51); + this.labelFacility.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFacility.Name = "labelFacility"; + this.labelFacility.Size = new System.Drawing.Size(51, 17); + this.labelFacility.TabIndex = 2; + this.labelFacility.Text = "Facility"; + // + // textBoxFacility + // + this.textBoxFacility.Location = new System.Drawing.Point(188, 48); + this.textBoxFacility.Name = "textBoxFacility"; + this.textBoxFacility.ReadOnly = true; + this.textBoxFacility.Size = new System.Drawing.Size(408, 22); + this.textBoxFacility.TabIndex = 3; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 23); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 0; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 20); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 1; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(12, 365); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 340); + this.tabControl.TabIndex = 1; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 311); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(750, 311); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(412, 712); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(520, 712); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelMaximum); + this.groupBoxProperties.Controls.Add(this.labelMinimum); + this.groupBoxProperties.Controls.Add(this.textBoxSlotLengthMax); + this.groupBoxProperties.Controls.Add(this.comboBoxSessionType); + this.groupBoxProperties.Controls.Add(this.labelSessionType); + this.groupBoxProperties.Controls.Add(this.labelSlotLength); + this.groupBoxProperties.Controls.Add(this.labelOccupancy); + this.groupBoxProperties.Controls.Add(this.textBoxSlotLengthMin); + this.groupBoxProperties.Controls.Add(this.comboBoxSlotLength); + this.groupBoxProperties.Controls.Add(this.comboBoxOccupany); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.label2); + this.groupBoxProperties.Controls.Add(this.labelStartAt); + this.groupBoxProperties.Controls.Add(this.labelApplication); + this.groupBoxProperties.Controls.Add(this.labelthrough); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker1); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker2); + this.groupBoxProperties.Controls.Add(this.dateTimePickerFinishAt); + this.groupBoxProperties.Controls.Add(this.dateTimePickerStartAt); + this.groupBoxProperties.Controls.Add(this.labelSpeciality); + this.groupBoxProperties.Controls.Add(this.sacsComboBoxSpeciality); + this.groupBoxProperties.Controls.Add(this.comboBoxConsultant); + this.groupBoxProperties.Controls.Add(this.labelConsultantCode); + this.groupBoxProperties.Controls.Add(this.textBoxConsultantCode); + this.groupBoxProperties.Controls.Add(this.labelDayOfWeek); + this.groupBoxProperties.Controls.Add(this.comboBoxDayOfWeek); + this.groupBoxProperties.Controls.Add(this.labelWeekOfMonth); + this.groupBoxProperties.Controls.Add(this.comboBoxWeekOfMonth); + this.groupBoxProperties.Controls.Add(this.labelFacility); + this.groupBoxProperties.Controls.Add(this.textBoxFacility); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(13, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 347); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelMaximum + // + this.labelMaximum.AutoSize = true; + this.labelMaximum.Location = new System.Drawing.Point(472, 281); + this.labelMaximum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMaximum.Name = "labelMaximum"; + this.labelMaximum.Size = new System.Drawing.Size(66, 17); + this.labelMaximum.TabIndex = 29; + this.labelMaximum.Text = "Maximum"; + // + // labelMinimum + // + this.labelMinimum.AutoSize = true; + this.labelMinimum.Location = new System.Drawing.Point(344, 281); + this.labelMinimum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMinimum.Name = "labelMinimum"; + this.labelMinimum.Size = new System.Drawing.Size(63, 17); + this.labelMinimum.TabIndex = 27; + this.labelMinimum.Text = "Minimum"; + // + // textBoxSlotLengthMax + // + this.textBoxSlotLengthMax.Location = new System.Drawing.Point(545, 278); + this.textBoxSlotLengthMax.Name = "textBoxSlotLengthMax"; + this.textBoxSlotLengthMax.Size = new System.Drawing.Size(51, 22); + this.textBoxSlotLengthMax.TabIndex = 30; + // + // comboBoxSessionType + // + this.comboBoxSessionType.FormattingEnabled = true; + this.comboBoxSessionType.Location = new System.Drawing.Point(494, 162); + this.comboBoxSessionType.Name = "comboBoxSessionType"; + this.comboBoxSessionType.Size = new System.Drawing.Size(102, 24); + this.comboBoxSessionType.TabIndex = 15; + // + // labelSessionType + // + this.labelSessionType.AutoSize = true; + this.labelSessionType.Location = new System.Drawing.Point(426, 165); + this.labelSessionType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSessionType.Name = "labelSessionType"; + this.labelSessionType.Size = new System.Drawing.Size(61, 17); + this.labelSessionType.TabIndex = 14; + this.labelSessionType.Text = "List type"; + // + // labelSlotLength + // + this.labelSlotLength.AutoSize = true; + this.labelSlotLength.Location = new System.Drawing.Point(106, 281); + this.labelSlotLength.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSlotLength.Name = "labelSlotLength"; + this.labelSlotLength.Size = new System.Drawing.Size(75, 17); + this.labelSlotLength.TabIndex = 25; + this.labelSlotLength.Text = "Slot length"; + // + // labelOccupancy + // + this.labelOccupancy.AutoSize = true; + this.labelOccupancy.Location = new System.Drawing.Point(102, 165); + this.labelOccupancy.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelOccupancy.Name = "labelOccupancy"; + this.labelOccupancy.Size = new System.Drawing.Size(79, 17); + this.labelOccupancy.TabIndex = 12; + this.labelOccupancy.Text = "Occupancy"; + // + // textBoxSlotLengthMin + // + this.textBoxSlotLengthMin.Location = new System.Drawing.Point(414, 278); + this.textBoxSlotLengthMin.Name = "textBoxSlotLengthMin"; + this.textBoxSlotLengthMin.Size = new System.Drawing.Size(51, 22); + this.textBoxSlotLengthMin.TabIndex = 28; + // + // comboBoxSlotLength + // + this.comboBoxSlotLength.FormattingEnabled = true; + this.comboBoxSlotLength.Location = new System.Drawing.Point(188, 278); + this.comboBoxSlotLength.Name = "comboBoxSlotLength"; + this.comboBoxSlotLength.Size = new System.Drawing.Size(102, 24); + this.comboBoxSlotLength.TabIndex = 26; + // + // comboBoxOccupany + // + this.comboBoxOccupany.FormattingEnabled = true; + this.comboBoxOccupany.Location = new System.Drawing.Point(188, 162); + this.comboBoxOccupany.Name = "comboBoxOccupany"; + this.comboBoxOccupany.Size = new System.Drawing.Size(204, 24); + this.comboBoxOccupany.TabIndex = 13; + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(100, 79); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(81, 17); + this.labelName.TabIndex = 4; + this.labelName.Text = "Short name"; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(102, 107); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 6; + this.labelDesc.Text = "Description"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(188, 76); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.Size = new System.Drawing.Size(204, 22); + this.textBoxName.TabIndex = 5; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(188, 104); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxDesc.TabIndex = 7; + // + // SpmForm_FacilityTemplate_Clinic + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 753); + this.ControlBox = false; + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 800); + this.Name = "SpmForm_FacilityTemplate_Clinic"; + this.ShowIcon = false; + this.Text = "Update Clinic Template"; + this.tabControl.ResumeLayout(false); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelStartAt; + private System.Windows.Forms.Label labelApplication; + private System.Windows.Forms.Label labelthrough; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker1; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker2; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerFinishAt; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerStartAt; + private System.Windows.Forms.Label labelSpeciality; + private Sarand.Win.Forms.Controls.SacsComboBox sacsComboBoxSpeciality; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxConsultant; + private System.Windows.Forms.Label labelConsultantCode; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxConsultantCode; + private System.Windows.Forms.Label labelDayOfWeek; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxDayOfWeek; + private System.Windows.Forms.Label labelWeekOfMonth; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxWeekOfMonth; + private System.Windows.Forms.Label labelFacility; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxFacility; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelSlotLength; + private System.Windows.Forms.Label labelOccupancy; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSlotLengthMin; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxSlotLength; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxOccupany; + private System.Windows.Forms.Label labelName; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxSessionType; + private System.Windows.Forms.Label labelSessionType; + private System.Windows.Forms.Label labelMaximum; + private System.Windows.Forms.Label labelMinimum; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSlotLengthMax; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.cs new file mode 100644 index 0000000..0ca5094 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilityTemplate_Clinic : SpmForm_FacilityTemplate + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilityTemplate.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilityTemplate_Clinic() : this(new Config()) { } + public SpmForm_FacilityTemplate_Clinic(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilityTemplate_Clinic"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilityTemplate_Clinic.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilityTemplate_Clinic.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilityTemplate_Clinic.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Clinic.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/Maint/SpmForm_FacilityTemplate_Slot.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.Designer.cs new file mode 100644 index 0000000..1dea966 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.Designer.cs @@ -0,0 +1,290 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilityTemplate_Slot + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxTemplate = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxFacility = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelTemplate = new System.Windows.Forms.Label(); + this.textBoxComplexity = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelFacility = new System.Windows.Forms.Label(); + this.labelComplexity = new System.Windows.Forms.Label(); + this.textBoxCapacity = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDurationAverage = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDurationTotal = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelCapacity = new System.Windows.Forms.Label(); + this.labelDurationAverage = new System.Windows.Forms.Label(); + this.labelDurationTotal = new System.Windows.Forms.Label(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelMinutes = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 292); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 12; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 292); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 13; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 22); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 6; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 25); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 5; + this.labelDepartment.Text = "Department"; + // + // textBoxTemplate + // + this.textBoxTemplate.Location = new System.Drawing.Point(188, 78); + this.textBoxTemplate.Multiline = true; + this.textBoxTemplate.Name = "textBoxTemplate"; + this.textBoxTemplate.ReadOnly = true; + this.textBoxTemplate.Size = new System.Drawing.Size(408, 61); + this.textBoxTemplate.TabIndex = 6; + // + // textBoxFacility + // + this.textBoxFacility.Location = new System.Drawing.Point(188, 50); + this.textBoxFacility.Name = "textBoxFacility"; + this.textBoxFacility.ReadOnly = true; + this.textBoxFacility.Size = new System.Drawing.Size(408, 22); + this.textBoxFacility.TabIndex = 8; + // + // labelTemplate + // + this.labelTemplate.AutoSize = true; + this.labelTemplate.Location = new System.Drawing.Point(114, 81); + this.labelTemplate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelTemplate.Name = "labelTemplate"; + this.labelTemplate.Size = new System.Drawing.Size(67, 17); + this.labelTemplate.TabIndex = 5; + this.labelTemplate.Text = "Template"; + // + // textBoxComplexity + // + this.textBoxComplexity.Location = new System.Drawing.Point(188, 145); + this.textBoxComplexity.Name = "textBoxComplexity"; + this.textBoxComplexity.ReadOnly = true; + this.textBoxComplexity.Size = new System.Drawing.Size(408, 22); + this.textBoxComplexity.TabIndex = 8; + // + // labelFacility + // + this.labelFacility.AutoSize = true; + this.labelFacility.Location = new System.Drawing.Point(130, 53); + this.labelFacility.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFacility.Name = "labelFacility"; + this.labelFacility.Size = new System.Drawing.Size(51, 17); + this.labelFacility.TabIndex = 7; + this.labelFacility.Text = "Facility"; + // + // labelComplexity + // + this.labelComplexity.AutoSize = true; + this.labelComplexity.Location = new System.Drawing.Point(106, 148); + this.labelComplexity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelComplexity.Name = "labelComplexity"; + this.labelComplexity.Size = new System.Drawing.Size(75, 17); + this.labelComplexity.TabIndex = 7; + this.labelComplexity.Text = "Complexity"; + // + // textBoxCapacity + // + this.textBoxCapacity.Location = new System.Drawing.Point(188, 173); + this.textBoxCapacity.Name = "textBoxCapacity"; + this.textBoxCapacity.Size = new System.Drawing.Size(102, 22); + this.textBoxCapacity.TabIndex = 9; + // + // textBoxDurationAverage + // + this.textBoxDurationAverage.Location = new System.Drawing.Point(188, 201); + this.textBoxDurationAverage.Name = "textBoxDurationAverage"; + this.textBoxDurationAverage.Size = new System.Drawing.Size(102, 22); + this.textBoxDurationAverage.TabIndex = 10; + // + // textBoxDurationTotal + // + this.textBoxDurationTotal.Location = new System.Drawing.Point(188, 226); + this.textBoxDurationTotal.Name = "textBoxDurationTotal"; + this.textBoxDurationTotal.ReadOnly = true; + this.textBoxDurationTotal.Size = new System.Drawing.Size(102, 22); + this.textBoxDurationTotal.TabIndex = 11; + // + // labelCapacity + // + this.labelCapacity.AutoSize = true; + this.labelCapacity.Location = new System.Drawing.Point(106, 176); + this.labelCapacity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelCapacity.Name = "labelCapacity"; + this.labelCapacity.Size = new System.Drawing.Size(62, 17); + this.labelCapacity.TabIndex = 12; + this.labelCapacity.Text = "Capacity"; + // + // labelDurationAverage + // + this.labelDurationAverage.AutoSize = true; + this.labelDurationAverage.Location = new System.Drawing.Point(64, 204); + this.labelDurationAverage.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDurationAverage.Name = "labelDurationAverage"; + this.labelDurationAverage.Size = new System.Drawing.Size(117, 17); + this.labelDurationAverage.TabIndex = 13; + this.labelDurationAverage.Text = "Average duration"; + // + // labelDurationTotal + // + this.labelDurationTotal.AutoSize = true; + this.labelDurationTotal.Location = new System.Drawing.Point(85, 229); + this.labelDurationTotal.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDurationTotal.Name = "labelDurationTotal"; + this.labelDurationTotal.Size = new System.Drawing.Size(96, 17); + this.labelDurationTotal.TabIndex = 14; + this.labelDurationTotal.Text = "Total duration"; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelMinutes); + this.groupBoxProperties.Controls.Add(this.label1); + this.groupBoxProperties.Controls.Add(this.label2); + this.groupBoxProperties.Controls.Add(this.labelDurationTotal); + this.groupBoxProperties.Controls.Add(this.labelDurationAverage); + this.groupBoxProperties.Controls.Add(this.labelCapacity); + this.groupBoxProperties.Controls.Add(this.textBoxDurationTotal); + this.groupBoxProperties.Controls.Add(this.textBoxDurationAverage); + this.groupBoxProperties.Controls.Add(this.textBoxCapacity); + this.groupBoxProperties.Controls.Add(this.labelComplexity); + this.groupBoxProperties.Controls.Add(this.labelFacility); + this.groupBoxProperties.Controls.Add(this.textBoxComplexity); + this.groupBoxProperties.Controls.Add(this.labelTemplate); + this.groupBoxProperties.Controls.Add(this.textBoxFacility); + this.groupBoxProperties.Controls.Add(this.textBoxTemplate); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 265); + this.groupBoxProperties.TabIndex = 11; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelMinutes + // + this.labelMinutes.AutoSize = true; + this.labelMinutes.Location = new System.Drawing.Point(297, 176); + this.labelMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMinutes.Name = "labelMinutes"; + this.labelMinutes.Size = new System.Drawing.Size(37, 17); + this.labelMinutes.TabIndex = 17; + this.labelMinutes.Text = "mins"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(297, 204); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(37, 17); + this.label1.TabIndex = 18; + this.label1.Text = "mins"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(297, 229); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(37, 17); + this.label2.TabIndex = 19; + this.label2.Text = "mins"; + // + // SpmForm_FacilityTemplate_Slot + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 333); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 380); + this.Name = "SpmForm_FacilityTemplate_Slot"; + this.ShowIcon = false; + this.Text = "SpmFormFacilityTemplate_Slot"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxTemplate; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxFacility; + private System.Windows.Forms.Label labelTemplate; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxComplexity; + private System.Windows.Forms.Label labelFacility; + private System.Windows.Forms.Label labelComplexity; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxCapacity; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDurationAverage; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDurationTotal; + private System.Windows.Forms.Label labelCapacity; + private System.Windows.Forms.Label labelDurationAverage; + private System.Windows.Forms.Label labelDurationTotal; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelMinutes; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.cs new file mode 100644 index 0000000..7f3863a --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilityTemplate_Slot : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilityTemplate_Slot() : this(new Config()) { } + public SpmForm_FacilityTemplate_Slot(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilityTemplate_Slot"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilityTemplate_Slot.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilityTemplate_Slot.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilityTemplate_Slot.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Slot.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/Maint/SpmForm_FacilityTemplate_Theatre.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.Designer.cs new file mode 100644 index 0000000..53be824 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.Designer.cs @@ -0,0 +1,377 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilityTemplate_Theatre + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.labelStartAt = new System.Windows.Forms.Label(); + this.labelApplication = new System.Windows.Forms.Label(); + this.labelthrough = new System.Windows.Forms.Label(); + this.sacsDateTimePicker1 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.sacsDateTimePicker2 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerFinishAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerStartAt = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelSpeciality = new System.Windows.Forms.Label(); + this.sacsComboBoxSpeciality = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.comboBoxConsultant = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelConsultantCode = new System.Windows.Forms.Label(); + this.textBoxConsultantCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDayOfWeek = new System.Windows.Forms.Label(); + this.comboBoxDayOfWeek = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelWeekOfMonth = new System.Windows.Forms.Label(); + this.comboBoxWeekOfMonth = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelFacility = new System.Windows.Forms.Label(); + this.textBoxFacility = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 512); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 10; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 208); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(750, 208); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(11, 268); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 237); + this.tabControl.TabIndex = 9; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 512); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 11; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.label2); + this.groupBoxProperties.Controls.Add(this.labelStartAt); + this.groupBoxProperties.Controls.Add(this.labelApplication); + this.groupBoxProperties.Controls.Add(this.labelthrough); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker1); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker2); + this.groupBoxProperties.Controls.Add(this.dateTimePickerFinishAt); + this.groupBoxProperties.Controls.Add(this.dateTimePickerStartAt); + this.groupBoxProperties.Controls.Add(this.labelSpeciality); + this.groupBoxProperties.Controls.Add(this.sacsComboBoxSpeciality); + this.groupBoxProperties.Controls.Add(this.comboBoxConsultant); + this.groupBoxProperties.Controls.Add(this.labelConsultantCode); + this.groupBoxProperties.Controls.Add(this.textBoxConsultantCode); + this.groupBoxProperties.Controls.Add(this.labelDayOfWeek); + this.groupBoxProperties.Controls.Add(this.comboBoxDayOfWeek); + this.groupBoxProperties.Controls.Add(this.labelWeekOfMonth); + this.groupBoxProperties.Controls.Add(this.comboBoxWeekOfMonth); + this.groupBoxProperties.Controls.Add(this.labelFacility); + this.groupBoxProperties.Controls.Add(this.textBoxFacility); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 250); + this.groupBoxProperties.TabIndex = 8; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(339, 199); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(80, 17); + this.label2.TabIndex = 22; + this.label2.Text = "Finishing at"; + // + // labelStartAt + // + this.labelStartAt.AutoSize = true; + this.labelStartAt.Location = new System.Drawing.Point(108, 199); + this.labelStartAt.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelStartAt.Name = "labelStartAt"; + this.labelStartAt.Size = new System.Drawing.Size(73, 17); + this.labelStartAt.TabIndex = 21; + this.labelStartAt.Text = "Starting at"; + // + // labelApplication + // + this.labelApplication.AutoSize = true; + this.labelApplication.Location = new System.Drawing.Point(72, 223); + this.labelApplication.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelApplication.Name = "labelApplication"; + this.labelApplication.Size = new System.Drawing.Size(109, 17); + this.labelApplication.TabIndex = 17; + this.labelApplication.Text = "Application from"; + // + // labelthrough + // + this.labelthrough.AutoSize = true; + this.labelthrough.Location = new System.Drawing.Point(364, 225); + this.labelthrough.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelthrough.Name = "labelthrough"; + this.labelthrough.Size = new System.Drawing.Size(57, 17); + this.labelthrough.TabIndex = 19; + this.labelthrough.Text = "through"; + // + // sacsDateTimePicker1 + // + this.sacsDateTimePicker1.Location = new System.Drawing.Point(426, 222); + this.sacsDateTimePicker1.Name = "sacsDateTimePicker1"; + this.sacsDateTimePicker1.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker1.TabIndex = 20; + this.sacsDateTimePicker1.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // sacsDateTimePicker2 + // + this.sacsDateTimePicker2.Location = new System.Drawing.Point(188, 222); + this.sacsDateTimePicker2.Name = "sacsDateTimePicker2"; + this.sacsDateTimePicker2.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker2.TabIndex = 18; + this.sacsDateTimePicker2.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerFinishAt + // + this.dateTimePickerFinishAt.Location = new System.Drawing.Point(426, 194); + this.dateTimePickerFinishAt.Name = "dateTimePickerFinishAt"; + this.dateTimePickerFinishAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerFinishAt.TabIndex = 16; + this.dateTimePickerFinishAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // dateTimePickerStartAt + // + this.dateTimePickerStartAt.Location = new System.Drawing.Point(188, 194); + this.dateTimePickerStartAt.Name = "dateTimePickerStartAt"; + this.dateTimePickerStartAt.Size = new System.Drawing.Size(102, 22); + this.dateTimePickerStartAt.TabIndex = 15; + this.dateTimePickerStartAt.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelSpeciality + // + this.labelSpeciality.AutoSize = true; + this.labelSpeciality.Location = new System.Drawing.Point(113, 167); + this.labelSpeciality.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSpeciality.Name = "labelSpeciality"; + this.labelSpeciality.Size = new System.Drawing.Size(68, 17); + this.labelSpeciality.TabIndex = 14; + this.labelSpeciality.Text = "Speciality"; + // + // sacsComboBoxSpeciality + // + this.sacsComboBoxSpeciality.FormattingEnabled = true; + this.sacsComboBoxSpeciality.Location = new System.Drawing.Point(188, 164); + this.sacsComboBoxSpeciality.Name = "sacsComboBoxSpeciality"; + this.sacsComboBoxSpeciality.Size = new System.Drawing.Size(204, 24); + this.sacsComboBoxSpeciality.TabIndex = 13; + // + // comboBoxConsultant + // + this.comboBoxConsultant.FormattingEnabled = true; + this.comboBoxConsultant.Location = new System.Drawing.Point(245, 134); + this.comboBoxConsultant.Name = "comboBoxConsultant"; + this.comboBoxConsultant.Size = new System.Drawing.Size(204, 24); + this.comboBoxConsultant.TabIndex = 12; + // + // labelConsultantCode + // + this.labelConsultantCode.AutoSize = true; + this.labelConsultantCode.Location = new System.Drawing.Point(106, 139); + this.labelConsultantCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelConsultantCode.Name = "labelConsultantCode"; + this.labelConsultantCode.Size = new System.Drawing.Size(75, 17); + this.labelConsultantCode.TabIndex = 10; + this.labelConsultantCode.Text = "Consultant"; + // + // textBoxConsultantCode + // + this.textBoxConsultantCode.Location = new System.Drawing.Point(188, 136); + this.textBoxConsultantCode.Name = "textBoxConsultantCode"; + this.textBoxConsultantCode.Size = new System.Drawing.Size(51, 22); + this.textBoxConsultantCode.TabIndex = 11; + // + // labelDayOfWeek + // + this.labelDayOfWeek.AutoSize = true; + this.labelDayOfWeek.Location = new System.Drawing.Point(96, 109); + this.labelDayOfWeek.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDayOfWeek.Name = "labelDayOfWeek"; + this.labelDayOfWeek.Size = new System.Drawing.Size(85, 17); + this.labelDayOfWeek.TabIndex = 8; + this.labelDayOfWeek.Text = "Day of week"; + // + // comboBoxDayOfWeek + // + this.comboBoxDayOfWeek.FormattingEnabled = true; + this.comboBoxDayOfWeek.Location = new System.Drawing.Point(188, 106); + this.comboBoxDayOfWeek.Name = "comboBoxDayOfWeek"; + this.comboBoxDayOfWeek.Size = new System.Drawing.Size(102, 24); + this.comboBoxDayOfWeek.TabIndex = 9; + // + // labelWeekOfMonth + // + this.labelWeekOfMonth.AutoSize = true; + this.labelWeekOfMonth.Location = new System.Drawing.Point(78, 79); + this.labelWeekOfMonth.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelWeekOfMonth.Name = "labelWeekOfMonth"; + this.labelWeekOfMonth.Size = new System.Drawing.Size(103, 17); + this.labelWeekOfMonth.TabIndex = 6; + this.labelWeekOfMonth.Text = "Week of month"; + // + // comboBoxWeekOfMonth + // + this.comboBoxWeekOfMonth.FormattingEnabled = true; + this.comboBoxWeekOfMonth.Location = new System.Drawing.Point(188, 76); + this.comboBoxWeekOfMonth.Name = "comboBoxWeekOfMonth"; + this.comboBoxWeekOfMonth.Size = new System.Drawing.Size(102, 24); + this.comboBoxWeekOfMonth.TabIndex = 7; + // + // labelFacility + // + this.labelFacility.AutoSize = true; + this.labelFacility.Location = new System.Drawing.Point(130, 51); + this.labelFacility.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFacility.Name = "labelFacility"; + this.labelFacility.Size = new System.Drawing.Size(51, 17); + this.labelFacility.TabIndex = 4; + this.labelFacility.Text = "Facility"; + // + // textBoxFacility + // + this.textBoxFacility.Location = new System.Drawing.Point(188, 48); + this.textBoxFacility.Name = "textBoxFacility"; + this.textBoxFacility.ReadOnly = true; + this.textBoxFacility.Size = new System.Drawing.Size(408, 22); + this.textBoxFacility.TabIndex = 5; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 23); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 2; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 20); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 3; + // + // SpmForm_FacilityTemplate_Theatre + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 553); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 600); + this.Name = "SpmForm_FacilityTemplate_Theatre"; + this.ShowIcon = false; + this.Text = "Update Theatre Template"; + this.tabControl.ResumeLayout(false); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabControl tabControl; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelFacility; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxFacility; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.Label labelDayOfWeek; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxDayOfWeek; + private System.Windows.Forms.Label labelWeekOfMonth; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxWeekOfMonth; + private System.Windows.Forms.Label labelSpeciality; + private Sarand.Win.Forms.Controls.SacsComboBox sacsComboBoxSpeciality; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxConsultant; + private System.Windows.Forms.Label labelConsultantCode; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxConsultantCode; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerFinishAt; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerStartAt; + private System.Windows.Forms.Label labelApplication; + private System.Windows.Forms.Label labelthrough; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker1; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker2; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label labelStartAt; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.cs new file mode 100644 index 0000000..c152f57 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilityTemplate_Theatre : SpmForm_FacilityTemplate + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilityTemplate.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilityTemplate_Theatre() : this(new Config()) { } + public SpmForm_FacilityTemplate_Theatre(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilityTemplate_Theatre"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilityTemplate_Theatre.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilityTemplate_Theatre.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilityTemplate_Theatre.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Theatre.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/Maint/SpmForm_FacilityTemplate_Ward.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.Designer.cs new file mode 100644 index 0000000..d3c4f6f --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.Designer.cs @@ -0,0 +1,317 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_FacilityTemplate_Ward + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.labelApplication = new System.Windows.Forms.Label(); + this.labelthrough = new System.Windows.Forms.Label(); + this.sacsDateTimePicker1 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.sacsDateTimePicker2 = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelFacility = new System.Windows.Forms.Label(); + this.textBoxFacility = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.comboBoxGroup = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelGroup = new System.Windows.Forms.Label(); + this.labelType = new System.Windows.Forms.Label(); + this.comboBoxType = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelName = new System.Windows.Forms.Label(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxName = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.tabControl.SuspendLayout(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // labelApplication + // + this.labelApplication.AutoSize = true; + this.labelApplication.Location = new System.Drawing.Point(72, 163); + this.labelApplication.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelApplication.Name = "labelApplication"; + this.labelApplication.Size = new System.Drawing.Size(109, 17); + this.labelApplication.TabIndex = 12; + this.labelApplication.Text = "Application from"; + // + // labelthrough + // + this.labelthrough.AutoSize = true; + this.labelthrough.Location = new System.Drawing.Point(364, 165); + this.labelthrough.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelthrough.Name = "labelthrough"; + this.labelthrough.Size = new System.Drawing.Size(57, 17); + this.labelthrough.TabIndex = 14; + this.labelthrough.Text = "through"; + // + // sacsDateTimePicker1 + // + this.sacsDateTimePicker1.Location = new System.Drawing.Point(426, 162); + this.sacsDateTimePicker1.Name = "sacsDateTimePicker1"; + this.sacsDateTimePicker1.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker1.TabIndex = 15; + this.sacsDateTimePicker1.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // sacsDateTimePicker2 + // + this.sacsDateTimePicker2.Location = new System.Drawing.Point(188, 162); + this.sacsDateTimePicker2.Name = "sacsDateTimePicker2"; + this.sacsDateTimePicker2.Size = new System.Drawing.Size(170, 22); + this.sacsDateTimePicker2.TabIndex = 13; + this.sacsDateTimePicker2.Value = new System.DateTime(2019, 6, 13, 0, 0, 0, 0); + // + // labelFacility + // + this.labelFacility.AutoSize = true; + this.labelFacility.Location = new System.Drawing.Point(130, 51); + this.labelFacility.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFacility.Name = "labelFacility"; + this.labelFacility.Size = new System.Drawing.Size(51, 17); + this.labelFacility.TabIndex = 2; + this.labelFacility.Text = "Facility"; + // + // textBoxFacility + // + this.textBoxFacility.Location = new System.Drawing.Point(188, 48); + this.textBoxFacility.Name = "textBoxFacility"; + this.textBoxFacility.ReadOnly = true; + this.textBoxFacility.Size = new System.Drawing.Size(408, 22); + this.textBoxFacility.TabIndex = 3; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 23); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 0; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 20); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 1; + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 512); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(600, 236); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(750, 236); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(11, 240); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(608, 265); + this.tabControl.TabIndex = 1; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 512); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.comboBoxGroup); + this.groupBoxProperties.Controls.Add(this.labelGroup); + this.groupBoxProperties.Controls.Add(this.labelType); + this.groupBoxProperties.Controls.Add(this.comboBoxType); + this.groupBoxProperties.Controls.Add(this.labelName); + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxName); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.labelApplication); + this.groupBoxProperties.Controls.Add(this.labelthrough); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker1); + this.groupBoxProperties.Controls.Add(this.sacsDateTimePicker2); + this.groupBoxProperties.Controls.Add(this.labelFacility); + this.groupBoxProperties.Controls.Add(this.textBoxFacility); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 222); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // comboBoxGroup + // + this.comboBoxGroup.FormattingEnabled = true; + this.comboBoxGroup.Location = new System.Drawing.Point(440, 76); + this.comboBoxGroup.Name = "comboBoxGroup"; + this.comboBoxGroup.Size = new System.Drawing.Size(156, 24); + this.comboBoxGroup.TabIndex = 7; + // + // labelGroup + // + this.labelGroup.AutoSize = true; + this.labelGroup.Location = new System.Drawing.Point(385, 79); + this.labelGroup.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelGroup.Name = "labelGroup"; + this.labelGroup.Size = new System.Drawing.Size(48, 17); + this.labelGroup.TabIndex = 6; + this.labelGroup.Text = "Group"; + // + // labelType + // + this.labelType.AutoSize = true; + this.labelType.Location = new System.Drawing.Point(141, 79); + this.labelType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelType.Name = "labelType"; + this.labelType.Size = new System.Drawing.Size(40, 17); + this.labelType.TabIndex = 4; + this.labelType.Text = "Type"; + // + // comboBoxType + // + this.comboBoxType.FormattingEnabled = true; + this.comboBoxType.Location = new System.Drawing.Point(188, 76); + this.comboBoxType.Name = "comboBoxType"; + this.comboBoxType.Size = new System.Drawing.Size(156, 24); + this.comboBoxType.TabIndex = 5; + // + // labelName + // + this.labelName.AutoSize = true; + this.labelName.Location = new System.Drawing.Point(100, 109); + this.labelName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelName.Name = "labelName"; + this.labelName.Size = new System.Drawing.Size(81, 17); + this.labelName.TabIndex = 8; + this.labelName.Text = "Short name"; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(102, 137); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 10; + this.labelDesc.Text = "Description"; + // + // textBoxName + // + this.textBoxName.Location = new System.Drawing.Point(188, 106); + this.textBoxName.Name = "textBoxName"; + this.textBoxName.Size = new System.Drawing.Size(204, 22); + this.textBoxName.TabIndex = 9; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(188, 134); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxDesc.TabIndex = 11; + // + // SpmForm_FacilityTemplate_Ward + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 553); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 600); + this.Name = "SpmForm_FacilityTemplate_Ward"; + this.ShowIcon = false; + this.Text = "Update Ward Resource"; + this.tabControl.ResumeLayout(false); + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelApplication; + private System.Windows.Forms.Label labelthrough; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker1; + private Sarand.Win.Forms.Controls.SacsDateTimePicker sacsDateTimePicker2; + private System.Windows.Forms.Label labelFacility; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxFacility; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabControl tabControl; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelName; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxName; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxGroup; + private System.Windows.Forms.Label labelGroup; + private System.Windows.Forms.Label labelType; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxType; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.cs new file mode 100644 index 0000000..2e23407 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.cs @@ -0,0 +1,161 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_FacilityTemplate_Ward : SpmForm_FacilityTemplate + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_FacilityTemplate.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_FacilityTemplate_Ward() : this(new Config()) { } + public SpmForm_FacilityTemplate_Ward(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "FacilityTemplate_Ward"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + /* PopulateToControls. + private void PopulateToControls(SpmFacilityTemplate_Ward.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmFacilityTemplate_Ward.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmFacilityTemplate_Ward.Data data) + { + }*/ + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_FacilityTemplate_Ward.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/Maint/SpmForm_Operation.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.Designer.cs new file mode 100644 index 0000000..9a196ca --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.Designer.cs @@ -0,0 +1,155 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Operation + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelCode = new System.Windows.Forms.Label(); + this.textBoxInstitution = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelInstitution = new System.Windows.Forms.Label(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 132); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 132); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.labelCode); + this.groupBoxProperties.Controls.Add(this.textBoxInstitution); + this.groupBoxProperties.Controls.Add(this.textBoxCode); + this.groupBoxProperties.Controls.Add(this.labelInstitution); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 109); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(102, 79); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 4; + this.labelDesc.Text = "Description"; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(188, 76); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxDesc.TabIndex = 5; + // + // labelCode + // + this.labelCode.AutoSize = true; + this.labelCode.Location = new System.Drawing.Point(140, 51); + this.labelCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelCode.Name = "labelCode"; + this.labelCode.Size = new System.Drawing.Size(41, 17); + this.labelCode.TabIndex = 2; + this.labelCode.Text = "Code"; + // + // textBoxInstitution + // + this.textBoxInstitution.Location = new System.Drawing.Point(188, 20); + this.textBoxInstitution.Name = "textBoxInstitution"; + this.textBoxInstitution.ReadOnly = true; + this.textBoxInstitution.Size = new System.Drawing.Size(408, 22); + this.textBoxInstitution.TabIndex = 1; + // + // textBoxCode + // + this.textBoxCode.Location = new System.Drawing.Point(188, 48); + this.textBoxCode.Name = "textBoxCode"; + this.textBoxCode.Size = new System.Drawing.Size(102, 22); + this.textBoxCode.TabIndex = 3; + // + // labelInstitution + // + this.labelInstitution.AutoSize = true; + this.labelInstitution.Location = new System.Drawing.Point(113, 25); + this.labelInstitution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInstitution.Name = "labelInstitution"; + this.labelInstitution.Size = new System.Drawing.Size(68, 17); + this.labelInstitution.TabIndex = 0; + this.labelInstitution.Text = "Institution"; + // + // SpmForm_Operation + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 173); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 220); + this.Name = "SpmForm_Operation"; + this.ShowIcon = false; + this.Text = "Update Operation"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private System.Windows.Forms.Label labelCode; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxInstitution; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxCode; + private System.Windows.Forms.Label labelInstitution; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.cs new file mode 100644 index 0000000..22cb403 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Operation : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmOperation OperationToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Operation() : this(new Config()) { } + public SpmForm_Operation(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Operation"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmOperation.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmOperation.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmOperation.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Operation.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/Maint/SpmForm_Patient.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.Designer.cs new file mode 100644 index 0000000..b5135bc --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.Designer.cs @@ -0,0 +1,262 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Patient + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelAgeOn = new System.Windows.Forms.Label(); + this.labelBirthOn = new System.Windows.Forms.Label(); + this.dateTimePickerAgeOn = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.dateTimePickerBirthOn = new Sarand.Win.Forms.Controls.SacsDateTimePicker(); + this.labelAge = new System.Windows.Forms.Label(); + this.textBoxAge = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.buttonDemographic = new Sarand.Win.Forms.Controls.SacsButton(); + this.labelPatientNo = new System.Windows.Forms.Label(); + this.textBoxPatientNo = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelForename = new System.Windows.Forms.Label(); + this.textBoxForename = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelSurname = new System.Windows.Forms.Label(); + this.textBoxSurname = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxInstitution = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelInstitution = new System.Windows.Forms.Label(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 212); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 2; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 212); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelAgeOn); + this.groupBoxProperties.Controls.Add(this.labelBirthOn); + this.groupBoxProperties.Controls.Add(this.dateTimePickerAgeOn); + this.groupBoxProperties.Controls.Add(this.dateTimePickerBirthOn); + this.groupBoxProperties.Controls.Add(this.labelAge); + this.groupBoxProperties.Controls.Add(this.textBoxAge); + this.groupBoxProperties.Controls.Add(this.buttonDemographic); + this.groupBoxProperties.Controls.Add(this.labelPatientNo); + this.groupBoxProperties.Controls.Add(this.textBoxPatientNo); + this.groupBoxProperties.Controls.Add(this.labelForename); + this.groupBoxProperties.Controls.Add(this.textBoxForename); + this.groupBoxProperties.Controls.Add(this.labelSurname); + this.groupBoxProperties.Controls.Add(this.textBoxSurname); + this.groupBoxProperties.Controls.Add(this.textBoxInstitution); + this.groupBoxProperties.Controls.Add(this.labelInstitution); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 190); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelAgeOn + // + this.labelAgeOn.AutoSize = true; + this.labelAgeOn.Location = new System.Drawing.Point(334, 137); + this.labelAgeOn.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelAgeOn.Name = "labelAgeOn"; + this.labelAgeOn.Size = new System.Drawing.Size(85, 17); + this.labelAgeOn.TabIndex = 11; + this.labelAgeOn.Text = "recorded on"; + // + // labelBirthOn + // + this.labelBirthOn.AutoSize = true; + this.labelBirthOn.Location = new System.Drawing.Point(95, 167); + this.labelBirthOn.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelBirthOn.Name = "labelBirthOn"; + this.labelBirthOn.Size = new System.Drawing.Size(86, 17); + this.labelBirthOn.TabIndex = 13; + this.labelBirthOn.Text = "Date of birth"; + // + // dateTimePickerAgeOn + // + this.dateTimePickerAgeOn.Location = new System.Drawing.Point(426, 134); + this.dateTimePickerAgeOn.Name = "dateTimePickerAgeOn"; + this.dateTimePickerAgeOn.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerAgeOn.TabIndex = 12; + this.dateTimePickerAgeOn.Value = new System.DateTime(2019, 6, 12, 16, 1, 45, 852); + // + // dateTimePickerBirthOn + // + this.dateTimePickerBirthOn.Location = new System.Drawing.Point(188, 162); + this.dateTimePickerBirthOn.Name = "dateTimePickerBirthOn"; + this.dateTimePickerBirthOn.Size = new System.Drawing.Size(170, 22); + this.dateTimePickerBirthOn.TabIndex = 14; + this.dateTimePickerBirthOn.Value = new System.DateTime(2019, 6, 12, 16, 1, 45, 852); + // + // labelAge + // + this.labelAge.AutoSize = true; + this.labelAge.Location = new System.Drawing.Point(148, 137); + this.labelAge.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelAge.Name = "labelAge"; + this.labelAge.Size = new System.Drawing.Size(33, 17); + this.labelAge.TabIndex = 9; + this.labelAge.Text = "Age"; + // + // textBoxAge + // + this.textBoxAge.Location = new System.Drawing.Point(188, 134); + this.textBoxAge.Name = "textBoxAge"; + this.textBoxAge.Size = new System.Drawing.Size(102, 22); + this.textBoxAge.TabIndex = 10; + // + // buttonDemographic + // + this.buttonDemographic.Location = new System.Drawing.Point(494, 47); + this.buttonDemographic.Margin = new System.Windows.Forms.Padding(4); + this.buttonDemographic.Name = "buttonDemographic"; + this.buttonDemographic.Size = new System.Drawing.Size(102, 28); + this.buttonDemographic.TabIndex = 4; + this.buttonDemographic.Text = "Demographics"; + this.buttonDemographic.UseVisualStyleBackColor = true; + // + // labelPatientNo + // + this.labelPatientNo.AutoSize = true; + this.labelPatientNo.Location = new System.Drawing.Point(77, 53); + this.labelPatientNo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelPatientNo.Name = "labelPatientNo"; + this.labelPatientNo.Size = new System.Drawing.Size(104, 17); + this.labelPatientNo.TabIndex = 2; + this.labelPatientNo.Text = "Patient number"; + // + // textBoxPatientNo + // + this.textBoxPatientNo.Location = new System.Drawing.Point(188, 50); + this.textBoxPatientNo.Name = "textBoxPatientNo"; + this.textBoxPatientNo.Size = new System.Drawing.Size(102, 22); + this.textBoxPatientNo.TabIndex = 3; + // + // labelForename + // + this.labelForename.AutoSize = true; + this.labelForename.Location = new System.Drawing.Point(109, 109); + this.labelForename.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelForename.Name = "labelForename"; + this.labelForename.Size = new System.Drawing.Size(72, 17); + this.labelForename.TabIndex = 7; + this.labelForename.Text = "Forename"; + // + // textBoxForename + // + this.textBoxForename.Location = new System.Drawing.Point(188, 106); + this.textBoxForename.Name = "textBoxForename"; + this.textBoxForename.Size = new System.Drawing.Size(204, 22); + this.textBoxForename.TabIndex = 8; + // + // labelSurname + // + this.labelSurname.AutoSize = true; + this.labelSurname.Location = new System.Drawing.Point(116, 81); + this.labelSurname.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSurname.Name = "labelSurname"; + this.labelSurname.Size = new System.Drawing.Size(65, 17); + this.labelSurname.TabIndex = 5; + this.labelSurname.Text = "Surname"; + // + // textBoxSurname + // + this.textBoxSurname.Location = new System.Drawing.Point(188, 78); + this.textBoxSurname.Name = "textBoxSurname"; + this.textBoxSurname.Size = new System.Drawing.Size(204, 22); + this.textBoxSurname.TabIndex = 6; + // + // textBoxInstitution + // + this.textBoxInstitution.Location = new System.Drawing.Point(188, 22); + this.textBoxInstitution.Name = "textBoxInstitution"; + this.textBoxInstitution.ReadOnly = true; + this.textBoxInstitution.Size = new System.Drawing.Size(408, 22); + this.textBoxInstitution.TabIndex = 1; + // + // labelInstitution + // + this.labelInstitution.AutoSize = true; + this.labelInstitution.Location = new System.Drawing.Point(113, 25); + this.labelInstitution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInstitution.Name = "labelInstitution"; + this.labelInstitution.Size = new System.Drawing.Size(68, 17); + this.labelInstitution.TabIndex = 0; + this.labelInstitution.Text = "Institution"; + // + // SpmForm_Patient + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 253); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 300); + this.Name = "SpmForm_Patient"; + this.ShowIcon = false; + this.Text = "Update Patient"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxInstitution; + private System.Windows.Forms.Label labelInstitution; + private System.Windows.Forms.Label labelForename; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxForename; + private System.Windows.Forms.Label labelSurname; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxSurname; + private System.Windows.Forms.Label labelAge; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxAge; + private Sarand.Win.Forms.Controls.SacsButton buttonDemographic; + private System.Windows.Forms.Label labelPatientNo; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxPatientNo; + private System.Windows.Forms.Label labelAgeOn; + private System.Windows.Forms.Label labelBirthOn; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerAgeOn; + private Sarand.Win.Forms.Controls.SacsDateTimePicker dateTimePickerBirthOn; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.cs new file mode 100644 index 0000000..c8469e7 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Patient : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmPatient PatientToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Patient() : this(new Config()) { } + public SpmForm_Patient(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Patient"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmPatient.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmPatient.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmPatient.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Patient.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/Maint/SpmForm_Procedure.Designer.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.Designer.cs new file mode 100644 index 0000000..3dbbbad --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.Designer.cs @@ -0,0 +1,356 @@ +namespace Sarand.PatientMgr.Win.Forms.Maint +{ + partial class SpmForm_Procedure + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.buttonOk = new Sarand.Win.Forms.Controls.SacsButton(); + this.buttonCancel = new Sarand.Win.Forms.Controls.SacsButton(); + this.groupBoxProperties = new Sarand.Win.Forms.Controls.SacsGroupBox(); + this.labelMinutes = new System.Windows.Forms.Label(); + this.labelNotes = new System.Windows.Forms.Label(); + this.textBoxNotes = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelUnitsTraining = new System.Windows.Forms.Label(); + this.textBoxUnitsTraining = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelUnits = new System.Windows.Forms.Label(); + this.textBoxUnits = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDurationTraining = new System.Windows.Forms.Label(); + this.textBoxDurationTraining = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDuration = new System.Windows.Forms.Label(); + this.textBoxDuration = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelComplexity = new System.Windows.Forms.Label(); + this.comboBoxComplexity = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelSpecality = new System.Windows.Forms.Label(); + this.comboBoxSpecality = new Sarand.Win.Forms.Controls.SacsComboBox(); + this.labelDesc = new System.Windows.Forms.Label(); + this.textBoxDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.textBoxOperationDesc = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.buttonSearch = new Sarand.Win.Forms.Controls.SacsButton(); + this.labelOperation = new System.Windows.Forms.Label(); + this.textBoxOperationCode = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.labelDepartment = new System.Windows.Forms.Label(); + this.textBoxDepartment = new Sarand.Win.Forms.Controls.SacsTextBox(); + this.groupBoxProperties.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOk + // + this.buttonOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOk.Location = new System.Drawing.Point(411, 412); + this.buttonOk.Margin = new System.Windows.Forms.Padding(4); + this.buttonOk.Name = "buttonOk"; + this.buttonOk.Size = new System.Drawing.Size(100, 28); + this.buttonOk.TabIndex = 1; + this.buttonOk.Text = "OK"; + this.buttonOk.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.Location = new System.Drawing.Point(519, 412); + this.buttonCancel.Margin = new System.Windows.Forms.Padding(4); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 28); + this.buttonCancel.TabIndex = 2; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // groupBoxProperties + // + this.groupBoxProperties.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxProperties.BorderColour = System.Drawing.Color.Gray; + this.groupBoxProperties.Controls.Add(this.labelMinutes); + this.groupBoxProperties.Controls.Add(this.labelNotes); + this.groupBoxProperties.Controls.Add(this.textBoxNotes); + this.groupBoxProperties.Controls.Add(this.labelUnitsTraining); + this.groupBoxProperties.Controls.Add(this.textBoxUnitsTraining); + this.groupBoxProperties.Controls.Add(this.labelUnits); + this.groupBoxProperties.Controls.Add(this.textBoxUnits); + this.groupBoxProperties.Controls.Add(this.labelDurationTraining); + this.groupBoxProperties.Controls.Add(this.textBoxDurationTraining); + this.groupBoxProperties.Controls.Add(this.labelDuration); + this.groupBoxProperties.Controls.Add(this.textBoxDuration); + this.groupBoxProperties.Controls.Add(this.labelComplexity); + this.groupBoxProperties.Controls.Add(this.comboBoxComplexity); + this.groupBoxProperties.Controls.Add(this.labelSpecality); + this.groupBoxProperties.Controls.Add(this.comboBoxSpecality); + this.groupBoxProperties.Controls.Add(this.labelDesc); + this.groupBoxProperties.Controls.Add(this.textBoxDesc); + this.groupBoxProperties.Controls.Add(this.textBoxOperationDesc); + this.groupBoxProperties.Controls.Add(this.buttonSearch); + this.groupBoxProperties.Controls.Add(this.labelOperation); + this.groupBoxProperties.Controls.Add(this.textBoxOperationCode); + this.groupBoxProperties.Controls.Add(this.labelDepartment); + this.groupBoxProperties.Controls.Add(this.textBoxDepartment); + this.groupBoxProperties.Location = new System.Drawing.Point(12, 12); + this.groupBoxProperties.Name = "groupBoxProperties"; + this.groupBoxProperties.Size = new System.Drawing.Size(608, 393); + this.groupBoxProperties.TabIndex = 0; + this.groupBoxProperties.TabStop = false; + this.groupBoxProperties.Text = "Properties"; + // + // labelMinutes + // + this.labelMinutes.AutoSize = true; + this.labelMinutes.Location = new System.Drawing.Point(454, 197); + this.labelMinutes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelMinutes.Name = "labelMinutes"; + this.labelMinutes.Size = new System.Drawing.Size(37, 17); + this.labelMinutes.TabIndex = 16; + this.labelMinutes.Text = "mins"; + // + // labelNotes + // + this.labelNotes.AutoSize = true; + this.labelNotes.Location = new System.Drawing.Point(136, 253); + this.labelNotes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelNotes.Name = "labelNotes"; + this.labelNotes.Size = new System.Drawing.Size(45, 17); + this.labelNotes.TabIndex = 21; + this.labelNotes.Text = "Notes"; + // + // textBoxNotes + // + this.textBoxNotes.Location = new System.Drawing.Point(188, 250); + this.textBoxNotes.Multiline = true; + this.textBoxNotes.Name = "textBoxNotes"; + this.textBoxNotes.Size = new System.Drawing.Size(408, 137); + this.textBoxNotes.TabIndex = 22; + // + // labelUnitsTraining + // + this.labelUnitsTraining.AutoSize = true; + this.labelUnitsTraining.Location = new System.Drawing.Point(284, 225); + this.labelUnitsTraining.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelUnitsTraining.Name = "labelUnitsTraining"; + this.labelUnitsTraining.Size = new System.Drawing.Size(94, 17); + this.labelUnitsTraining.TabIndex = 19; + this.labelUnitsTraining.Text = "Training units"; + // + // textBoxUnitsTraining + // + this.textBoxUnitsTraining.Location = new System.Drawing.Point(396, 222); + this.textBoxUnitsTraining.Name = "textBoxUnitsTraining"; + this.textBoxUnitsTraining.Size = new System.Drawing.Size(51, 22); + this.textBoxUnitsTraining.TabIndex = 20; + // + // labelUnits + // + this.labelUnits.AutoSize = true; + this.labelUnits.Location = new System.Drawing.Point(141, 225); + this.labelUnits.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelUnits.Name = "labelUnits"; + this.labelUnits.Size = new System.Drawing.Size(40, 17); + this.labelUnits.TabIndex = 17; + this.labelUnits.Text = "Units"; + // + // textBoxUnits + // + this.textBoxUnits.Location = new System.Drawing.Point(188, 222); + this.textBoxUnits.Name = "textBoxUnits"; + this.textBoxUnits.Size = new System.Drawing.Size(51, 22); + this.textBoxUnits.TabIndex = 18; + // + // labelDurationTraining + // + this.labelDurationTraining.AutoSize = true; + this.labelDurationTraining.Location = new System.Drawing.Point(273, 197); + this.labelDurationTraining.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDurationTraining.Name = "labelDurationTraining"; + this.labelDurationTraining.Size = new System.Drawing.Size(116, 17); + this.labelDurationTraining.TabIndex = 14; + this.labelDurationTraining.Text = "Training duration"; + // + // textBoxDurationTraining + // + this.textBoxDurationTraining.Location = new System.Drawing.Point(396, 194); + this.textBoxDurationTraining.Name = "textBoxDurationTraining"; + this.textBoxDurationTraining.Size = new System.Drawing.Size(51, 22); + this.textBoxDurationTraining.TabIndex = 15; + // + // labelDuration + // + this.labelDuration.AutoSize = true; + this.labelDuration.Location = new System.Drawing.Point(119, 197); + this.labelDuration.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDuration.Name = "labelDuration"; + this.labelDuration.Size = new System.Drawing.Size(62, 17); + this.labelDuration.TabIndex = 12; + this.labelDuration.Text = "Duration"; + // + // textBoxDuration + // + this.textBoxDuration.Location = new System.Drawing.Point(188, 194); + this.textBoxDuration.Name = "textBoxDuration"; + this.textBoxDuration.Size = new System.Drawing.Size(51, 22); + this.textBoxDuration.TabIndex = 13; + // + // labelComplexity + // + this.labelComplexity.AutoSize = true; + this.labelComplexity.Location = new System.Drawing.Point(106, 167); + this.labelComplexity.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelComplexity.Name = "labelComplexity"; + this.labelComplexity.Size = new System.Drawing.Size(75, 17); + this.labelComplexity.TabIndex = 10; + this.labelComplexity.Text = "Complexity"; + // + // comboBoxComplexity + // + this.comboBoxComplexity.FormattingEnabled = true; + this.comboBoxComplexity.Location = new System.Drawing.Point(188, 164); + this.comboBoxComplexity.Name = "comboBoxComplexity"; + this.comboBoxComplexity.Size = new System.Drawing.Size(204, 24); + this.comboBoxComplexity.TabIndex = 11; + // + // labelSpecality + // + this.labelSpecality.AutoSize = true; + this.labelSpecality.Location = new System.Drawing.Point(116, 137); + this.labelSpecality.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSpecality.Name = "labelSpecality"; + this.labelSpecality.Size = new System.Drawing.Size(65, 17); + this.labelSpecality.TabIndex = 8; + this.labelSpecality.Text = "Specality"; + // + // comboBoxSpecality + // + this.comboBoxSpecality.FormattingEnabled = true; + this.comboBoxSpecality.Location = new System.Drawing.Point(188, 134); + this.comboBoxSpecality.Name = "comboBoxSpecality"; + this.comboBoxSpecality.Size = new System.Drawing.Size(204, 24); + this.comboBoxSpecality.TabIndex = 9; + // + // labelDesc + // + this.labelDesc.AutoSize = true; + this.labelDesc.Location = new System.Drawing.Point(102, 109); + this.labelDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDesc.Name = "labelDesc"; + this.labelDesc.Size = new System.Drawing.Size(79, 17); + this.labelDesc.TabIndex = 6; + this.labelDesc.Text = "Description"; + // + // textBoxDesc + // + this.textBoxDesc.Location = new System.Drawing.Point(188, 106); + this.textBoxDesc.Name = "textBoxDesc"; + this.textBoxDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxDesc.TabIndex = 7; + // + // textBoxOperationDesc + // + this.textBoxOperationDesc.Location = new System.Drawing.Point(188, 78); + this.textBoxOperationDesc.Name = "textBoxOperationDesc"; + this.textBoxOperationDesc.ReadOnly = true; + this.textBoxOperationDesc.Size = new System.Drawing.Size(408, 22); + this.textBoxOperationDesc.TabIndex = 5; + // + // buttonSearch + // + this.buttonSearch.Location = new System.Drawing.Point(297, 47); + this.buttonSearch.Margin = new System.Windows.Forms.Padding(4); + this.buttonSearch.Name = "buttonSearch"; + this.buttonSearch.Size = new System.Drawing.Size(100, 28); + this.buttonSearch.TabIndex = 4; + this.buttonSearch.Text = "Search"; + this.buttonSearch.UseVisualStyleBackColor = true; + // + // labelOperation + // + this.labelOperation.AutoSize = true; + this.labelOperation.Location = new System.Drawing.Point(110, 55); + this.labelOperation.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelOperation.Name = "labelOperation"; + this.labelOperation.Size = new System.Drawing.Size(71, 17); + this.labelOperation.TabIndex = 2; + this.labelOperation.Text = "Operation"; + // + // textBoxOperationCode + // + this.textBoxOperationCode.Location = new System.Drawing.Point(188, 50); + this.textBoxOperationCode.Name = "textBoxOperationCode"; + this.textBoxOperationCode.Size = new System.Drawing.Size(102, 22); + this.textBoxOperationCode.TabIndex = 3; + // + // labelDepartment + // + this.labelDepartment.AutoSize = true; + this.labelDepartment.Location = new System.Drawing.Point(99, 25); + this.labelDepartment.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelDepartment.Name = "labelDepartment"; + this.labelDepartment.Size = new System.Drawing.Size(82, 17); + this.labelDepartment.TabIndex = 0; + this.labelDepartment.Text = "Department"; + // + // textBoxDepartment + // + this.textBoxDepartment.Location = new System.Drawing.Point(188, 22); + this.textBoxDepartment.Name = "textBoxDepartment"; + this.textBoxDepartment.ReadOnly = true; + this.textBoxDepartment.Size = new System.Drawing.Size(408, 22); + this.textBoxDepartment.TabIndex = 1; + // + // SpmForm_Procedure + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 453); + this.ControlBox = false; + this.Controls.Add(this.buttonOk); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.groupBoxProperties); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(650, 500); + this.Name = "SpmForm_Procedure"; + this.ShowIcon = false; + this.Text = "Update Procedure"; + this.groupBoxProperties.ResumeLayout(false); + this.groupBoxProperties.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private Sarand.Win.Forms.Controls.SacsButton buttonOk; + private Sarand.Win.Forms.Controls.SacsButton buttonCancel; + private Sarand.Win.Forms.Controls.SacsGroupBox groupBoxProperties; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxOperationDesc; + private Sarand.Win.Forms.Controls.SacsButton buttonSearch; + private System.Windows.Forms.Label labelOperation; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxOperationCode; + private System.Windows.Forms.Label labelDepartment; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDepartment; + private System.Windows.Forms.Label labelDesc; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDesc; + private System.Windows.Forms.Label labelNotes; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxNotes; + private System.Windows.Forms.Label labelUnitsTraining; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxUnitsTraining; + private System.Windows.Forms.Label labelUnits; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxUnits; + private System.Windows.Forms.Label labelDurationTraining; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDurationTraining; + private System.Windows.Forms.Label labelDuration; + private Sarand.Win.Forms.Controls.SacsTextBox textBoxDuration; + private System.Windows.Forms.Label labelComplexity; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxComplexity; + private System.Windows.Forms.Label labelSpecality; + private Sarand.Win.Forms.Controls.SacsComboBox comboBoxSpecality; + private System.Windows.Forms.Label labelMinutes; + } +} \ No newline at end of file diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.cs b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.cs new file mode 100644 index 0000000..cbbc3fa --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.cs @@ -0,0 +1,162 @@ +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Core.Bus; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.Win.Forms.Utils; +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.Maint +{ + //======================================================================= + public partial class SpmForm_Procedure : SpmForm + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmForm_Item.Config + { + public SpmProcedure ProcedureToUpdate { internal get; set; } = null; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmForm_Procedure() : this(new Config()) { } + public SpmForm_Procedure(Config config) : base(config) + { + this.config = config; + if (SpmGlobals.System != null) + { + } + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false)] + protected override String DefaultMessageTitle { get { return "Procedure"; } } + + //------------------------------------------------------------------- + // S h o w D i a l o g + //------------------------------------------------------------------- + public new DialogResult ShowDialog() + { + return base.ShowDialog(); + } + // Validate configuration to ensure that form can be opened correctly. + private bool ValidateConfiguration() + { + return true; + } + + //------------------------------------------------------------------- + // I n i t i a l i s a t i o n + //------------------------------------------------------------------- + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + // Complete dialog initialisation. + PositionControls(); + AcceptChanges(); + SetControlActivity(); + } + + //------------------------------------------------------------------- + protected override void OnShown(EventArgs e) + { + base.OnShown(e); + // Initial focus. + } + + //------------------------------------------------------------------- + // P o p u l a t i o n + //------------------------------------------------------------------- + // PopulateToControls. + private void PopulateToControls(SpmProcedure.Data data) + { + // Populate item properties to controls. + + AcceptChanges(); + } + + //------------------------------------------------------------------- + // Validate properties. + public bool IsDataValid(SpmProcedure.Data data) + { + return true; + } + + //------------------------------------------------------------------- + // PopulateFromControls. + private void PopulateFromControls(SpmProcedure.Data data) + { + } + + //------------------------------------------------------------------- + // UpdatedAssociated Data. + public bool UpdateAssociatedData() + { + return true; + } + + //------------------------------------------------------------------- + // C l o s e F o r m + //------------------------------------------------------------------- + private void buttonOk_Click(object sender, EventArgs e) + { + } + private void buttonCancel_Click(object sender, EventArgs e) + { + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + SetControlsReadOnly(); + } + public bool IsFieldReadOnly(SpmDbDfn.ColumnIdx col) + { + if (ReadOnly) return true; + + return false; + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.resx b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Maint/SpmForm_Procedure.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/Panels/SpmPanel_Departments.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.Designer.cs new file mode 100644 index 0000000..384d6d8 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_Departments + { + /// + /// 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.listFilterDepartment = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_Department(); + this.listViewDepartment = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_Department(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // listFilterDepartment + // + this.listFilterDepartment.Location = new System.Drawing.Point(3, 3); + this.listFilterDepartment.Name = "listFilterDepartment"; + this.listFilterDepartment.Size = new System.Drawing.Size(694, 37); + this.listFilterDepartment.TabIndex = 0; + // + // listViewDepartment + // + this.listViewDepartment.FullRowSelect = true; + this.listViewDepartment.HideSelection = false; + this.listViewDepartment.Location = new System.Drawing.Point(8, 46); + this.listViewDepartment.Name = "listViewDepartment"; + this.listViewDepartment.OwnerDraw = true; + this.listViewDepartment.Size = new System.Drawing.Size(575, 165); + this.listViewDepartment.TabIndex = 1; + this.listViewDepartment.UseCompatibleStateImageBehavior = false; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 6; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 15; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 14; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 13; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // SpmPanel_Departments + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.listViewDepartment); + this.Controls.Add(this.listFilterDepartment); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_Departments"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private Filters.SpmItemListFilter_Department listFilterDepartment; + private Controls.SpmItemListView_Department listViewDepartment; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.cs new file mode 100644 index 0000000..e1e1206 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.cs @@ -0,0 +1,347 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_Departments : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_Departments() : this(new Config()) { } + public SpmPanel_Departments(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. + protected override String DefaultMessageTitle { get { return "Department"; } } + public override int ItemTotal { get { return listViewDepartment.ItemTotal; } } + public override int ItemCount { get { return listViewDepartment.ItemCount; } } + public override int SelectedItemCount { get { return listViewDepartment.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewDepartment.SelectedItemId; } } + public List SelectedItemIds { get { return listViewDepartment.SelectedItemIds; } } + public SpmDepartment SelectedDepartment { get { return listViewDepartment.SelectedDepartment; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmDepartment.Params GetParams() + { + SpmDepartment.Params prmDepartment = new SpmDepartment.Params(); + + // Sort columns. + prmDepartment.SortColumns.AddRange(listViewDepartment.GetSortColumns()); + return prmDepartment; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewDepartment.RefreshDepartments(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewDepartment.RefreshDepartment(id); + } + public override void RemoveDataItem(SysId id) + { + listViewDepartment.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.Department)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new Department. + SpmForm_Department.Config configDepartment = new SpmForm_Department.Config(); + using (var form = new SpmForm_Department(configDepartment)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.Department, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainDepartments = SecurityProfile.UserCanCreateItemType(Spm.ItemType.Department) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.Department); + if (!canMaintainDepartments) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + if (config.Mode == PanelMode.Search) return; + SpmDepartment department = SelectedDepartment; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (department == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_Department.Config configDepartment = new SpmForm_Department.Config(); + configDepartment.DepartmentToUpdate = department; + configDepartment.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_Department formDepartment = new SpmForm_Department(configDepartment)) + { + // Perform the update. + if (formDepartment.ShowDialog() == DialogResult.OK) + { + // Department has been updated. + RefreshDataItem(department.Id); + listViewDepartment.RefreshDepartment(department.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.Department, department.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.Department)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmDepartment department = SelectedDepartment; + if (department == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.DepartmentCanBeDeleted(department)) + { + MessageConsole.ShowMessageError("Unable to remove department - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this department should be removed from the system?")) + { + if (DepartmentMgr.DeleteDepartment(department, DbUpdateInfo)) + { + int selectIdx = listViewDepartment.SelectedIndex; + listViewDepartment.RemoveItemById(department.Id.ToString()); + if (selectIdx >= listViewDepartment.ItemCount - 1) selectIdx--; + listViewDepartment.SelectedIndices.Clear(); + listViewDepartment.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove department - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmDepartment department = SelectedDepartment; + if (department != null && department.Status == SaStatus.Active) + { + department.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateDepartment(department, DbUpdateInfo)) + { + RefreshDataItem(department.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.Department, department.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "Department"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewDepartment.SelectedItemId)) + { + SpmDepartment department = SelectedDepartment; + if (department != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // Department list: + listViewDepartment.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_Department > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Departments.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/Panels/SpmPanel_EmployeeRoles.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.Designer.cs new file mode 100644 index 0000000..a2fc497 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_EmployeeRoles + { + /// + /// 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.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listFilterEmployeeRole = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_EmployeeRole(); + this.listViewEmployeeRole = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_EmployeeRole(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 23; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 22; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 21; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 20; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listFilterEmployeeRole + // + this.listFilterEmployeeRole.Location = new System.Drawing.Point(4, 4); + this.listFilterEmployeeRole.Name = "listFilterEmployeeRole"; + this.listFilterEmployeeRole.Size = new System.Drawing.Size(693, 37); + this.listFilterEmployeeRole.TabIndex = 24; + // + // listViewEmployeeRole + // + this.listViewEmployeeRole.FullRowSelect = true; + this.listViewEmployeeRole.HideSelection = false; + this.listViewEmployeeRole.Location = new System.Drawing.Point(8, 46); + this.listViewEmployeeRole.Name = "listViewEmployeeRole"; + this.listViewEmployeeRole.OwnerDraw = true; + this.listViewEmployeeRole.Size = new System.Drawing.Size(575, 165); + this.listViewEmployeeRole.TabIndex = 25; + this.listViewEmployeeRole.UseCompatibleStateImageBehavior = false; + // + // SpmPanel_EmployeeRoles + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listViewEmployeeRole); + this.Controls.Add(this.listFilterEmployeeRole); + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_EmployeeRoles"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Filters.SpmItemListFilter_EmployeeRole listFilterEmployeeRole; + private Controls.SpmItemListView_EmployeeRole listViewEmployeeRole; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.cs new file mode 100644 index 0000000..c61e299 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.cs @@ -0,0 +1,348 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_EmployeeRoles : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_EmployeeRoles() : this(new Config()) { } + public SpmPanel_EmployeeRoles(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. + protected override String DefaultMessageTitle { get { return "EmployeeRole"; } } + public override int ItemTotal { get { return listViewEmployeeRole.ItemTotal; } } + public override int ItemCount { get { return listViewEmployeeRole.ItemCount; } } + public override int SelectedItemCount { get { return listViewEmployeeRole.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewEmployeeRole.SelectedItemId; } } + public List SelectedItemIds { get { return listViewEmployeeRole.SelectedItemIds; } } + public SpmEmployeeRole SelectedEmployeeRole { get { return listViewEmployeeRole.SelectedEmployeeRole; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmEmployeeRole.Params GetParams() + { + SpmEmployeeRole.Params prmEmployeeRole = new SpmEmployeeRole.Params(); + + // Sort columns. + prmEmployeeRole.SortColumns.AddRange(listViewEmployeeRole.GetSortColumns()); + return prmEmployeeRole; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewEmployeeRole.RefreshEmployeeRoles(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewEmployeeRole.RefreshEmployeeRole(id); + } + public override void RemoveDataItem(SysId id) + { + listViewEmployeeRole.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.EmployeeRole)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new EmployeeRole. + SpmForm_EmployeeRole.Config configEmployeeRole = new SpmForm_EmployeeRole.Config(); + using (var form = new SpmForm_EmployeeRole(configEmployeeRole)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.EmployeeRole, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainEmployeeRoles = SecurityProfile.UserCanCreateItemType(Spm.ItemType.EmployeeRole) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.EmployeeRole); + if (!canMaintainEmployeeRoles) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + //if (!CanUpdateItem()) return; + if (config.Mode == PanelMode.Search) return; + SpmEmployeeRole employeeRole = SelectedEmployeeRole; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (employeeRole == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_EmployeeRole.Config configEmployeeRole = new SpmForm_EmployeeRole.Config(); + configEmployeeRole.EmployeeRoleToUpdate = employeeRole; + configEmployeeRole.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_EmployeeRole formEmployeeRole = new SpmForm_EmployeeRole(configEmployeeRole)) + { + // Perform the update. + if (formEmployeeRole.ShowDialog() == DialogResult.OK) + { + // EmployeeRole has been updated. + RefreshDataItem(employeeRole.Id); + listViewEmployeeRole.RefreshEmployeeRole(employeeRole.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.EmployeeRole, employeeRole.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.EmployeeRole)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmEmployeeRole employeeRole = SelectedEmployeeRole; + if (employeeRole == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.EmployeeRoleCanBeDeleted(employeeRole)) + { + MessageConsole.ShowMessageError("Unable to remove employeeRole - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this employeeRole should be removed from the system?")) + { + if (DepartmentMgr.DeleteEmployeeRole(employeeRole, DbUpdateInfo)) + { + int selectIdx = listViewEmployeeRole.SelectedIndex; + listViewEmployeeRole.RemoveItemById(employeeRole.Id.ToString()); + if (selectIdx >= listViewEmployeeRole.ItemCount - 1) selectIdx--; + listViewEmployeeRole.SelectedIndices.Clear(); + listViewEmployeeRole.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove employeeRole - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmEmployeeRole employeeRole = SelectedEmployeeRole; + if (employeeRole != null && employeeRole.Status == SaStatus.Active) + { + employeeRole.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateEmployeeRole(employeeRole, DbUpdateInfo)) + { + RefreshDataItem(employeeRole.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.EmployeeRole, employeeRole.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "EmployeeRole"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewEmployeeRole.SelectedItemId)) + { + SpmEmployeeRole employeeRole = SelectedEmployeeRole; + if (employeeRole != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // EmployeeRole list: + listViewEmployeeRole.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_EmployeeRole > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_EmployeeRoles.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/Panels/SpmPanel_Facilities.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.Designer.cs new file mode 100644 index 0000000..4c6fb98 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_Facilities + { + /// + /// 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.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listFilterFacility = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_Facility(); + this.listViewFacility = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_Facility(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 23; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 22; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 21; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 20; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listFilterFacility + // + this.listFilterFacility.Location = new System.Drawing.Point(3, 3); + this.listFilterFacility.Name = "listFilterFacility"; + this.listFilterFacility.Size = new System.Drawing.Size(694, 37); + this.listFilterFacility.TabIndex = 24; + // + // listViewFacility + // + this.listViewFacility.FullRowSelect = true; + this.listViewFacility.HideSelection = false; + this.listViewFacility.Location = new System.Drawing.Point(8, 46); + this.listViewFacility.Name = "listViewFacility"; + this.listViewFacility.OwnerDraw = true; + this.listViewFacility.Size = new System.Drawing.Size(575, 165); + this.listViewFacility.TabIndex = 25; + this.listViewFacility.UseCompatibleStateImageBehavior = false; + // + // SpmPanel_Facilities + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listViewFacility); + this.Controls.Add(this.listFilterFacility); + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_Facilities"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Filters.SpmItemListFilter_Facility listFilterFacility; + private Controls.SpmItemListView_Facility listViewFacility; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.cs new file mode 100644 index 0000000..4eb571a --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.cs @@ -0,0 +1,348 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_Facilities : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_Facilities() : this(new Config()) { } + public SpmPanel_Facilities(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. + protected override String DefaultMessageTitle { get { return "Facility"; } } + public override int ItemTotal { get { return listViewFacility.ItemTotal; } } + public override int ItemCount { get { return listViewFacility.ItemCount; } } + public override int SelectedItemCount { get { return listViewFacility.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewFacility.SelectedItemId; } } + public List SelectedItemIds { get { return listViewFacility.SelectedItemIds; } } + public SpmFacility SelectedFacility { get { return listViewFacility.SelectedFacility; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmFacility.Params GetParams() + { + SpmFacility.Params prmFacility = new SpmFacility.Params(); + + // Sort columns. + prmFacility.SortColumns.AddRange(listViewFacility.GetSortColumns()); + return prmFacility; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewFacility.RefreshFacilitys(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewFacility.RefreshFacility(id); + } + public override void RemoveDataItem(SysId id) + { + listViewFacility.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.Facility)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new Facility. + SpmForm_Facility.Config configFacility = new SpmForm_Facility.Config(); + using (var form = new SpmForm_Facility(configFacility)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.Facility, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainFacilitys = SecurityProfile.UserCanCreateItemType(Spm.ItemType.Facility) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.Facility); + if (!canMaintainFacilitys) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + //if (!CanUpdateItem()) return; + if (config.Mode == PanelMode.Search) return; + SpmFacility facility = SelectedFacility; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (facility == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_Facility.Config configFacility = new SpmForm_Facility.Config(); + configFacility.FacilityToUpdate = facility; + configFacility.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_Facility formFacility = new SpmForm_Facility(configFacility)) + { + // Perform the update. + if (formFacility.ShowDialog() == DialogResult.OK) + { + // Facility has been updated. + RefreshDataItem(facility.Id); + listViewFacility.RefreshFacility(facility.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.Facility, facility.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.Facility)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmFacility facility = SelectedFacility; + if (facility == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.FacilityCanBeDeleted(facility)) + { + MessageConsole.ShowMessageError("Unable to remove facility - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this facility should be removed from the system?")) + { + if (DepartmentMgr.DeleteFacility(facility, DbUpdateInfo)) + { + int selectIdx = listViewFacility.SelectedIndex; + listViewFacility.RemoveItemById(facility.Id.ToString()); + if (selectIdx >= listViewFacility.ItemCount - 1) selectIdx--; + listViewFacility.SelectedIndices.Clear(); + listViewFacility.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove facility - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmFacility facility = SelectedFacility; + if (facility != null && facility.Status == SaStatus.Active) + { + facility.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateFacility(facility, DbUpdateInfo)) + { + RefreshDataItem(facility.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.Facility, facility.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "Facility"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewFacility.SelectedItemId)) + { + SpmFacility facility = SelectedFacility; + if (facility != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // Facility list: + listViewFacility.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_Facility > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Facilities.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/Panels/SpmPanel_FacilitySessions.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.Designer.cs new file mode 100644 index 0000000..3c1378f --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_FacilitySessions + { + /// + /// 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.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listFilterFacilitySession = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_FacilitySession(); + this.listViewFacilitySession = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_FacilitySession(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 19; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 18; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 17; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 16; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listFilterFacilitySession + // + this.listFilterFacilitySession.Location = new System.Drawing.Point(4, 4); + this.listFilterFacilitySession.Name = "listFilterFacilitySession"; + this.listFilterFacilitySession.Size = new System.Drawing.Size(693, 37); + this.listFilterFacilitySession.TabIndex = 20; + // + // listViewFacilitySession + // + this.listViewFacilitySession.FullRowSelect = true; + this.listViewFacilitySession.HideSelection = false; + this.listViewFacilitySession.Location = new System.Drawing.Point(8, 46); + this.listViewFacilitySession.Name = "listViewFacilitySession"; + this.listViewFacilitySession.OwnerDraw = true; + this.listViewFacilitySession.Size = new System.Drawing.Size(575, 165); + this.listViewFacilitySession.TabIndex = 21; + this.listViewFacilitySession.UseCompatibleStateImageBehavior = false; + // + // SpmPanel_FacilitySessions + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listViewFacilitySession); + this.Controls.Add(this.listFilterFacilitySession); + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_FacilitySessions"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Filters.SpmItemListFilter_FacilitySession listFilterFacilitySession; + private Controls.SpmItemListView_FacilitySession listViewFacilitySession; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.cs new file mode 100644 index 0000000..5e0fabb --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.cs @@ -0,0 +1,348 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_FacilitySessions : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_FacilitySessions() : this(new Config()) { } + public SpmPanel_FacilitySessions(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. + protected override String DefaultMessageTitle { get { return "FacilitySession"; } } + public override int ItemTotal { get { return listViewFacilitySession.ItemTotal; } } + public override int ItemCount { get { return listViewFacilitySession.ItemCount; } } + public override int SelectedItemCount { get { return listViewFacilitySession.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewFacilitySession.SelectedItemId; } } + public List SelectedItemIds { get { return listViewFacilitySession.SelectedItemIds; } } + public SpmFacilitySession SelectedFacilitySession { get { return listViewFacilitySession.SelectedFacilitySession; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmFacilitySession.Params GetParams() + { + SpmFacilitySession.Params prmFacilitySession = new SpmFacilitySession.Params(); + + // Sort columns. + prmFacilitySession.SortColumns.AddRange(listViewFacilitySession.GetSortColumns()); + return prmFacilitySession; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewFacilitySession.RefreshFacilitySessions(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewFacilitySession.RefreshFacilitySession(id); + } + public override void RemoveDataItem(SysId id) + { + listViewFacilitySession.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.FacilitySession)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new FacilitySession. + SpmForm_FacilitySession.Config configFacilitySession = new SpmForm_FacilitySession.Config(); + using (var form = new SpmForm_FacilitySession(configFacilitySession)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.FacilitySession, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainFacilitySessions = SecurityProfile.UserCanCreateItemType(Spm.ItemType.FacilitySession) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.FacilitySession); + if (!canMaintainFacilitySessions) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + //if (!CanUpdateItem()) return; + if (config.Mode == PanelMode.Search) return; + SpmFacilitySession facilitySession = SelectedFacilitySession; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (facilitySession == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_FacilitySession.Config configFacilitySession = new SpmForm_FacilitySession.Config(); + configFacilitySession.FacilitySessionToUpdate = facilitySession; + configFacilitySession.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_FacilitySession formFacilitySession = new SpmForm_FacilitySession(configFacilitySession)) + { + // Perform the update. + if (formFacilitySession.ShowDialog() == DialogResult.OK) + { + // FacilitySession has been updated. + RefreshDataItem(facilitySession.Id); + listViewFacilitySession.RefreshFacilitySession(facilitySession.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.FacilitySession, facilitySession.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.FacilitySession)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmFacilitySession facilitySession = SelectedFacilitySession; + if (facilitySession == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.FacilitySessionCanBeDeleted(facilitySession)) + { + MessageConsole.ShowMessageError("Unable to remove facilitySession - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this facilitySession should be removed from the system?")) + { + if (DepartmentMgr.DeleteFacilitySession(facilitySession, DbUpdateInfo)) + { + int selectIdx = listViewFacilitySession.SelectedIndex; + listViewFacilitySession.RemoveItemById(facilitySession.Id.ToString()); + if (selectIdx >= listViewFacilitySession.ItemCount - 1) selectIdx--; + listViewFacilitySession.SelectedIndices.Clear(); + listViewFacilitySession.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove facilitySession - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmFacilitySession facilitySession = SelectedFacilitySession; + if (facilitySession != null && facilitySession.Status == SaStatus.Active) + { + facilitySession.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateFacilitySession(facilitySession, DbUpdateInfo)) + { + RefreshDataItem(facilitySession.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.FacilitySession, facilitySession.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "FacilitySession"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewFacilitySession.SelectedItemId)) + { + SpmFacilitySession facilitySession = SelectedFacilitySession; + if (facilitySession != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // FacilitySession list: + listViewFacilitySession.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_FacilitySession > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilitySessions.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/Panels/SpmPanel_FacilityTemplates.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.Designer.cs new file mode 100644 index 0000000..3aa3e3e --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_FacilityTemplates + { + /// + /// 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.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listFilterFacilityTemplate = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_FacilityTemplate(); + this.listViewFacilityTemplate = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_FacilityTemplate(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 19; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 18; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 17; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 16; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listFilterFacilityTemplate + // + this.listFilterFacilityTemplate.Location = new System.Drawing.Point(4, 4); + this.listFilterFacilityTemplate.Name = "listFilterFacilityTemplate"; + this.listFilterFacilityTemplate.Size = new System.Drawing.Size(690, 37); + this.listFilterFacilityTemplate.TabIndex = 20; + // + // listViewFacilityTemplate + // + this.listViewFacilityTemplate.FullRowSelect = true; + this.listViewFacilityTemplate.HideSelection = false; + this.listViewFacilityTemplate.Location = new System.Drawing.Point(8, 46); + this.listViewFacilityTemplate.Name = "listViewFacilityTemplate"; + this.listViewFacilityTemplate.OwnerDraw = true; + this.listViewFacilityTemplate.Size = new System.Drawing.Size(575, 165); + this.listViewFacilityTemplate.TabIndex = 21; + this.listViewFacilityTemplate.UseCompatibleStateImageBehavior = false; + // + // SpmPanel_FacilityTemplates + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listViewFacilityTemplate); + this.Controls.Add(this.listFilterFacilityTemplate); + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_FacilityTemplates"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Filters.SpmItemListFilter_FacilityTemplate listFilterFacilityTemplate; + private Controls.SpmItemListView_FacilityTemplate listViewFacilityTemplate; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.cs new file mode 100644 index 0000000..ad15e42 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.cs @@ -0,0 +1,348 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_FacilityTemplates : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_FacilityTemplates() : this(new Config()) { } + public SpmPanel_FacilityTemplates(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. + protected override String DefaultMessageTitle { get { return "FacilityTemplate"; } } + public override int ItemTotal { get { return listViewFacilityTemplate.ItemTotal; } } + public override int ItemCount { get { return listViewFacilityTemplate.ItemCount; } } + public override int SelectedItemCount { get { return listViewFacilityTemplate.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewFacilityTemplate.SelectedItemId; } } + public List SelectedItemIds { get { return listViewFacilityTemplate.SelectedItemIds; } } + public SpmFacilityTemplate SelectedFacilityTemplate { get { return listViewFacilityTemplate.SelectedFacilityTemplate; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmFacilityTemplate.Params GetParams() + { + SpmFacilityTemplate.Params prmFacilityTemplate = new SpmFacilityTemplate.Params(); + + // Sort columns. + prmFacilityTemplate.SortColumns.AddRange(listViewFacilityTemplate.GetSortColumns()); + return prmFacilityTemplate; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewFacilityTemplate.RefreshFacilityTemplates(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewFacilityTemplate.RefreshFacilityTemplate(id); + } + public override void RemoveDataItem(SysId id) + { + listViewFacilityTemplate.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.FacilityTemplate)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new FacilityTemplate. + SpmForm_FacilityTemplate.Config configFacilityTemplate = new SpmForm_FacilityTemplate.Config(); + using (var form = new SpmForm_FacilityTemplate(configFacilityTemplate)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.FacilityTemplate, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainFacilityTemplates = SecurityProfile.UserCanCreateItemType(Spm.ItemType.FacilityTemplate) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.FacilityTemplate); + if (!canMaintainFacilityTemplates) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + //if (!CanUpdateItem()) return; + if (config.Mode == PanelMode.Search) return; + SpmFacilityTemplate facilityTemplate = SelectedFacilityTemplate; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (facilityTemplate == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_FacilityTemplate.Config configFacilityTemplate = new SpmForm_FacilityTemplate.Config(); + configFacilityTemplate.FacilityTemplateToUpdate = facilityTemplate; + configFacilityTemplate.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_FacilityTemplate formFacilityTemplate = new SpmForm_FacilityTemplate(configFacilityTemplate)) + { + // Perform the update. + if (formFacilityTemplate.ShowDialog() == DialogResult.OK) + { + // FacilityTemplate has been updated. + RefreshDataItem(facilityTemplate.Id); + listViewFacilityTemplate.RefreshFacilityTemplate(facilityTemplate.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.FacilityTemplate, facilityTemplate.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.FacilityTemplate)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmFacilityTemplate facilityTemplate = SelectedFacilityTemplate; + if (facilityTemplate == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.FacilityTemplateCanBeDeleted(facilityTemplate)) + { + MessageConsole.ShowMessageError("Unable to remove facilityTemplate - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this facilityTemplate should be removed from the system?")) + { + if (DepartmentMgr.DeleteFacilityTemplate(facilityTemplate, DbUpdateInfo)) + { + int selectIdx = listViewFacilityTemplate.SelectedIndex; + listViewFacilityTemplate.RemoveItemById(facilityTemplate.Id.ToString()); + if (selectIdx >= listViewFacilityTemplate.ItemCount - 1) selectIdx--; + listViewFacilityTemplate.SelectedIndices.Clear(); + listViewFacilityTemplate.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove facilityTemplate - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmFacilityTemplate facilityTemplate = SelectedFacilityTemplate; + if (facilityTemplate != null && facilityTemplate.Status == SaStatus.Active) + { + facilityTemplate.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateFacilityTemplate(facilityTemplate, DbUpdateInfo)) + { + RefreshDataItem(facilityTemplate.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.FacilityTemplate, facilityTemplate.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "FacilityTemplate"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewFacilityTemplate.SelectedItemId)) + { + SpmFacilityTemplate facilityTemplate = SelectedFacilityTemplate; + if (facilityTemplate != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // FacilityTemplate list: + listViewFacilityTemplate.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_FacilityTemplate > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_FacilityTemplates.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/Panels/SpmPanel_Items.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.Designer.cs new file mode 100644 index 0000000..c2ca708 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.Designer.cs @@ -0,0 +1,24 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_Items + { + /// + /// 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(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.cs new file mode 100644 index 0000000..ebc7dc9 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Items.cs @@ -0,0 +1,197 @@ +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.Controls; +using Sarand.Core.Bus; +using Sarand.Core.Base; +using Sarand.PatientMgr.Win.Forms.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.Win.Forms.Utils; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_Items : SpmPanel + { + //------------------------------------------------------------------- + // Configuration. + public new class Config : SpmPanel.Config + { + } + + //------------------------------------------------------------------- + // Data members. + private Config config; + + //------------------------------------------------------------------- + // Construction. + private SpmPanel_Items() : this(new Config()) { } + protected SpmPanel_Items(Config config) : base() + { + SetConfig(config); + InitializeComponent(); + } + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) components.Dispose(); + } + base.Dispose(disposing); + } + + //------------------------------------------------------------------- + // Properties. + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public virtual int ItemTotal { get { return 0; } } + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public virtual int ItemCount { get { return 0; } } + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public virtual int SelectedItemCount { get { return 0; } } + [Browsable(false), ReadOnly(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] + public bool DeletedItemsAreShown { get; protected set; } = false; + + //------------------------------------------------------------------- + // Configure. + private void SetConfig(Config config) + + { + base.SetConfig(config); + this.config = config; + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + // Refresh. + protected void RefreshDataItems(object sender, EventArgs e) { RefreshDataItems(); } + public virtual void RefreshDataItems() + { + throw new NotSupportedException(GetType().Name + ".RefreshDataItems not implemented"); + } + public virtual void RefreshDataItem(SysId id) + { + throw new NotSupportedException(GetType().Name + ".RefreshDataItem not implemented"); + } + public virtual void RemoveDataItem(SysId id) + { + throw new NotSupportedException(GetType().Name + ".RemoveDataItem not implemented"); + } + + //------------------------------------------------------------------- + // Show/Hide deleted items. + protected void ShowDeletedItems(object sender, EventArgs e) { ShowDeletedItems(); } + public virtual void ShowDeletedItems() + { + DeletedItemsAreShown = true; + RefreshDataItems(); + } + protected void HideDeletedItems(object sender, EventArgs e) { HideDeletedItems(); } + public virtual void HideDeletedItems() + { + DeletedItemsAreShown = false; + RefreshDataItems(); + } + + //------------------------------------------------------------------- + // Create item. + public virtual bool CanCreateItem() { return false; } + protected void CreateItem(object sender, EventArgs e) { CreateItem(); } + public virtual void CreateItem() { } + + //------------------------------------------------------------------- + // View/Update item. + public virtual bool CanViewItem() { return false; } + protected void ViewItem(object sender, EventArgs e) { UpdateItem(false); } + public virtual bool CanUpdateItem() { return false; } + protected void UpdateItem(object sender, EventArgs e) { UpdateItem(true); } + public virtual void UpdateItem(bool updateItem = true) { } + + //------------------------------------------------------------------- + // Delete item. + public virtual bool CanDeleteItem() { return false; } + protected void DeleteItem(object sender, EventArgs e) { DeleteItem(); } + public virtual void DeleteItem() { } + + //------------------------------------------------------------------- + // Data import. + public virtual bool CanImportData() { return false; } + protected void ImportData(object sender, EventArgs e) { ImportData(); } + public virtual void ImportData() { } + + //------------------------------------------------------------------- + // Data export. + public virtual bool CanExportData() { return false; } + protected void ExportData(object sender, EventArgs e) { ExportData(); } + public virtual void ExportData() { } + + //------------------------------------------------------------------- + // P a n e l E v e n t s + //------------------------------------------------------------------- + // Item count changed. + public event EventHandler ItemCountChanged; + protected void InvokeItemCountChangedEvent(EventArgs e) + { + ItemCountChanged?.Invoke(this, e); + } + + //------------------------------------------------------------------- + // Item selection changed. + public event EventHandler ItemSelectionChanged; + protected void InvokeItemSelectionChangedEvent(EventArgs e) + { + ItemSelectionChanged?.Invoke(this, e); + } + + //------------------------------------------------------------------- + // Item created. + public class ItemModifiedEventArgs : EventArgs + { + public ItemModifiedEventArgs(Spm.DataItemType itemType, SysId itemId) + { + ItemType = itemType; + ItemId = itemId; + } + public Spm.DataItemType ItemType { get; private set; } + public SysId ItemId { get; private set; } + } + public event EventHandler ItemCreated; + protected void InvokeItemCreatedEvent(Spm.DataItemType itemType, SysId itemId) + { + ItemCreated?.Invoke(this, new ItemModifiedEventArgs(itemType, itemId)); + } + + //------------------------------------------------------------------- + // Item updated. + public event EventHandler ItemUpdated; + protected void InvokeItemUpdatedEvent(Spm.DataItemType itemType, SysId itemId) + { + ItemUpdated?.Invoke(this, new ItemModifiedEventArgs(itemType, itemId)); + } + + //------------------------------------------------------------------- + // Item deleted. + public event EventHandler ItemDeleted; + protected void InvokeItemDeletedEvent(Spm.DataItemType itemType, SysId itemId) + { + ItemDeleted?.Invoke(this, new ItemModifiedEventArgs(itemType, itemId)); + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.Designer.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.Designer.cs new file mode 100644 index 0000000..a03eed9 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.Designer.cs @@ -0,0 +1,142 @@ +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + partial class SpmPanel_Procedures + { + /// + /// 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.buttonRemove = new System.Windows.Forms.Button(); + this.buttonUpdate = new System.Windows.Forms.Button(); + this.buttonCreate = new System.Windows.Forms.Button(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listFilterProcedure = new Sarand.PatientMgr.Win.Forms.Filters.SpmItemListFilter_Procedure(); + this.listViewProcedure = new Sarand.PatientMgr.Win.Forms.Controls.SpmItemListView_Procedure(); + this.tabControl.SuspendLayout(); + this.SuspendLayout(); + // + // buttonRemove + // + this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonRemove.Location = new System.Drawing.Point(594, 182); + this.buttonRemove.Margin = new System.Windows.Forms.Padding(4); + this.buttonRemove.Name = "buttonRemove"; + this.buttonRemove.Size = new System.Drawing.Size(100, 28); + this.buttonRemove.TabIndex = 19; + this.buttonRemove.Text = "Remove"; + this.buttonRemove.UseVisualStyleBackColor = true; + // + // buttonUpdate + // + this.buttonUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonUpdate.Location = new System.Drawing.Point(594, 114); + this.buttonUpdate.Margin = new System.Windows.Forms.Padding(4); + this.buttonUpdate.Name = "buttonUpdate"; + this.buttonUpdate.Size = new System.Drawing.Size(100, 28); + this.buttonUpdate.TabIndex = 18; + this.buttonUpdate.Text = "Update"; + this.buttonUpdate.UseVisualStyleBackColor = true; + // + // buttonCreate + // + this.buttonCreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCreate.Location = new System.Drawing.Point(594, 46); + this.buttonCreate.Margin = new System.Windows.Forms.Padding(4); + this.buttonCreate.Name = "buttonCreate"; + this.buttonCreate.Size = new System.Drawing.Size(100, 28); + this.buttonCreate.TabIndex = 17; + this.buttonCreate.Text = "Create"; + this.buttonCreate.UseVisualStyleBackColor = true; + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPage1); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Location = new System.Drawing.Point(8, 217); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(574, 236); + this.tabControl.TabIndex = 16; + // + // tabPage1 + // + this.tabPage1.Location = new System.Drawing.Point(4, 25); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(566, 207); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Location = new System.Drawing.Point(4, 25); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(566, 207); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listFilterProcedure + // + this.listFilterProcedure.Location = new System.Drawing.Point(4, 4); + this.listFilterProcedure.Name = "listFilterProcedure"; + this.listFilterProcedure.Size = new System.Drawing.Size(693, 37); + this.listFilterProcedure.TabIndex = 20; + // + // listViewProcedure + // + this.listViewProcedure.FullRowSelect = true; + this.listViewProcedure.HideSelection = false; + this.listViewProcedure.Location = new System.Drawing.Point(8, 46); + this.listViewProcedure.Name = "listViewProcedure"; + this.listViewProcedure.OwnerDraw = true; + this.listViewProcedure.Size = new System.Drawing.Size(575, 165); + this.listViewProcedure.TabIndex = 21; + this.listViewProcedure.UseCompatibleStateImageBehavior = false; + // + // SpmPanel_Procedures + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listViewProcedure); + this.Controls.Add(this.listFilterProcedure); + this.Controls.Add(this.buttonRemove); + this.Controls.Add(this.buttonUpdate); + this.Controls.Add(this.buttonCreate); + this.Controls.Add(this.tabControl); + this.MinimumSize = new System.Drawing.Size(700, 460); + this.Name = "SpmPanel_Procedures"; + this.Size = new System.Drawing.Size(700, 460); + this.tabControl.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonRemove; + private System.Windows.Forms.Button buttonUpdate; + private System.Windows.Forms.Button buttonCreate; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private Filters.SpmItemListFilter_Procedure listFilterProcedure; + private Controls.SpmItemListView_Procedure listViewProcedure; + } +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.cs b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.cs new file mode 100644 index 0000000..26c8268 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.cs @@ -0,0 +1,348 @@ +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.Core.Bus; +using Sarand.PatientMgr.Core.Bus; +using Sarand.Win.Forms.Utils; +using Sarand.Core.Base; +using Sarand.PatientMgr.Core.App; +using Sarand.PatientMgr.Win.Forms.Maint; +using Sarand.PatientMgr.Win.Forms.Controls; + +namespace Sarand.PatientMgr.Win.Forms.Panels +{ + //======================================================================= + public partial class SpmPanel_Procedures : SpmPanel_Items + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelMode + { + Search, + Maintain, + } + public new class Config : SpmPanel_Items.Config + { + public PanelMode Mode { get; set; } = PanelMode.Maintain; + } + + //------------------------------------------------------------------- + // Data members. + private Config config = new Config(); + + //------------------------------------------------------------------- + // Construction. + public SpmPanel_Procedures() : this(new Config()) { } + public SpmPanel_Procedures(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. + protected override String DefaultMessageTitle { get { return "Procedure"; } } + public override int ItemTotal { get { return listViewProcedure.ItemTotal; } } + public override int ItemCount { get { return listViewProcedure.ItemCount; } } + public override int SelectedItemCount { get { return listViewProcedure.SelectedItemCount; } } + public SysId SelectedItemId { get { return listViewProcedure.SelectedItemId; } } + public List SelectedItemIds { get { return listViewProcedure.SelectedItemIds; } } + public SpmProcedure SelectedProcedure { get { return listViewProcedure.SelectedProcedure; } } + + //------------------------------------------------------------------- + // Configure. + public void SetConfig(Config config) + { + base.SetConfig(config); + this.config = config; + ConfigurePanel(); + } + + //------------------------------------------------------------------- + // Initialisation. + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (this.IsDesignerHosted()) return; + + ConfigurePanel(); + } + + private void ConfigurePanel() + { + if (!Created) return; + if (this.IsDesignerHosted()) return; + + // Complete form initialisation. + SetControlActivity(); + PositionControls(); + } + + //------------------------------------------------------------------- + // Initialise tabs. + private void InitTabs() + { + /*tabControl.TabPages.Clear(); + tabPages.Clear(); + if (!config.DisplayTabs) return; + + + foreach (var tabPage in tabPages) + tabControl.TabPages.Add(tabPage); + tabControl.Visible = (tabControl.TabPages.Count > 0);*/ + } + + //------------------------------------------------------------------- + // P a n e l I n t e r f a c e + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // F i l t e r + //------------------------------------------------------------------- + public SpmProcedure.Params GetParams() + { + SpmProcedure.Params prmProcedure = new SpmProcedure.Params(); + + // Sort columns. + prmProcedure.SortColumns.AddRange(listViewProcedure.GetSortColumns()); + return prmProcedure; + } + + //------------------------------------------------------------------- + // A c t i o n s + //------------------------------------------------------------------- + public override void RefreshDataItems() + { + listViewProcedure.RefreshProcedures(GetParams()); + } + public override void RefreshDataItem(SysId id) + { + listViewProcedure.RefreshProcedure(id); + } + public override void RemoveDataItem(SysId id) + { + listViewProcedure.RemoveItemById(id); + } + //------------------------------------------------------------------- + // Create item. + public override bool CanCreateItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanCreateItemType(Spm.DataItemType.Procedure)) return false; + return true; + } + public override void CreateItem() + { + if (!CanCreateItem()) return; + if (config.Mode == PanelMode.Search) return; + // Create new Procedure. + SpmForm_Procedure.Config configProcedure = new SpmForm_Procedure.Config(); + using (var form = new SpmForm_Procedure(configProcedure)) + { + if (form.ShowDialog() == DialogResult.OK) + { + /*RefreshDataItem(form.NewItemId); + InvokeItemCreatedEvent(Spm.ItemType.Procedure, form.NewItemId);*/ + } + } + } + + //------------------------------------------------------------------- + // View/Update item. + public override bool CanViewItem() + { + return true; + } + public override bool CanUpdateItem() + { + if (ReadOnly) return false; + /*bool canMaintainProcedures = SecurityProfile.UserCanCreateItemType(Spm.ItemType.Procedure) || SecurityProfile.UserCanUpdateItemType(Spm.ItemType.Procedure); + if (!canMaintainProcedures) return false;*/ + return true; + } + public override void UpdateItem(bool updateItem = true) + { + //if (!CanUpdateItem()) return; + if (config.Mode == PanelMode.Search) return; + SpmProcedure procedure = SelectedProcedure; + if (SelectedItemCount != 1) return; + if (!CanUpdateItem() && !CanViewItem()) return; + if (!CanUpdateItem()) updateItem = false; + if (procedure == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve selected item"); + return; + } + SpmForm_Procedure.Config configProcedure = new SpmForm_Procedure.Config(); + configProcedure.ProcedureToUpdate = procedure; + configProcedure.ReadOnly = (config.ReadOnly || !updateItem); + using (SpmForm_Procedure formProcedure = new SpmForm_Procedure(configProcedure)) + { + // Perform the update. + if (formProcedure.ShowDialog() == DialogResult.OK) + { + // Procedure has been updated. + RefreshDataItem(procedure.Id); + listViewProcedure.RefreshProcedure(procedure.Id); + InvokeItemUpdatedEvent(Spm.DataItemType.Procedure, procedure.Id); + } + } + } + + //------------------------------------------------------------------- + // Delete item. + public override bool CanDeleteItem() + { + if (ReadOnly) return false; + //if (!SecurityProfile.UserCanRemoveItemType(Spm.ItemType.Procedure)) return false; + return true; + } + public override void DeleteItem() + { + if (!CanDeleteItem()) return; + if (config.Mode == PanelMode.Search) return; + if (SelectedItemCount != 1) return; + SpmProcedure procedure = SelectedProcedure; + if (procedure == null) + { + MessageConsole.ShowMessageWarning("Failed to retrieve item for deletion."); + return; + } + if (!DepartmentMgr.ProcedureCanBeDeleted(procedure)) + { + MessageConsole.ShowMessageError("Unable to remove procedure - " + DepartmentMgr.ErrorStateMessage + "."); + return; + } + if (MessageConsole.ShowMessageConfirm("Are you sure that this procedure should be removed from the system?")) + { + if (DepartmentMgr.DeleteProcedure(procedure, DbUpdateInfo)) + { + int selectIdx = listViewProcedure.SelectedIndex; + listViewProcedure.RemoveItemById(procedure.Id.ToString()); + if (selectIdx >= listViewProcedure.ItemCount - 1) selectIdx--; + listViewProcedure.SelectedIndices.Clear(); + listViewProcedure.SelectedIndices.Add(selectIdx); + } + else MessageConsole.ShowMessageError("Failed to remove procedure - " + DepartmentMgr.ErrorStateMessage + "."); + } + } + + //------------------------------------------------------------------- + // Status change - Deactivate. + protected void DeactivateItem(object sender, EventArgs e) { DeactivateItem(); } + public void DeactivateItem() + { + SpmProcedure procedure = SelectedProcedure; + if (procedure != null && procedure.Status == SaStatus.Active) + { + procedure.Status = SaStatus.Inactive; + if (DepartmentMgr.UpdateProcedure(procedure, DbUpdateInfo)) + { + RefreshDataItem(procedure.Id); + //InvokeItemUpdatedEvent(Spm.ItemType.Procedure, procedure.Id); + } + } + } + + //------------------------------------------------------------------- + // Import data. + public override bool CanImportData() + { + return false; + } + public override void ImportData() + { + if (!CanImportData()) return; + } + + //------------------------------------------------------------------- + // Export data. + public override bool CanExportData() + { + return false; + } + public override void ExportData() + { + } + + //------------------------------------------------------------------- + // C o n t e x t M e n u + //------------------------------------------------------------------- + private SpmContextMenuStrip contextMenuStrip = new SpmContextMenuStrip(); + private void RefreshContextMenu() + { + contextMenuStrip.Name = "Procedure"; + contextMenuStrip.Items.Clear(); + if (CanCreateItem()) + contextMenuStrip.Items.Add("Create", null, CreateItem); + if (SysId.IsValid(listViewProcedure.SelectedItemId)) + { + SpmProcedure procedure = SelectedProcedure; + if (procedure != null) + { + if (CanUpdateItem()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + contextMenuStrip.Items.Add("Update", null, UpdateItem); + } + } + } + if (CanExportData() || CanImportData()) + { + if (contextMenuStrip.Items.Count > 0) + contextMenuStrip.Items.Add(new ToolStripSeparator()); + if (CanImportData()) + contextMenuStrip.Items.Add("Import", null, ImportData); + if (CanExportData()) + contextMenuStrip.Items.Add("Export", null, ExportData); + } + } + + //------------------------------------------------------------------- + // C o n t r o l A c t i v i t y + //------------------------------------------------------------------- + protected override void SetControlActivity() + { + // Procedure list: + listViewProcedure.Enabled = Enabled; + SetControlsReadOnly(); + + + //ToDo SpmPanel_Procedure > UpdateStats + } + protected override void SetControlsReadOnly() + { + } + + //------------------------------------------------------------------- + // P o s i t i o n C o n t r o l s + //------------------------------------------------------------------- + protected override void PositionControls() + { + if (this.IsDesignerHosted()) return; + base.PositionControls(); + } + + //------------------------------------------------------------------- + // F o r m E v e n t s + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.resx b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/Panels/SpmPanel_Procedures.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_Admission.Designer.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.Designer.cs new file mode 100644 index 0000000..bfbacab --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.TabPages +{ + partial class SpmTabPage_Admission + { + /// + /// 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_Admission.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.cs new file mode 100644 index 0000000..58a5daa --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Admission.cs @@ -0,0 +1,178 @@ +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_Admission : SpmTabPage + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelType + { + Unknown = 0, + Updates, + } + public new class Config : SpmTabPage.Config + { + /// Admission form hosting the tab control. + public SpmForm_Admission AdmissionForm { 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 SaPanel_UpdateLog panelUpdates = null; + + //------------------------------------------------------------------- + // Construction. + public SpmTabPage_Admission(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.Updates: + { + SaPanel_UpdateLog.Config configUpdateLog = new SaPanel_UpdateLog.Config(); + configUpdateLog.UpdateLogConsole = UpdateLogConsole; + panelUpdates = new SaPanel_UpdateLog(); + panelUpdates.SetConfig(configUpdateLog); + 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(SpmAdmission.Data data) + { + if (panelUpdates != null) + panelUpdates.ItemId = new ItemId((short)Spm.DataItemType.Admission, data.Id); + } + public bool IsDataValid(SpmAdmission.Data data) + { + return true; + } + public void PopulateFromControls(SpmAdmission.Data data) + { + } + public bool UpdateAssociatedData(SpmAdmission.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; + + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.Designer.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.Designer.cs new file mode 100644 index 0000000..216e7fa --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.TabPages +{ + partial class SpmTabPage_Facility + { + /// + /// 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_Facility.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.cs new file mode 100644 index 0000000..1eb13af --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_Facility.cs @@ -0,0 +1,178 @@ +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_Facility : SpmTabPage + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelType + { + Unknown = 0, + Updates, + } + public new class Config : SpmTabPage.Config + { + /// Facility form hosting the tab control. + public SpmForm_Facility FacilityForm { 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 SaPanel_UpdateLog panelUpdates = null; + + //------------------------------------------------------------------- + // Construction. + public SpmTabPage_Facility(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.Updates: + { + SaPanel_UpdateLog.Config configUpdateLog = new SaPanel_UpdateLog.Config(); + configUpdateLog.UpdateLogConsole = UpdateLogConsole; + panelUpdates = new SaPanel_UpdateLog(); + panelUpdates.SetConfig(configUpdateLog); + 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(SpmFacility.Data data) + { + if (panelUpdates != null) + panelUpdates.ItemId = new ItemId((short)Spm.DataItemType.Facility, data.Id); + } + public bool IsDataValid(SpmFacility.Data data) + { + return true; + } + public void PopulateFromControls(SpmFacility.Data data) + { + } + public bool UpdateAssociatedData(SpmFacility.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; + + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.Designer.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.Designer.cs new file mode 100644 index 0000000..ac26e0e --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.TabPages +{ + partial class SpmTabPage_FacilitySession + { + /// + /// 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_FacilitySession.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.cs new file mode 100644 index 0000000..b89b974 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilitySession.cs @@ -0,0 +1,178 @@ +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_FacilitySession : SpmTabPage + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelType + { + Unknown = 0, + Updates, + } + public new class Config : SpmTabPage.Config + { + /// FacilitySession form hosting the tab control. + public SpmForm_FacilitySession FacilitySessionForm { 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 SaPanel_UpdateLog panelUpdates = null; + + //------------------------------------------------------------------- + // Construction. + public SpmTabPage_FacilitySession(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.Updates: + { + SaPanel_UpdateLog.Config configUpdateLog = new SaPanel_UpdateLog.Config(); + configUpdateLog.UpdateLogConsole = UpdateLogConsole; + panelUpdates = new SaPanel_UpdateLog(); + panelUpdates.SetConfig(configUpdateLog); + 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(SpmFacilitySession.Data data) + { + if (panelUpdates != null) + panelUpdates.ItemId = new ItemId((short)Spm.DataItemType.FacilitySession, data.Id); + } + public bool IsDataValid(SpmFacilitySession.Data data) + { + return true; + } + public void PopulateFromControls(SpmFacilitySession.Data data) + { + } + public bool UpdateAssociatedData(SpmFacilitySession.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; + + } + + //------------------------------------------------------------------- + } + //======================================================================= +} diff --git a/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.Designer.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.Designer.cs new file mode 100644 index 0000000..fca8846 --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.Designer.cs @@ -0,0 +1,23 @@ +namespace Sarand.PatientMgr.Win.Forms.TabPages +{ + partial class SpmTabPage_FacilityTemplate + { + /// + /// 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_FacilityTemplate.cs b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.cs new file mode 100644 index 0000000..bf77e8a --- /dev/null +++ b/SaPatMgrWinForms/Win/Forms/TabPages/SpmTabPage_FacilityTemplate.cs @@ -0,0 +1,178 @@ +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_FacilityTemplate : SpmTabPage + { + //------------------------------------------------------------------- + // Configuration. + public enum PanelType + { + Unknown = 0, + Updates, + } + public new class Config : SpmTabPage.Config + { + /// FacilityTemplate form hosting the tab control. + public SpmForm_FacilityTemplate FacilityTemplateForm { 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 SaPanel_UpdateLog panelUpdates = null; + + //------------------------------------------------------------------- + // Construction. + public SpmTabPage_FacilityTemplate(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.Updates: + { + SaPanel_UpdateLog.Config configUpdateLog = new SaPanel_UpdateLog.Config(); + configUpdateLog.UpdateLogConsole = UpdateLogConsole; + panelUpdates = new SaPanel_UpdateLog(); + panelUpdates.SetConfig(configUpdateLog); + 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(SpmFacilityTemplate.Data data) + { + if (panelUpdates != null) + panelUpdates.ItemId = new ItemId((short)Spm.DataItemType.FacilityTemplate, data.Id); + } + public bool IsDataValid(SpmFacilityTemplate.Data data) + { + return true; + } + public void PopulateFromControls(SpmFacilityTemplate.Data data) + { + } + public bool UpdateAssociatedData(SpmFacilityTemplate.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; + + } + + //------------------------------------------------------------------- + } + //======================================================================= +}