public string GetProfilePathServer(bool DoForTAS)
        {
            string strProfPath = "";

            using (NoRightsCheck())
            {
                if (String.IsNullOrEmpty(DbObject["Ident_DomainRD"].New.String))
                {
                    throw new ViException(881146, ExceptionRelevance.EndUser, "Ident_DomainRD");
                }

                ISingleDbObject dbDomain = DbObject.GetFK("Ident_DomainRD").Create();

                if (DoForTAS)
                {
                    string strTAS = (string)dbDomain.Custom.CallMethod("GetTASName");

                    if (String.IsNullOrEmpty(strTAS))
                    {
                        return(String.Empty);
                    }

                    strProfPath = String.Concat(@"\\", strTAS, @"\", dbDomain["ServerPartShareOnTAS"].New.String, @"\", DbObject["SubPath"].New.String);
                }
                else
                {
                    strProfPath = String.Concat(dbDomain["ServerPartShareOnServers"].New.String, @"\", DbObject["SubPath"].New.String);
                }
            }

            return(strProfPath);
        }
        public string GetProfilePathClient(bool DoForTAS)
        {
            string          strProfPath = "";
            ISingleDbObject oDomain;

            using (NoRightsCheck())
            {
                if (String.IsNullOrEmpty(DbObject["Ident_DomainRD"].New.String))
                {
                    throw new ViException(881146, ExceptionRelevance.EndUser, "Ident_DomainRD");
                }

                oDomain = DbObject.GetFK("Ident_DomainRD").Create();

                if (null == oDomain.Custom)
                {
                    throw new ViException(881150, ExceptionRelevance.EndUser, "Domain");
                }

                strProfPath = (string)oDomain.Custom.CallMethod("GetNetPath", DoForTAS);

                if (!String.IsNullOrEmpty(strProfPath))
                {
                    strProfPath += String.Concat(@"\", oDomain["ClientPartApps"].New.String, @"\", DbObject["SubPath"].New.String);
                }
            }

            return(strProfPath);
        }
        /// <exclude/>
        /// <summary>
        /// Es wird geprüft, ob zu der zu diesem Profil zugehörigen Applikation Profile vorhanden sind.
        /// Falls ja, wird das Flag IsProfileApplication in Application auf 1 gesetzt
        /// Falls nicht, wird das Flag IsProfileApplication in Application auf 0 gesetzt.
        /// </summary>
        private void _CheckIsProfileApplication()
        {
            IColDbObject  colApplicationProfile = DbObject.Connection.CreateCol("ApplicationProfile");;
            ISqlFormatter fSQL = DbObject.Connection.SqlFormatter;

            // Objekt wurde gelöscht
            if (DbObject.IsDeleted)
            {
                // geloescht

                // gibt es noch andere Profile ???
                colApplicationProfile.Prototype.WhereClause =
                    fSQL.AndRelation(fSQL.Comparison("UID_Application", DbObject["UID_Application"].New.String,
                                                     ValType.String, CompareOperator.Equal, FormatterOptions.None),
                                     fSQL.Comparison("UID_Profile", DbObject["UID_Profile"].New.String,
                                                     ValType.String, CompareOperator.NotEqual, FormatterOptions.None)
                                     );

                // nein
                if (colApplicationProfile.DBCount == 0)
                {
                    // exists the Application ( we are not in DeleteCascade )
                    // This Check is required because the UID_Application is filled, but the Object is already deleted
                    if (DbObject.Connection.Exists("Application", fSQL.Comparison("UID_Application", DbObject["UID_Application"].New.String,
                                                                                  ValType.String, CompareOperator.Equal, FormatterOptions.None)))
                    {
                        // auf false setzen
                        ISingleDbObject dbApplication = DbObject.GetFK("UID_Application").Create();

                        if (dbApplication != null)
                        {
                            if (dbApplication["IsProfileApplication"].New.Bool == true)
                            {
                                dbApplication["IsProfileApplication"].NewValue = false;
                                dbApplication.Save();
                            }
                        }
                    }
                }
            }

            // Objekt wurde neu angelegt
            if (!DbObject.IsLoaded)
            {
                // Insert
                ISingleDbObject dbApplication = DbObject.GetFK("UID_Application").Create();

                if (dbApplication != null)
                {
                    if (dbApplication["IsProfileApplication"].New.Bool == false)
                    {
                        dbApplication["IsProfileApplication"].NewValue = true;
                        dbApplication.Save();
                    }
                }
            }
        }