コード例 #1
0
        private void EditDonation(object sender, MouseButtonEventArgs e)
        {
            DataGrid dg = sender as DataGrid;

            DonationsGrid  p  = (DonationsGrid)dg.SelectedItems[0];   // OR:  Patient p = (Patient)dg.SelectedItem;
            UpdateDonation up = new UpdateDonation(p);

            up.DeleteDon.IsEnabled       = false;
            up.DonationDate.SelectedDate = p.DonationDate;
            up.ShowDialog();
        }
コード例 #2
0
        private void EditDonation(object sender, MouseButtonEventArgs e)
        {
            try
            {
                DataGrid dg = sender as DataGrid;

                DonationsGrid  p  = (DonationsGrid)dg.SelectedItems[0];   // OR:  Patient p = (Patient)dg.SelectedItem;
                UpdateDonation up = new UpdateDonation(p);
                up.DonationDate.SelectedDate = p.DonationDate;
                up.ShowDialog();

                Refresh_DonationGrid(sender, e);
            }
            catch (Exception error)
            {
                MessageBox.Show("could not edit");
            }
        }
コード例 #3
0
        private void EditDonation(object sender, MouseButtonEventArgs e)
        {
            
                try
                {
                    DataGrid dg = sender as DataGrid;

                    DonationsGrid p = (DonationsGrid)dg.SelectedItems[0]; // OR:  Patient p = (Patient)dg.SelectedItem;
                    UpdateDonation up = new UpdateDonation(p);
                    up.DonationDate.SelectedDate = p.DonationDate;
                    up.ShowDialog();
                   
                    Refresh_DonationGrid(sender, e);
                }
                catch (Exception error)
                {
                    MessageBox.Show("could not edit");
                }

        }
コード例 #4
0
        private void EditDonation(object sender, MouseButtonEventArgs e)
        {

                try {
                    DataGrid dg = sender as DataGrid;
                    DonationsGrid p = (DonationsGrid)dg.SelectedItems[0]; // OR:  Patient p = (Patient)dg.SelectedItem;
                    UpdateDonation up = new UpdateDonation(p);
                    up.DeleteDon.IsEnabled = false;
                    up.DonationDate.SelectedDate = p.DonationDate;
                    up.ShowDialog();

                    Refresh_DonationsGrid(sender, e);
            }
                catch
                {

                }
        }