Пример #1
0
        public IProject CreateProjectMsSql(string projectName, IApplicationServer appServer, IDatabaseServer dbServer,
                                           string databaseName, ISystemLocale language, CreatedProjectType type,
                                           UseVersioning useVersioning, IUser user)
        {
            const string CREATE_PROJECT =
                @"<ADMINISTRATION><PROJECT action=""addnew"" projectname=""{0}"" databaseserverguid=""{1}"" editorialserverguid=""{2}"" databasename=""{3}""
versioning=""{4}"" testproject=""{5}""><LANGUAGEVARIANTS><LANGUAGEVARIANT language=""{7}"" name=""{8}"" /></LANGUAGEVARIANTS><USERS><USER action=""assign"" guid=""{6}""/></USERS></PROJECT></ADMINISTRATION>";

            XmlDocument result = Session.ParseRQLResult(_session,
                                                        _session.ExecuteRQLRaw(
                                                            CREATE_PROJECT.RQLFormat(projectName, dbServer, appServer,
                                                                                     databaseName, (int)useVersioning,
                                                                                     (int)type, user,
                                                                                     language.LanguageAbbreviation,
                                                                                     language.Language),
                                                            RQL.IODataFormat.SessionKeyAndLogonGuid));

            string guidStr = result.InnerText;
            Guid   projectGuid;

            if (!Guid.TryParse(guidStr, out projectGuid))
            {
                throw new SmartAPIException(_session.ServerLogin,
                                            string.Format("Could not create project {0}", projectName));
            }

            InvalidateCache();
            return(new Project.Project(_session, projectGuid));
        }
Пример #2
0
 public bool Equals(ISystemLocale other)
 {
     return(other.LCID == LCID);
 }
Пример #3
0
 public bool Equals(ISystemLocale other)
 {
     return other.LCID == LCID;
 }