コード例 #1
0
        private void btnAddData_Click(object sender, EventArgs e)
        {
            var addDictionaryDetail = new FrmEditDictionaryDetail(itemsId)
            {
                Owner = this
            };

            addDictionaryDetail.ShowDialog();
        }
コード例 #2
0
        private void btnEditData_Click(object sender, EventArgs e)
        {
            if (dgvInfo.CurrentRow == null)
            {
                MessageBoxHelper.ShowWarningMsg("请选择待修改的数据!");
                return;
            }

            var dataRow = (dgvInfo.CurrentRow.DataBoundItem as DataRowView).Row;

            var editDictionaryDetail = new FrmEditDictionaryDetail(dataRow)
            {
                Owner = this
            };

            editDictionaryDetail.ShowDialog();
        }