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

            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_jc_zm             zczmModel = LoanAccountsManager.Instance.GetModel(pk);
            EditLoanAccountsForm form      = new EditLoanAccountsForm();

            form.m_jczmModel = zczmModel;
            form.ShowDialog();

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