예제 #1
0
        private void Add_Click(object sender, RoutedEventArgs e)
        {
            var         i  = repeater.CloneInput();
            InputWindow iw = new InputWindow(repeater.RepeaterData[i]);

            iw.ShowDialog();
            if (!iw.wasSubmited)
            {
                repeater.RemoveAt(i);
                return;
            }
            _records.Add(new Record(repeater.RowValues(i)));
            SetCountLabel();
        }
예제 #2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            if (dataGrid.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select a row.");
                return;
            }
            var         i  = dataGrid.Items.IndexOf(dataGrid.SelectedItems[0]);
            InputWindow iw = new InputWindow(repeater.RepeaterData[i]);

            iw.ShowDialog();
            dataGrid.ItemsSource = null;
            dataGrid.ItemsSource = Records;
        }
예제 #3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            //try
            //{
            DocManp     d      = new DocManp();
            DocInputs   inputs = d.ReadDoc(FileName.Text);
            InputWindow iw     = new InputWindow(inputs);

            iw.ShowDialog();
            //}
            //catch(Exception ex)
            //{
            //    Logger.Log(ex);
            //}
        }