示例#1
0
        private void Button_Click_Drug_List(object sender, RoutedEventArgs e)
        {
            var drug_list = new DrugList();

            drug_list.Show();
            this.Close();
        }
示例#2
0
 public DrugUpdate(DrugList drugList)
 {
     InitializeComponent();
     this.DataContext = this;
     this.drugList    = drugList;
     LoadAllComponents();
 }
示例#3
0
 public DrugCreate(DrugList dl)
 {
     InitializeComponent();
     this.DataContext  = this;
     drugList          = dl;
     lblDrugId.Content = drugList.drugController.drugService.drugRepository.getNextId();
     LoadAlternatives();
 }
示例#4
0
        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;
        }
示例#5
0
 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);
     }
 }