Exemplo n.º 1
0
        /// <summary>
        /// 弹出式菜单的“新增教师信息”按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmTEACHERADD frm = new frmTEACHERADD();

            frm.ShowDialog();
            ReadData();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 弹出式菜单的“修改教师信息”按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

            if (this.gridView1.RowCount <= 0)
            {
                return;
            }
            id = ToolHelper.ConvertToInt(this.gridView1.GetFocusedRowCellValue("TEACHERNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的教师信息!", "提示信息");
                return;
            }
            else
            {
                frmTEACHERADD frm = new frmTEACHERADD(id, StatusClass.Edit);
                frm.ShowDialog();
                ReadData();
            }
        }