Exemple #1
0
        /// <summary>
        /// 尝试连接到指定的Oracle数据库,且获得当前T_00_000的版本
        /// </summary>
        /// <param name="AListStringArgs"></param>
        /// <returns></returns>
        private OperationDataArgs OperationA305(List <string> AListStringArgs)
        {
            OperationDataArgs LOperationReturn = new OperationDataArgs();

            LOperationReturn = DatabaseType3Operation.Connect2SpecifiedServiceObtainCurrentVersion(AListStringArgs);

            return(LOperationReturn);
        }
Exemple #2
0
        /// <summary>
        /// 初始化表数据
        /// </summary>
        /// <param name="AListStringArgs">
        /// 0-是否已经初始化
        /// 1-数据库类型
        /// 2-数据库服务器
        /// 3-端口
        /// 4-登录名
        /// 5-登录密码
        /// 6-目标数据库
        /// 7-对象类型
        /// 8-对象路径
        /// 9-租户Token
        /// </param>
        /// <returns></returns>
        private OperationDataArgs OperationA14(List <string> AListStringArgs)
        {
            OperationDataArgs LOperationReturn = new OperationDataArgs();

            if (AListStringArgs[0] == "1")
            {
                LOperationReturn.BoolReturn   = true;
                LOperationReturn.StringReturn = AscCodeToChr(27);
                return(LOperationReturn);
            }
            if (AListStringArgs[1] == "2")
            {
                LOperationReturn = DatabaseType2Operation.InitTablesData(AListStringArgs, GetIISBaseDirectory());
            }
            if (AListStringArgs[1] == "3")
            {
                LOperationReturn = DatabaseType3Operation.InitTablesData(AListStringArgs, GetIISBaseDirectory());
            }

            return(LOperationReturn);
        }
Exemple #3
0
        /// <summary>
        /// 创建数据库对象
        /// </summary>
        /// <param name="AListStringArgs">
        /// 0-是否已经创建
        /// 1-数据库类型
        /// 2-数据库服务器
        /// 3-端口
        /// 4-登录名
        /// 5-登录密码
        /// 6-目标数据库
        /// 7-对象类型
        /// 8-对象路径
        /// 9-租户Token
        /// <returns></returns>
        private OperationDataArgs OperationA12(List <string> AListStringArgs)
        {
            OperationDataArgs LOperationReturn = new OperationDataArgs();

            if (AListStringArgs[0] == "1")
            {
                LOperationReturn.BoolReturn   = true;
                LOperationReturn.StringReturn = AscCodeToChr(27);
                return(LOperationReturn);
            }

            if (AListStringArgs[1] == "2" && AListStringArgs[7] == "T")
            {
                LOperationReturn = DatabaseType2Operation.CreateObjectTable(AListStringArgs, GetIISBaseDirectory());
            }
            if (AListStringArgs[1] == "2" && AListStringArgs[7] == "F")
            {
                LOperationReturn = DatabaseType2Operation.CreateObjectBySQL(AListStringArgs, GetIISBaseDirectory());
            }
            if (AListStringArgs[1] == "2" && AListStringArgs[7] == "P")
            {
                LOperationReturn = DatabaseType2Operation.CreateObjectBySQL(AListStringArgs, GetIISBaseDirectory());
            }

            if (AListStringArgs[1] == "3" && AListStringArgs[7] == "T")
            {
                LOperationReturn = DatabaseType3Operation.CreateObjectTable(AListStringArgs, GetIISBaseDirectory());
            }
            if (AListStringArgs[1] == "3" && AListStringArgs[7] == "F")
            {
                LOperationReturn = DatabaseType3Operation.CreateObjectBySQL(AListStringArgs, GetIISBaseDirectory());
            }
            if (AListStringArgs[1] == "3" && AListStringArgs[7] == "P")
            {
                LOperationReturn = DatabaseType3Operation.CreateObjectBySQL(AListStringArgs, GetIISBaseDirectory());
            }

            return(LOperationReturn);
        }
Exemple #4
0
        /// <summary>
        /// 根据租户信息,更改表中的初始化数据
        /// </summary>
        /// <param name="AListStringArgs">
        /// 0-数据库类型
        /// 1-数据库服务器
        /// 2-端口
        /// 3-登录名
        /// 4-登录密码
        /// 5-数据库名或服务名
        /// 6-0租户名称
        /// 7-1租户Token
        /// 8-2超级系统管理员密码
        /// 9-3系统默认界面显示语言
        /// </param>
        /// <returns></returns>
        private OperationDataArgs OperationA15(List <string> AListStringArgs)
        {
            OperationDataArgs LOperationReturn        = new OperationDataArgs();
            List <string>     LListStrDatabaseProfile = new List <string>();
            List <string>     LListStrRentDataSetted  = new List <string>();

            string LStrXmlFileName         = string.Empty;
            string LStrVerificationCode001 = string.Empty;
            string LStrVerificationCode104 = string.Empty;
            string LStrUserID19            = string.Empty;
            string LStrXmlSAPassword       = string.Empty;
            string LStrA01 = string.Empty;

            try
            {
                for (int LIntLoopTemp = 0; LIntLoopTemp <= 5; LIntLoopTemp++)
                {
                    LListStrDatabaseProfile.Add(AListStringArgs[LIntLoopTemp]);
                }
                for (int LIntLoopTemp = 6; LIntLoopTemp <= 9; LIntLoopTemp++)
                {
                    LListStrRentDataSetted.Add(AListStringArgs[LIntLoopTemp]);
                }

                if (LListStrDatabaseProfile[0] == "2")
                {
                    LOperationReturn = DatabaseType2Operation.InitTableByRentInfo(LListStrDatabaseProfile, LListStrRentDataSetted);
                }
                if (LListStrDatabaseProfile[0] == "3")
                {
                    LOperationReturn = DatabaseType3Operation.InitTableByRentInfo(LListStrDatabaseProfile, LListStrRentDataSetted);
                }

                #region 修改XML文件的administrator的密码
                LStrVerificationCode001 = CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M001);
                LStrVerificationCode104 = CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrUserID19            = "102" + AListStringArgs[7] + "00000000001";
                LStrXmlSAPassword       = EncryptionAndDecryption.EncryptDecryptString(AListStringArgs[8], LStrVerificationCode104, EncryptionAndDecryption.UMPKeyAndIVType.M104);
                LStrXmlSAPassword       = EncryptionAndDecryption.EncryptStringSHA512(LStrUserID19 + LStrXmlSAPassword, LStrVerificationCode001, EncryptionAndDecryption.UMPKeyAndIVType.M001);
                LStrXmlFileName         = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
                LStrXmlFileName         = Path.Combine(LStrXmlFileName, @"UMP.Server\Args02.UMP.xml");
                XmlDocument LXmlDocArgs02 = new XmlDocument();
                LXmlDocArgs02.Load(LStrXmlFileName);
                XmlNodeList LXmlNodeListSAUsers = LXmlDocArgs02.SelectSingleNode("Parameters02").SelectSingleNode("SAUsers").ChildNodes;
                foreach (XmlNode LXmlNodeSingleUser in LXmlNodeListSAUsers)
                {
                    LStrA01 = LXmlNodeSingleUser.Attributes["A01"].Value;
                    if (LStrA01 != LStrUserID19)
                    {
                        continue;
                    }
                    LXmlNodeSingleUser.Attributes["A03"].Value = LStrXmlSAPassword;
                    break;
                }
                LXmlDocArgs02.Save(LStrXmlFileName);
                #endregion
            }
            catch (Exception ex)
            {
                LOperationReturn.BoolReturn   = false;
                LOperationReturn.StringReturn = "OperationA15()\n" + ex.ToString();
            }

            return(LOperationReturn);
        }