Esempio n. 1
0
        /// <summary>
        /// 添加按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            frmEditNoticeInfo fenInfo = new frmEditNoticeInfo();

            //表示新增
            fenInfo.NoticeID = 0;
            fenInfo.ShowDialog();
            //再次绑定dgvStuInfo
            this.FillNoticeInfo();
        }
Esempio n. 2
0
        /// <summary>
        /// 修改按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            frmEditNoticeInfo fenInfo2 = new frmEditNoticeInfo();

            //获取第一列也就是公告的编号
            fenInfo2.NoticeID = Convert.ToInt32(dgvNotice.CurrentRow.Cells[0].Value);
            fenInfo2.ShowDialog();
            //重新绑定DataGridView
            this.FillNoticeInfo();
        }