コード例 #1
0
        //新規追加処理
        private void AddData()
        {
            ItemForm     frmItem = new ItemForm(categoryDataSet1);
            DialogResult drRet   = frmItem.ShowDialog();

            if (drRet == DialogResult.OK)
            {
                if (frmItem.mtxtMoney.Text == null || frmItem.mtxtMoney.Text == "")
                {
                    frmItem.mtxtMoney.Text = "0";
                }
                moneyDataSet.moneyDataTable.AddmoneyDataTableRow(
                    frmItem.monCalendar.SelectionRange.Start,
                    frmItem.cmbCategory.Text,
                    frmItem.txtItem.Text,
                    int.Parse(frmItem.mtxtMoney.Text),
                    frmItem.txtRemarks.Text
                    );
            }
        }