コード例 #1
0
        /// <summary>
        /// 弹出式菜单的“新增宿舍信息”按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbiAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmDORMITORYADD frm = new frmDORMITORYADD();

            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("DORMITORY_ID").ToString());
            if (id < 1)
            {
                MessageBox.Show("请选择需要修改的宿舍!", "提示信息");
                return;
            }
            else
            {
                frmDORMITORYADD frm = new frmDORMITORYADD(id, StatusClass.Edit);
                frm.ShowDialog();
                ReadData();
            }
        }