Beispiel #1
0
        private void btnAddPos_Click(object sender, EventArgs e)//添加(&A)职位
        {
            DevExpress.Data.SelectionChangedEventArgs ex = null;
            frmAddPosition myfrmAddPosition = new frmAddPosition(myDepID);//,myDepName);

            if (myfrmAddPosition.ShowDialog() == DialogResult.OK)
            {
                gridViewDep_SelectionChanged(sender, ex);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handles the Click event of the btnUpdatePos control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        /// 整理人:桂书丛
        /// 整理时间:2013-03-06
        private void btnUpdatePos_Click(object sender, EventArgs e)//修改职位
        {
            DevExpress.Data.SelectionChangedEventArgs ex = null;
            if (this.gridViewPos.SelectedRowsCount <= 0)//如果一行都没有选中
            {
                XtraMessageBox.Show("请选择要修改的项!", "注意:", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            DataRow        tempDataRow      = this.gridViewPos.GetFocusedDataRow();
            frmAddPosition myfrmAddPosition = new frmAddPosition(tempDataRow, myDepID);

            if (myfrmAddPosition.ShowDialog() == DialogResult.OK)
            {
                gridViewDep_SelectionChanged(sender, ex);
            }
        }