Пример #1
0
 protected override void ToolExportClick(object sender, EventArgs e)
 {
     if (Procedure == null || Procedure.Data == null)
     {
         base.ToolExportClick(sender, e);
     }
     else
     {
         string fileName = Procedure.DataName.Replace(".", DateTime.Now.ToString("yyMMddHHmmss") + ".");
         using (var dialog = new SaveFileDialog()
         {
             InitialFileName = fileName
         })
         {
             if (dialog.Run(ParentWindow))
             {
                 DocumentFormatter.Execute(Procedure, new ExecuteArgs()
                 {
                     Parameters = parameters, Result = Query
                 });
                 System.Diagnostics.Process.Start(dialog.FileName);
             }
         }
     }
 }