コード例 #1
0
        private void Edit()
        {
            if (cdSetTable.SelectedItems.Length < 1)
            {
                return;
            }

            SetDataSet.SetRow cdSetRow = (SetDataSet.SetRow)cdSetTable.TableModel.Rows[cdSetTable.SelectedIndicies[0]].Tag;

            if (cdSetRow == null)
            {
                return;
            }

            FormCDSetProperties formCDSet = new FormCDSetProperties(cdSetRow);

            if (formCDSet.ShowDialog(this) == DialogResult.OK)
            {
                try
                {
                    cdSetAdapter.Update(cdSetRow);
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                FillCDSetList();
            }
        }
コード例 #2
0
        private void New()
        {
            SetDataSet.SetRow cdSetRow = cdSetDataset.Set.NewSetRow();

            if (cdSetRow == null)
            {
                return;
            }

            FormCDSetProperties formCDSet = new FormCDSetProperties(cdSetRow);

            if (formCDSet.ShowDialog(this) == DialogResult.OK)
            {
                cdSetDataset.Set.AddSetRow(cdSetRow);
                cdSetAdapter.Update(cdSetDataset.Set);

                FillCDSetList();
            }
        }