Beispiel #1
0
        /// <summary>
        /// 右键菜单-->增加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiAdd_Click(object sender, EventArgs e)
        {
            Form_Stu_Change sc = new Form_Stu_Change();

            sc.ControlTxt = "新增";
            DialogResult dr = sc.ShowDialog();

            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                MessageBox.Show("增加成功");
                this.Bound();
            }
        }
Beispiel #2
0
        /// <summary>
        /// 右键菜单-->修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiUpdate_Click(object sender, EventArgs e)
        {
            int             id = Convert.ToInt32(this.dgvStuInfo.SelectedRows[0].Cells["StuNo"].Value.ToString());
            Form_Stu_Change sc = new Form_Stu_Change();

            sc.ControlTxt = "修改";
            sc.StuNo      = id;
            DialogResult dr = sc.ShowDialog();

            if (dr == System.Windows.Forms.DialogResult.OK)
            {
                MessageBox.Show("修改成功");
                this.Bound();
            }
        }