コード例 #1
0
        /// <summary>
        /// 新增宿舍楼菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbiADD_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmBUILDINGADD frm = new frmBUILDINGADD();

            frm.ShowDialog();
            ReadData();
        }
コード例 #2
0
        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bbiEdit_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int id = 0;

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