Ejemplo n.º 1
0
        private void btnSendMails_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (_sendEmailWindow == null)
            {
                _sendEmailWindow = new SendEmailWindow();
                _sendEmailWindow.Closed += Window_Closed;
            }

            _sendEmailWindow.Show();
            _sendEmailWindow.WindowState = WindowState.Normal;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Window = ((MyDentApplication.SendEmailWindow)(target));
     
     #line 9 "..\..\..\Emails\SendEmailWindow.xaml"
     this.Window.Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);
     
     #line default
     #line hidden
     return;
     case 2:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.rteBody = ((WpfRichText.RichTextEditor)(target));
     return;
     case 4:
     this.btnSendEmail = ((System.Windows.Controls.Button)(target));
     
     #line 19 "..\..\..\Emails\SendEmailWindow.xaml"
     this.btnSendEmail.Click += new System.Windows.RoutedEventHandler(this.btnSendEmail_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.lblExpiredMedicine = ((System.Windows.Controls.Label)(target));
     return;
     case 6:
     this.lblExpiredMedicine_Copy2 = ((System.Windows.Controls.Label)(target));
     return;
     case 7:
     this.txtFrom = ((System.Windows.Controls.TextBox)(target));
     return;
     case 8:
     this.lblExpiredMedicine_Copy3 = ((System.Windows.Controls.Label)(target));
     return;
     case 9:
     this.txtSubject = ((System.Windows.Controls.TextBox)(target));
     return;
     case 10:
     this.spEmailTo = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 11:
     this.btnSearchFiles = ((System.Windows.Controls.Button)(target));
     
     #line 30 "..\..\..\Emails\SendEmailWindow.xaml"
     this.btnSearchFiles.Click += new System.Windows.RoutedEventHandler(this.btnSearchFiles_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.lblExpiredMedicine_Copy = ((System.Windows.Controls.Label)(target));
     return;
     case 13:
     this.spAttachedFiles = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 14:
     this.btnAddEmail = ((System.Windows.Controls.Button)(target));
     
     #line 39 "..\..\..\Emails\SendEmailWindow.xaml"
     this.btnAddEmail.Click += new System.Windows.RoutedEventHandler(this.btnAddEmail_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.btnFindEmail = ((System.Windows.Controls.Button)(target));
     
     #line 42 "..\..\..\Emails\SendEmailWindow.xaml"
     this.btnFindEmail.Click += new System.Windows.RoutedEventHandler(this.btnFindEmail_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.chkAllPatients = ((System.Windows.Controls.CheckBox)(target));
     
     #line 45 "..\..\..\Emails\SendEmailWindow.xaml"
     this.chkAllPatients.Unchecked += new System.Windows.RoutedEventHandler(this.chkAllPatients_Checked_Unchecked);
     
     #line default
     #line hidden
     
     #line 45 "..\..\..\Emails\SendEmailWindow.xaml"
     this.chkAllPatients.Checked += new System.Windows.RoutedEventHandler(this.chkAllPatients_Checked_Unchecked);
     
     #line default
     #line hidden
     return;
     case 17:
     this.lblExpiredMedicine_Copy1 = ((System.Windows.Controls.Label)(target));
     return;
     case 18:
     this.btnClose = ((System.Windows.Controls.Button)(target));
     
     #line 47 "..\..\..\Emails\SendEmailWindow.xaml"
     this.btnClose.Click += new System.Windows.RoutedEventHandler(this.btnClose_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.lblStatus = ((System.Windows.Controls.Label)(target));
     return;
     case 20:
     this.lblFileSizeStatus = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }
Ejemplo n.º 3
0
        void Window_Closed(object sender, EventArgs e)
        {
            if (sender is AgendaWindow)
            {
                _agendaWindow = null;
            }
            else if (sender is ManageUsersWindow)
            {
                _manageUsersWindow = null;
            }
            else if (sender is ManageRemindersWindow)
            {
                _manageRemindersWindow = null;
                RefreshRemindersStackPanel();
            }
            else if (sender is ManageMedicinesWindow)
            {
                _manageMedicinesWindow = null;
                RefreshMedicinesStackPanel();
            }
            else if (sender is ManageTreatmentsWindow)
            {
                _manageTreatmentsWindow = null;
            }
            else if (sender is ManageReceivedInvoicesWindow)
            {
                _manageReceivedInvoicesWindow = null;
            }
            else if (sender is ManageOutgoingInvoicesWindow)
            {
                _manageOutgoingInvoicesWindow = null;
            }
            else if (sender is TotalInvoicesWindow)
            {
                _totalInvoicesWindow = null;
            }
            else if (sender is ManageProvidersWindow)
            {
                _manageProvidersWindow = null;
            }
            else if (sender is ManageTechnicalsWindow)
            {
                _manageTechnicalsWindow = null;
            }
            else if (sender is ManageLaboratoryWorksWindow)
            {
                _manageLaboratoryWorksWindow = null;
            }
            else if (sender is MedicalProofDocument)
            {
                _medicalProofDocumentWindow = null;
            }
            else if (sender is ManageGeneralPaidsWindow)
            {
                _manageGeneralPaidsWindow = null;
            }
            else if (sender is ManageContactsWindow)
            {
                _manageContactsWindow = null;
            }
            else if (sender is ManageCleanedMaterialsWindow)
            {
                _manageCleanedMaterialsWindow = null;
            }
            else if (sender is SendEmailWindow)
            {
                _sendEmailWindow = null;
            }
            else if (sender is ConfigureEmailWindow)
            {
                _configureEmailWindow = null;
            }
            else if (sender is ManagePatientsWindow)
            {
                _managePatientsWindow = null;
            }
            else if (sender is ManageDotationsWindow)
            {
                _manageDotationsWindow = null;
                RefreshDotationsStackPanel();
            }
            else if (sender is ManageTreatmentPricesWindow)
            {
                _manageTreatmentPricesWindow = null;
            }
            else if (sender is ManageBudgetsWindow)
            {
                _manageBudgetsWindow = null;
            }
            else if (sender is ManageAmericanExpressPaidsWindow)
            {
                _manageAmericanExpressPaidsWindow = null;
            }
            else if (sender is ManageAuthorizationsWindow)
            {
                _manageAuthorizationsWindow = null;
            }
            else if (sender is ManageDentegraAuthorizationsWindow)
            {
                _manageElegibilitiesWindow = null;
            }
            else if (sender is ManageDrawersWindow)
            {
                _manageDrawersWindow = null;
            }
            else if (sender is CashRegisterWindow)
            {
                _cashRegisterWindow = null;
            }
            else if (sender is ManageBanksWindow)
            {
                _manageBanksWindow = null;
            }
            else if (sender is ViewPaymentsWindow)
            {
                _viewPaymentsWindow = null;
            }
            else if (sender is ViewPaymentFoliosWindow)
            {
                _viewPaymentFoliosWindow = null;
            }
            else if (sender is ViewEventsWindow)
            {
                _viewEventsWindow = null;
            }
            else if (sender is ViewPendingPaymentsWindow)
            {
                _viewPendingPaymentsWindow = null;
            }
            else if (sender is FinishedEventsReminderModal)
            {
                _finishedEventsReminderModal = null;

                List<DateTime> datesUpdated = (sender as FinishedEventsReminderModal).FinishedEvents
                                                .Where(fe => fe.IsCompleted || fe.IsCanceled)
                                                .Select(fe => (new DateTime(fe.StartEvent.Year, fe.StartEvent.Month, fe.StartEvent.Day)))
                                                .Distinct()
                                                .ToList();

                if (datesUpdated.Count > 0 && _agendaWindow != null)
                {
                    _agendaWindow.RepaintSchedulerIfDateModifiedIsSelected(datesUpdated);
                }
            }
        }