Example #1
0
        //освобождаем ресурсы
        private void Dispose(bool manual)
        {
            if (!disposed)
            {
                if (manual)
                {
                    //освобождаем managed ресурсы
                    //...

                    //иными словами - вызываем метод Dispose
                    //для всех managed член-переменных класса
                    //это нужно делать только для ручного вызова Dispose,
                    //потому что в другом случае случае Dispose для них вызовет GC

                    ResourceTypes.Clear();
                    foreach (var entry in ResourceEntries)
                    {
                        entry.Data = null;
                    }
                    ResourceEntries.Clear();
                }

                //освобождаем unmanaged ресурсы
                //...

                disposed = true;
            }
        }
Example #2
0
 /// <summary>
 /// Clear all child nodes and attributes from this node.
 /// </summary>
 public override void Clear()
 {
     Type      = "";
     Situation = "";
     Parts.Clear();
     Flags.Clear();
     ResourceTypes.Clear();
     RootPart      = null;
     rootPartIndex = 0;
     base.Clear();
 }
Example #3
0
        //internal void Create(Repository.RepositoryLocator locator)
        //{
        //    //Here we perform before create actions
        //    locator.AccountRepository.Create(this);
        //}

        //internal void Delete(Repository.RepositoryLocator locator)
        //{
        //    //Here we perform before delete actions
        //    locator.AccountRepository.Remove(this);
        //}

        //internal void Update(Repository.RepositoryLocator locator, Account account)
        //{
        //    this.ViewPatientsInValidLocationsOnly = account.ViewPatientsInValidLocationsOnly;
        //    this.Name = account.Name;
        //    this.WorkingDays = account.WorkingDays;
        //    this.AvailableRoles = account.AvailableRoles;
        //    this.AvailableAccessControlEntities = account.AvailableAccessControlEntities;
        //    this.StartWorkingHour = account.StartWorkingHour;
        //    this.StartWorkingMinute = account.StartWorkingMinute;
        //    this.EndWorkingHour = account.EndWorkingHour;
        //    this.EndWorkingMinute = account.EndWorkingMinute;
        //    this.HourDivisionSegment = account.HourDivisionSegment;
        //    this.DefaultViewMode = account.DefaultViewMode;
        //    this.ProcedureExpansionMode = account.ProcedureExpansionMode;
        //    this.PayersSearchMode = account.PayersSearchMode;
        //    this.ScheduleMode = account.ScheduleMode;
        //    this.OrderCreationMode = account.OrderCreationMode;
        //    this.OrderCreationTrigger = account.OrderCreationTrigger;
        //    this.VisitCreationTrigger = account.VisitCreationTrigger;
        //    this.SendEmailFromAddress = account.SendEmailFromAddress;

        //    this.ResourceTypes = account.ResourceTypes;
        //    this.ModalityTypes = account.ModalityTypes;
        //    this.ResouceAreas = account.ResouceAreas;
        //    this.ResourceLocations = account.ResourceLocations;
        //    this.AppointmentStatuses = account.AppointmentStatuses;
        //    this.CommentTypes = account.CommentTypes;
        //    this.AvailableProcedures = account.AvailableProcedures;
        //    this.AvailableDiangnosises = account.AvailableDiangnosises;
        //    this.ColorsConfiguration = account.ColorsConfiguration;
        //    this.StartWeekOn = account.StartWeekOn;
        //    this.NumberOfVisibleHours = account.NumberOfVisibleHours;
        //    this.WorkTypes = account.WorkTypes;

        //    this.IsScheduleAppointmentByEstimationSlots = account.IsScheduleAppointmentByEstimationSlots;
        //    this.IsStateOfServiceEnabled = account.IsStateOfServiceEnabled;
        //    this.IsProcedureRequired = account.IsProcedureRequired;
        //    this.IsLocationFilterVis = account.IsLocationFilterVis;
        //    this.IsModalityFilterVis = account.IsModalityFilterVis;
        //    this.IsRoomFilterVis = account.IsRoomFilterVis;
        //    this.IsRoleFilterVis = account.IsRoleFilterVis;
        //    this.IsProviderFilterVis = account.IsProviderFilterVis;
        //    this.IsApptStatusFilterVis = account.IsApptStatusFilterVis;
        //    this.IsDaysFilterVis = account.IsDaysFilterVis;
        //    this.IsPhyGroupVis = account.IsPhyGroupVis;
        //    this.IsPendingEnabled = account.IsPendingEnabled;
        //    this.IsWtGroupVis = account.IsWtGroupVis;
        //    this.IsReferralRequired = account.IsReferralRequired;
        //    this.IsPaymentsEnabled = account.IsPaymentsEnabled;
        //    this.IsProcessPaymentsEnabled = account.IsProcessPaymentsEnabled;
        //    this.IsBillingNoteRequired = account.IsBillingNoteRequired;
        //    this.IsCreateOrderRequired = account.IsCreateOrderRequired;
        //    this.IsVisitReasonRequired = account.IsVisitReasonRequired;
        //    this.PreselectProcedureTypes = account.PreselectProcedureTypes;
        //    this.PatientCategoryRequired = account.PatientCategoryRequired;
        //    this.IsProcedureGlobalSearchEnabled = account.IsProcedureGlobalSearchEnabled;
        //    this.IsCommentForBlockingRequired = account.IsCommentForBlockingRequired;
        //    this.IsPatientDOBMandatory = account.IsPatientDOBMandatory;
        //    this.IsWarningMessagesEnabled = account.IsWarningMessagesEnabled;
        //    this.MRNReadOnly = account.MRNReadOnly;
        //    this.IsMammographyActive = account.IsMammographyActive;

        //    this.WorkingSchedule.Items.Clear();
        //    this.WorkingSchedule.Items.AddRange(account.WorkingSchedule.Items);
        //    this.WorkingSchedule.Holidays.Clear();
        //    this.WorkingSchedule.Holidays.AddRange(account.WorkingSchedule.Holidays);

        //    this.OrderCreationParameters.Clear();
        //    this.OrderCreationParameters.AddRange(account.OrderCreationParameters);

        //    locator.AccountRepository.Update(this);
        //}

        public void InitDefaultData()
        {
            ResourceTypes.Clear();
            ResourceTypes.AddRange(AppointmentResourceType.GetList());

            // AppointmentStatuses.Clear();
            //AppointmentStatuses.AddRange(AppointmentStatus.GetList());

            //     CommentTypes.Clear();
            //  CommentTypes.AddRange(CommentType.GetList());
        }
Example #4
0
        public async void SelectSubscription(SelectionChangedEventArgs args)
        {
            if (args.AddedItems[0] is Subscription sub)
            {
                ResourceTypes.Clear();
                _client.SetSubscription(SelectedSubscription.Value);
                var types = await _client.ResourceTypes();

                foreach (var type in types)
                {
                    ResourceTypes.Add(type);
                }
                SelectedResourceType.Value         = types.First();
                ResourceTypesSelectorEnabled.Value = types.Count() > 1;
            }
        }