示例#1
0
        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);
            }
        }
示例#2
0
文件: License.cs 项目: THJLI/dover
 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;
 }
示例#3
0
        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;
        }
示例#4
0
        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;
        }
示例#5
0
        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);
            }
        }
示例#6
0
文件: Admin.cs 项目: THJLI/dover
 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;
 }