コード例 #1
0
        //Quan ly cach dung
        private void btnAddUseMedicine_Click(object sender, RoutedEventArgs e)
        {
            AddUseMedicine addUse = new AddUseMedicine(null);

            addUse.ShowDialog();
            List <UserMedicine> listUse = DataManager.getInstance().getAllUseMedicine();

            useMedicineDataGrid.DataContext = listUse;
        }
コード例 #2
0
        private void btnEditUseMedicine_Click(object sender, RoutedEventArgs e)
        {
            UserMedicine   use    = useMedicineDataGrid.SelectedItem as UserMedicine;
            AddUseMedicine addUse = new AddUseMedicine(use);

            addUse.ShowDialog();
            List <UserMedicine> listUse = DataManager.getInstance().getAllUseMedicine();

            useMedicineDataGrid.DataContext = listUse;
        }