Пример #1
0
        /// <summary>
        /// 增加菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbiAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmCLASSADD frm = new frmCLASSADD();

            frm.ShowDialog();
            ReadData();
        }
Пример #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("CLASSNO").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的班级!", "提示信息");
                return;
            }
            else
            {
                frmCLASSADD frm = new frmCLASSADD(id, StatusClass.Edit);
                frm.ShowDialog();
                ReadData();
            }
        }