Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmAddAssExampleContent optionAE = new FrmAddAssExampleContent();

            optionAE.frmAssExamle = this;
            optionAE.isAdd        = 1;
            optionAE.ShowDialog();
        }
Beispiel #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            FrmAddAssExampleContent optionAE = new FrmAddAssExampleContent();

            optionAE.frmAssExamle = this;
            if (dgvAE.SelectedRows.Count == 1)
            {
                if (dgvAE.SelectedRows[0].Cells["AssExampleId"].Value != null)
                {
                    optionAE.AssRow = dgvAE.SelectedRows[0];
                    optionAE.isAdd  = 0;
                    optionAE.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("您还没有选择要修改的内容");
                return;
            }
        }