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_Item { //------------------------------------------------------------------- // 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 //------------------------------------------------------------------- //------------------------------------------------------------------- } //======================================================================= }