Exemple #1
0
        /// <summary>
        /// 删除登记记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int rowHandle = gridView1.FocusedRowHandle;;

            if (rowHandle < 0)
            {
                return;
            }

            if (!AppAction.CheckRight("登记信息修改", gridView1.GetRowCellValue(rowHandle, "AC100").ToString()))
            {
                return;
            }

            string s_ac001 = gridView1.GetRowCellValue(rowHandle, "AC001").ToString();

            if (MessageBox.Show("确认要删除登记信息吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
            {
                return;
            }

            if (FireAction.RemoveFireCheckin(s_ac001, Envior.cur_userId) > 0)
            {
                XtraMessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.RefreshData();
            }
        }
Exemple #2
0
        /// <summary>
        /// 删除登记记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BarButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int rowHandle = gridView1.FocusedRowHandle;;

            if (rowHandle < 0)
            {
                return;
            }

            //权限检查
            //string s_right = Tools.GetRight(Envior.cur_userId, AC077 == "1" ? "01030" : "07030");
            //if (s_right == "0" || (s_right == "1" && gridView1.GetRowCellValue(rowHandle, "AC100").ToString() != Envior.cur_userId))
            //{
            //    MessageBox.Show("权限不足!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            //}

            string s_ac001 = gridView1.GetRowCellValue(rowHandle, "AC001").ToString();

            if (MessageBox.Show("确认要删除登记信息吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
            {
                return;
            }

            if (FireAction.RemoveFireCheckin(s_ac001, Envior.cur_userId) > 0)
            {
                this.RefreshData();
            }
        }
Exemple #3
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int rowHandle = gridView1.FocusedRowHandle;;

            if (rowHandle < 0)
            {
                return;
            }

            string s_ac001 = gridView1.GetRowCellValue(rowHandle, "AC001").ToString();

            if (XtraMessageBox.Show("确认要删除登记信息吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Cancel)
            {
                return;
            }

            if (FireAction.RemoveFireCheckin(s_ac001, Envior.cur_user.UC001) > 0)
            {
                gridView1.DeleteRow(rowHandle);
                XtraMessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //AC01 ac01 = xpCollection_ac01[gridView1.GetDataSourceRowIndex(rowHandle)] as AC01;
                //ac01.Reload();
            }
        }