Exemple #1
0
        private void dlstLog_DeleteCommand(object sender, System.Web.UI.WebControls.DataListCommandEventArgs e)
        {
            long logId = (long)this.dlstLog.DataKeys[e.Item.ItemIndex];

            if (EventLogs.DeleteLog(logId))
            {
                this.BindLogs();
                this.ShowMsg("成功删除了单个操作日志", true);
                return;
            }
            this.ShowMsg("在删除过程中出现未知错误", false);
        }
Exemple #2
0
        private void dlstLog_DeleteCommand(object sender, DataListCommandEventArgs e)
        {
            long logId = (long)dlstLog.DataKeys[e.Item.ItemIndex];

            if (EventLogs.DeleteLog(logId))
            {
                BindLogs();
                ShowMsg("成功删除了单个操作日志", true);
            }
            else
            {
                ShowMsg("在删除过程中出现未知错误", false);
            }
        }
Exemple #3
0
        private void Delete(HttpContext context)
        {
            string text = context.Request["logId"];

            if (string.IsNullOrEmpty(text))
            {
                throw new HidistroAshxException("错误的参数");
            }
            long logId = long.Parse(text);

            if (EventLogs.DeleteLog(logId))
            {
                base.ReturnSuccessResult(context, "成功删除了单个操作日志", 0, true);
                return;
            }
            throw new HidistroAshxException("在删除过程中出现未知错误");
        }
Exemple #4
0
        protected void DeleteLog(object sender, System.EventArgs e)
        {
            long logId = 0L;

            if (!long.TryParse(((System.Web.UI.WebControls.Button)sender).CommandArgument, out logId))
            {
                this.ShowMsg("非正常删除!", true);
                return;
            }
            if (EventLogs.DeleteLog(logId))
            {
                this.BindLogs();
                this.ShowMsg("成功删除了单个操作日志", true);
                return;
            }
            this.ShowMsg("在删除过程中出现未知错误", false);
        }
        protected void DeleteLog(object sender, EventArgs e)
        {
            long result = 0L;

            if (long.TryParse(((Button)sender).CommandArgument, out result))
            {
                if (EventLogs.DeleteLog(result))
                {
                    this.BindLogs();
                    this.ShowMsg("成功删除了单个操作日志", true);
                }
                else
                {
                    this.ShowMsg("在删除过程中出现未知错误", false);
                }
            }
            else
            {
                this.ShowMsg("非正常删除!", true);
            }
        }