private void UpdateForm()
        {
            if (!String.IsNullOrEmpty(ej.Job.ExceptionMessage))
            {
                Error.JobDescription = ej;
            }
            else
            {
                multiView.Views.Remove(exceptionTab);
            }

            Name.Text                 = ej.Job.Name;
            Comments.Text             = ej.Job.Comments;
            DateCreated.Text          = Web.Util.DateFormatter.Format(ej.Job.DateCreated);
            DateStarted.Text          = Web.Util.DateFormatter.Format(ej.Job.DateStarted);
            DateFinished.Text         = Web.Util.DateFormatter.Format(ej.Job.DateFinished);
            JobExecutionStatus.Status = ej.Job.JobExecutionStatus;

            // Set button actions

            Cancel.Enabled       = ej.Job.CanCancel;
            Cancel.OnClientClick = Web.Util.UrlFormatter.GetClientRedirect(CancelJob.GetUrl(job.Guid));

            Back.OnClientClick = Web.Util.UrlFormatter.GetClientRedirect(OriginalReferer);

            Download.Enabled       = ej.Job.JobExecutionStatus == JobExecutionState.Completed;
            Download.OnClientClick = Web.Util.UrlFormatter.GetClientPopUp(GetExportUrl(ej));
        }
        protected void Button_Command(object sender, CommandEventArgs e)
        {
            switch (e.CommandName)
            {
            case "Download":
                LoadJob();
                Response.Redirect(GetExportUrl(ej));
                break;

            case "Cancel":
                Response.Redirect(CancelJob.GetUrl(guid));
                break;

            case "Back":
                Response.Redirect(OriginalReferer);
                break;

            default:
                throw new NotImplementedException();
            }
        }
Пример #3
0
 protected void Cancel_Click(object sender, EventArgs e)
 {
     Response.Redirect(CancelJob.GetUrl(guid));
 }