コード例 #1
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            AddInsure add = new AddInsure();

            add.button.Content = "ADD";
            add.ShowDialog();
            load_All();
        }
コード例 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (this.listView.SelectedIndex == -1)
            {
                System.Windows.Forms.MessageBox.Show("Select an item first."); return;
            }
            int       index = this.listView.SelectedIndex;
            AddInsure add   = new AddInsure();

            add.id.Text        = all[index].ID.ToString();
            add.provider.Text  = all[index].Provider;
            add.date.Text      = all[index].ExpireDate.ToString();
            add.button.Content = "Edit";
            add.ShowDialog();
            load_All();
        }