Exemple #1
0
        /// <summary>
        /// Handles the Click event of the btnAddDep 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-02-06
        private void btnAddDep_Click(object sender, EventArgs e) //添加(&A)部门
        {
            frmAdd myfrmAdd = new frmAdd();

            if (myfrmAdd.ShowDialog() == DialogResult.OK)
            {
                BindingDeP();
            }
        }
Exemple #2
0
        /// <summary>
        /// Handles the Click event of the btnUpdateDep 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-02-06
        private void btnUpdateDep_Click(object sender, EventArgs e) //修改部门
        {
            if (this.gridViewDep.SelectedRowsCount <= 0)
            {
                XtraMessageBox.Show("请选中要修改的项!", "注意", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            DataRow myDataRow = this.gridViewDep.GetFocusedDataRow();//选中行的原始数据
            frmAdd  myfrmAdd  = new frmAdd(myDataRow);

            if (myfrmAdd.ShowDialog() == DialogResult.OK)
            {
                BindingDeP();
            }
        }