예제 #1
0
        public object Delete(WpsJobDeleteRequestTep request)
        {
            var  context = TepWebContext.GetWebContext(PagePrivileges.UserView);
            bool result  = false;

            try {
                context.Open();
                context.LogInfo(this, string.Format("/job/wps/{{Id}} DELETE Id='{0}'", request.id));

                WpsJob job = null;
                job = WpsJob.FromIdentifier(context, request.id);
                EventFactory.LogWpsJob(context, job, "Job deleted", "portal_job_delete");
                job.Delete();
                result = true;

                context.Close();
            } catch (Exception e) {
                context.LogError(this, e.Message, e);
                context.Close();
                throw e;
            }
            return(new WebResponseBool(result));
        }