private void Button_Click_Drug_List(object sender, RoutedEventArgs e) { var drug_list = new DrugList(); drug_list.Show(); this.Close(); }
public DrugUpdate(DrugList drugList) { InitializeComponent(); this.DataContext = this; this.drugList = drugList; LoadAllComponents(); }
public DrugCreate(DrugList dl) { InitializeComponent(); this.DataContext = this; drugList = dl; lblDrugId.Content = drugList.drugController.drugService.drugRepository.getNextId(); LoadAlternatives(); }
private void Button_Click_Cancel(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("Da li ste sigurni da želite da izađete?", "Zdravo", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No); if (result == MessageBoxResult.Yes) { drugList = new DrugList(); drugList.Show(); this.Close(); } return; }
private void Button_Click_OK(object sender, RoutedEventArgs e) { if (tbDrugComponents.Text == "" || tbDrugComponents.Text == null || tbDrugDescription.Text == "" || tbDrugDescription.Text == null || tbDrugName.Text == "" || tbDrugName.Text == null || tbDrugQuantity.Text == "" || tbDrugQuantity.Text == null || tbDrugWeight.Text == "" || tbDrugWeight.Text == null) { MessageBox.Show("Niste popunili sva polja!", "Upozorenje!", MessageBoxButton.OK, MessageBoxImage.Warning); } else { drugList = new DrugList(); Model.Drug drug = getDrug(); drugList.drugController.UpdateDrug(drug); drugList.LoadAll(); drugList.Show(); this.Close(); MessageBox.Show("Uspešno ste izmenili lek!", "Uspešno!", MessageBoxButton.OK, MessageBoxImage.Information); } }