Пример #1
0
        private void buttonXAdd_Click(object sender, EventArgs e)
        {
            EditSpendingAccountsForm form = new EditSpendingAccountsForm();

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                this.loadDataList();
            }
        }
Пример #2
0
        private void buttonXModify_Click(object sender, EventArgs e)
        {
            if (this.gridViewDataList.SelectedRowsCount == 0)
            {
                MessageBox.Show("请选择一条数据!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            m_selectRow = this.gridViewDataList.FocusedRowHandle;
            // 取出pk
            int      selectRow            = this.gridViewDataList.GetSelectedRows()[0];
            int      pk                   = Convert.ToInt32(this.gridViewDataList.GetRowCellValue(selectRow, "pk").ToString());
            jt_zc_zm zczmModel            = ExpendAccountsManager.Instance.GetModel(pk);
            EditSpendingAccountsForm form = new EditSpendingAccountsForm();

            form.m_zczmModel            = zczmModel;
            form.m_spendingAccountsForm = this;
            form.ShowDialog();

            if (form.DialogResult == DialogResult.OK)
            {
                this.loadDataList();
            }
        }