Ejemplo n.º 1
0
 private void NewVisit_B_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Pacjent p             = new Pacjent();
         int     numerPacjenta = PatientList_DG.SelectedIndex;
         p = listaPacjentow[numerPacjenta];
         Service1Client service = new Service1Client();
         if (service.IsBusy(p.Id) == 0)
         {
             NewVisit nv = new NewVisit(p);
             // Edycja wartości kolumny CzyZajety
             service.Busy(p.Id);
             nv.Show();
         }
         else
         {
             if (MessageBox.Show("Pacjent odbywa teraz wizytę u innego lekarza. Czy chcesz poprosić o dostęp edycji jego danych?", "Uwaga", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
             {
                 //do no stuff
             }
             else
             {
                 service.Wanted(p.Id);
             }
         }
     }
     catch
     {
         MessageBox.Show("Wybierz pacjenta, aby dodać nową wizytę");
     }
 }
Ejemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.NewVisit1 = ((Ekartoteka.NewVisit)(target));
                return;

            case 2:
                this.Preview_TB = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.Note_TB = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.Note_L = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.Patient_L = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.DrugsList_L = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.DrugsList_LB = ((System.Windows.Controls.ListBox)(target));
                return;

            case 8:
                this.AddDrugs_CB = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 9:
                this.AddDrug_B = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.AddedDrugs_L = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.AddedDrugs_LV = ((System.Windows.Controls.ListView)(target));
                return;

            case 12:
                this.DeleteDrug_B = ((System.Windows.Controls.Button)(target));
                return;

            case 13:
                this.SaveVisit_B = ((System.Windows.Controls.Button)(target));

            #line 27 "..\..\NewVisit.xaml"
                this.SaveVisit_B.Click += new System.Windows.RoutedEventHandler(this.SaveVisit_B_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.VisitsList_L = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.VisitPreview_TB = ((System.Windows.Controls.TextBox)(target));
                return;

            case 16:
                this.VisitPrewiev_L = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }