private void buttonAdd_Click(object sender, RoutedEventArgs e) { var editDoctorForm = new EditDoctorForm(0); editDoctorForm.ShowDialog(); this.Presenter.LoadDoctorsByCriterias(); }
private void buttonEdit_Click(object sender, RoutedEventArgs e) { var selectedDoctor = this.GetSelectedDoctor(); if (selectedDoctor == null) { return; } int selectedDoctorId = selectedDoctor.DoctorId; var editDoctorForm = new EditDoctorForm(selectedDoctorId); editDoctorForm.ShowDialog(); this.Presenter.LoadDoctorsByCriterias(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.EditDoctorForm1 = ((SystemMed.View.EditDoctorForm)(target)); return; case 2: this.ButtonClose = ((System.Windows.Controls.Button)(target)); #line 15 "..\..\..\View\EditDoctorForm.xaml" this.ButtonClose.Click += new System.Windows.RoutedEventHandler(this.buttonCancel_Click); #line default #line hidden return; case 3: this.label6 = ((System.Windows.Controls.Label)(target)); return; case 4: this.labelId = ((System.Windows.Controls.Label)(target)); return; case 5: this.textBoxName = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.label7 = ((System.Windows.Controls.Label)(target)); return; case 7: this.textBoxPhone = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.textBoxAddress = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.textBoxSkills = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.panelBottom = ((System.Windows.Controls.WrapPanel)(target)); return; case 11: this.buttonSave = ((System.Windows.Controls.Button)(target)); #line 55 "..\..\..\View\EditDoctorForm.xaml" this.buttonSave.Click += new System.Windows.RoutedEventHandler(this.buttonSave_Click); #line default #line hidden return; case 12: this.buttonClose = ((System.Windows.Controls.Button)(target)); #line 56 "..\..\..\View\EditDoctorForm.xaml" this.buttonClose.Click += new System.Windows.RoutedEventHandler(this.buttonClose_Click); #line default #line hidden return; case 13: this.labelMessage = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }