protected virtual void exportBT_ClickAfter(object sboObject, SBOItemEventArg pVal) { object[] codes = GetDataTableCodes(); string xml = string.Empty; switch (expType.Value) { case "UDO": xml = b1DAO.GetXMLBom <UserObjectsMD>(codes, BoObjectTypes.oUserObjectsMD); break; case "UDT": xml = b1DAO.GetXMLBom <UserTablesMD>(codes, BoObjectTypes.oUserTables); break; case "UDF": xml = b1DAO.GetXMLBom <UserFieldsMD>(codes, BoObjectTypes.oUserFields); break; } SelectFileDialog dialog = new SelectFileDialog("C:\\", "", "|*.xml", DialogType.SAVE); dialog.Open(); if (!string.IsNullOrEmpty(dialog.SelectedFile)) { File.WriteAllText(dialog.SelectedFile, xml); Logger.Info(Messages.ExportDBInfoSuccess); this.UIAPIRawForm.Close(); } else { Logger.Error(Messages.ExportDBInfoFileNotFound); } }
protected virtual void fileButton_ClickAfter(object sboObject, SBOItemEventArg pVal) { SelectFileDialog dialog = new SelectFileDialog("C:\\", "", Messages.AdminModuleFilterPrefix + "|*.xml", DialogType.OPEN); dialog.Open(); modulePath.Value = dialog.SelectedFile; }
protected virtual void FileButton_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; SelectFileDialog dialog = new SelectFileDialog("C:\\", "", Messages.AdminModuleFilterPrefix + "|*.dll;*.exe;*.zip", DialogType.OPEN); dialog.Open(); modulePath.Value = dialog.SelectedFile; }
protected virtual void exportBT_ClickAfter(object sboObject, SBOItemEventArg pVal) { object[] codes = GetDataTableCodes(); string xml = string.Empty; switch (expType.Value) { case "UDO": xml = b1DAO.GetXMLBom<UserObjectsMD>(codes, BoObjectTypes.oUserObjectsMD); break; case "UDT": xml = b1DAO.GetXMLBom<UserTablesMD>(codes, BoObjectTypes.oUserTables); break; case "UDF": xml = b1DAO.GetXMLBom<UserFieldsMD>(codes, BoObjectTypes.oUserFields); break; } SelectFileDialog dialog = new SelectFileDialog("C:\\", "", "|*.xml", DialogType.SAVE); dialog.Open(); if (!string.IsNullOrEmpty(dialog.SelectedFile)) { File.WriteAllText(dialog.SelectedFile, xml); Logger.Info(Messages.ExportDBInfoSuccess); this.UIAPIRawForm.Close(); } else { Logger.Error(Messages.ExportDBInfoFileNotFound); } }
protected virtual void FileButton_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; SelectFileDialog dialog = new SelectFileDialog("C:\\", "", Messages.AdminModuleFilterPrefix + "|*.dover", DialogType.OPEN); dialog.Open(); modulePath.Value = dialog.SelectedFile; }