public override void Execute(WorkflowContext context, IAppServiceProvider provider, IDataContext dataContext) { if ((Operation >= (int)PresentationActivityType.Default && Operation <= (int)PresentationActivityType.OpenParamForm) && FormId == null) { context.ThrowException("FormId is null", "Идентификатор формы не указан!"); } switch (Operation) { case (int)PresentationActivityType.Default: case (int)PresentationActivityType.OpenForm: context.ShowForm(FormId); context.FormCaption = Message; break; case (int)PresentationActivityType.OpenSelectForm: context.ShowSelectForm(FormId); context.FormCaption = Message; break; case (int)PresentationActivityType.OpenParamForm: context.ShowParamForm(FormId); context.FormCaption = Message; break; case (int)PresentationActivityType.ShowMessage: context.ShowMessage(String.IsNullOrEmpty(Message) ? context.Message : Message); break; case (int)PresentationActivityType.DefineFormId: context.CurrentFormId = FormId; base.Execute(context, provider, dataContext); break; case (int)PresentationActivityType.GenerateReportFromTemplate: context.ShowTemplateReport(Message); break; case (int)PresentationActivityType.DownloadFile: context.SendFile(Message); break; case (int)PresentationActivityType.UploadFile: context.UploadFile(Message); break; default: context.ShowForm(FormId); break; } }