using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; using DevExpress.Data.Filtering; using DevExpress.ExpressApp; using DevExpress.ExpressApp.Actions; using DevExpress.ExpressApp.Editors; using DevExpress.ExpressApp.Layout; using DevExpress.ExpressApp.Model.NodeGenerators; using DevExpress.ExpressApp.SystemModule; using DevExpress.ExpressApp.Templates; using DevExpress.ExpressApp.Utils; using DevExpress.ExpressApp.Xpo; using DevExpress.Persistent.Base; using DevExpress.Persistent.Validation; namespace Nuvolar.Module.Win.CSharp.Controllers { // For more typical usage scenarios, be sure to check out https://documentation.devexpress.com/eXpressAppFramework/clsDevExpressExpressAppViewControllertopic.aspx. public partial class VATReport_VC : ViewController { public VATReport_VC() { InitializeComponent(); // Target required Views (via the TargetXXX properties) and create their Actions. } protected override void OnActivated() { base.OnActivated(); // Perform various tasks depending on the target View. } protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); // Access and customize the target View control. } protected override void OnDeactivated() { // Unsubscribe from previously subscribed events and release other references and resources. base.OnDeactivated(); } private void aVATReport_Create60XML_Execute(object sender, SimpleActionExecuteEventArgs e) { XPObjectSpace _ocur = View.ObjectSpace as XPObjectSpace; VATReport _VATReport = View.SelectedObjects[0] as VATReport; string _NAVProgramPath = ""; string _FileName60 = ""; SaveFileDialog _SaveFileDialog = new SaveFileDialog(); if (_NAVProgramPath != "") { _FileName60 = string.Format("{0}{1}.xml", Path.GetTempPath(), _VATReport.ShortName); //Me.Create1465XML(_ocur, _FileName65, _VATReport) //string _ShellCommand = String.Format("{0} ""cmd:open.xml {1}""", _NAVProgramPath, _FileName60); //Shell(_ShellCommand, AppWinStyle.NormalFocus) } else { _SaveFileDialog.Filter = "XML files (*.xml)|*.xml"; _SaveFileDialog.FileName = _VATReport.ShortName; _SaveFileDialog.DefaultExt = "xml"; _SaveFileDialog.FilterIndex = 2; _SaveFileDialog.RestoreDirectory = true; if (_SaveFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _FileName60 = _SaveFileDialog.FileName; //Me.Create65XML(_ocur, _FileName65, _VATReport) //MsgBox(String.Format("Az XML file ""{0}"" névvel a következő helyen került elmentésre:" + vbNewLine + "{1}", System.IO.Path.GetFileName(_SaveFileDialog.FileName), IO.Path.GetFullPath(_SaveFileDialog.FileName)), _ // MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "Exportálás befejeződött!") } } } } }