当前位置: 首页>>代码示例>>C#>>正文


C# GroupInfo类代码示例

本文整理汇总了C#中GroupInfo的典型用法代码示例。如果您正苦于以下问题:C# GroupInfo类的具体用法?C# GroupInfo怎么用?C# GroupInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GroupInfo类属于命名空间,在下文中一共展示了GroupInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Only community manager can delete group
        if (!MembershipContext.AuthenticatedUser.IsAuthorizedPerResource("CMS.Groups", CMSAdminControl.PERMISSION_MANAGE))
        {
            RedirectToAccessDenied("CMS.Groups", CMSAdminControl.PERMISSION_MANAGE);
        }

        int groupId = QueryHelper.GetInteger("groupid", 0);
        gi = GroupInfoProvider.GetGroupInfo(groupId);

        if (gi != null)
        {
            lblMsg.Style.Add("font-weight", "bold");
            chkDeleteAll.Text = MacroResolver.Resolve(GetString("group.deleterelated"));
            mGroupListUrl = ResolveUrl(mGroupListUrl);

            // Pagetitle
            PageTitle.TitleText = GetString("group.deletegroup") + " \"" + HTMLHelper.HTMLEncode(gi.GroupDisplayName) + "\"";
            // Initialize breadcrumbs
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text = GetString("deletegroup.listlink"),
                RedirectUrl = mGroupListUrl,
            });
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text = HTMLHelper.HTMLEncode(gi.GroupDisplayName),
            });

            btnDelete.Click += new EventHandler(btnDelete_Click);
            btnCancel.Click += new EventHandler(btnCancel_Click);
        }
    }
开发者ID:arvind-web-developer,项目名称:csharp-projects-Jemena-Kentico-CMS,代码行数:34,代码来源:Group_Delete.aspx.cs

示例2: Init

 public static void Init(GroupInfo[] groupInfo)
 {
     for (int index = 0; index < groupInfo.Length; ++index)
     {
         m_groupDict.Add(groupInfo[index].Name, groupInfo[index].Group);
     }
 }
开发者ID:sunny352,项目名称:UIManager,代码行数:7,代码来源:UIGroup.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        // Only community manager can delete group
        if (!CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.Groups", CMSAdminControl.PERMISSION_MANAGE))
        {
            RedirectToCMSDeskAccessDenied("CMS.Groups", CMSAdminControl.PERMISSION_MANAGE);
        }

        int groupId = QueryHelper.GetInteger("groupid", 0);
        gi = GroupInfoProvider.GetGroupInfo(groupId);

        if (gi != null)
        {
            lblMsg.Style.Add("font-weight", "bold");
            mGroupListUrl = ResolveUrl(mGroupListUrl);

            // Pagetitle
            CurrentMaster.Title.TitleText = GetString("group.deletegroup") + " \"" + HTMLHelper.HTMLEncode(gi.GroupDisplayName) + "\"";
            CurrentMaster.Title.TitleImage = GetImageUrl("CMSModules/CMS_Groups/groupdelete.png");

            // Initializes breadcrumbs
            string[,] breadcrumbs = new string[2,3];
            breadcrumbs[0, 0] = GetString("group.deletegroup.listlink");
            breadcrumbs[0, 1] = mGroupListUrl;
            breadcrumbs[0, 2] = "";
            breadcrumbs[1, 0] = HTMLHelper.HTMLEncode(gi.GroupDisplayName);
            breadcrumbs[1, 1] = "";
            breadcrumbs[1, 2] = "";
            CurrentMaster.Title.Breadcrumbs = breadcrumbs;

            btnDelete.Click += new EventHandler(btnDelete_Click);
            btnCancel.Click += new EventHandler(btnCancel_Click);
        }
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:34,代码来源:Group_Delete.aspx.cs

示例4: CreateGroup

    /// <summary>
    /// Creates group. Called when the "Create group" button is pressed.
    /// </summary>
    private bool CreateGroup()
    {
        // Create new group object
        GroupInfo newGroup = new GroupInfo();

        // Set the properties
        newGroup.GroupDisplayName = "My new group";
        newGroup.GroupName = "MyNewGroup";
        newGroup.GroupSiteID = CMSContext.CurrentSiteID;
        newGroup.GroupDescription = "";
        newGroup.GroupApproveMembers = GroupApproveMembersEnum.AnyoneCanJoin;
        newGroup.GroupAccess = SecurityAccessEnum.AllUsers;
        newGroup.GroupApproved = true;
        newGroup.GroupApprovedByUserID = CurrentUser.UserID;
        newGroup.GroupCreatedByUserID = CurrentUser.UserID;
        newGroup.AllowCreate = SecurityAccessEnum.GroupMembers;
        newGroup.AllowDelete = SecurityAccessEnum.GroupMembers;
        newGroup.AllowModify = SecurityAccessEnum.GroupMembers;
        newGroup.GroupNodeGUID = Guid.Empty;

        // Save the group
        GroupInfoProvider.SetGroupInfo(newGroup);

        return true;
    }
开发者ID:hollycooper,项目名称:Sportscar-Standings,代码行数:28,代码来源:Default.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            GroupContext groupContext = GroupContext.GetGroupContext();

            GroupInfo groupInfo = new GroupInfo();
            groupInfo.GroupID = groupContext.CurrentGroupID;

            string fromSQL = groupInfo.FromSQL;
            string whereSQL = groupInfo.WhereSQL;

            if (whereSQL != "")
                whereSQL = "WHERE " + whereSQL;
            string selectSQL = "SELECT SALESPOTENTIAL, CLOSEPROBABILITY, ACTUALAMOUNT, DATEOPENED, CLOSED, ESTIMATEDCLOSE ";
            string groupSQL = selectSQL + "FROM " + fromSQL + " " + whereSQL;

            using (new SparseQueryScope())
            using (IDbConnection vConn = GroupInfo.GetOpenConnection())
            {
                OleDbDataAdapter vAdapter = new OleDbDataAdapter(groupSQL, vConn as OleDbConnection);
                foreach (DbParameter p in groupInfo.Parameters)
                {
                    vAdapter.SelectCommand.Parameters.Add(p);
                }
                vAdapter.SelectCommand.Prepare();
                DataTable dt = new DataTable();
                vAdapter.Fill(dt);

                if (dt.Rows.Count != 0)
                {
                    GetNumOfOpportunities(dt);
                    GetPotentialValues(dt);
                    GetAverageCloseProb(dt);
                    GetActualAmountValues(dt);
                    GetAverageDaysOpen(dt);
                    GetRangeofDates(dt);
                }
                else
                {
                    lblNumOfOppsVal.Text = "0";
                    curSalesPotentialTotalVal.Text = "0";
                    curSalesPotentialAverageVal.Text = "0";
                    curWeightedPotentialAverageVal.Text = "0";
                    curWeightedPotentialTotalVal.Text = "0";
                    lblAverageCloseProbabilityVal.Text = "0";
                    curActualAmountTotalVal.Text = "0";
                    curActualAmountAverageVal.Text = "0";
                    lblAverageNumOfDaysOpenVal.Text = "0";
                    lblRangeOfEstCloseVal.Text = GetLocalResourceObject("None_rsc").ToString();
                }
            }
        }
        catch //Group didn't contain any records disable active controls
        {
            btnUpdateOpps.Enabled = false;
            ddlReports.Enabled = false;
        }
    }
开发者ID:RyanTest,项目名称:SalesLogix_Eval,代码行数:59,代码来源:OpportunityStatistics.ascx.cs

示例6: MakeFooter

        private object MakeFooter(GroupInfo<Lunch> info)
        {
            //will add the word Total at the grid level footer (Level == 0)
            var pref = info.Level == 0 ? "Total " : "";

            return new
                    {
                        Food = pref + " count = " + info.Items.Count(),
                        Location = info.Items.Select(o => o.Location).Distinct().Count() + " distinct locations",
                        Date = pref + " max: " + info.Items.Max(o => o.Date).Date.ToShortDateString(),
                        Price = info.Items.Sum(o => o.Price)
                    };
        }
开发者ID:russellsamantha,项目名称:Git_Work,代码行数:13,代码来源:GroupingGridController.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        RestoreState();

        GroupInfo info = new GroupInfo();
        info.GroupID = GroupContext.CurrentGroupID;

        items.DataSource = CreateFilterItems();
        items.DataBind();

        StringBuilder resources = new StringBuilder();
        resources.AppendFormat("Sage.TaskPane.FiltersTasklet.Resources = {0};", JsonConvert.SerializeObject(new ClientResourcesRepresentation(this)));

        ScriptManager.GetCurrent(Page).Scripts.Add(new ScriptReference("~/SmartParts/TaskPane/Filters/FiltersTasklet.js"));
        ScriptManager.RegisterStartupScript(Page, typeof(Page), "taskpane-filters-resources", resources.ToString(), true);
    }
开发者ID:ssommerfeldt,项目名称:TAC_CFX,代码行数:16,代码来源:FiltersTasklet.ascx.cs

示例8: Edit

        public ActionResult Edit(int id, GroupInfo gi, string action)
        {
            try
            {
                ServiceClient sc = Sas.GetAuthenticatedServiceClient(this, action);
                if (sc != null)
                {
                    sc.UpdateGroup(id, gi.Name, gi.Description);
                }

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
开发者ID:HenChao,项目名称:SeniorDesign,代码行数:17,代码来源:GroupController.cs

示例9: ddlReports_TextChanged

    protected void ddlReports_TextChanged(object sender, EventArgs e)
    {
        Plugin report = new Plugin();
        string reportURL = "";

        GroupContext groupContext = GroupContext.GetGroupContext();

        GroupInfo groupInfo = new GroupInfo();
        groupInfo.GroupID = groupContext.CurrentGroupID;

        switch (ddlReports.Text)
        {
            case "None":
                break;
            case "Sales Process Stage Analysis":
                report = Sage.SalesLogix.Plugins.Plugin.LoadByName("Sales Process Stage Analysis", "Opportunity", Sage.SalesLogix.Plugins.PluginType.CrystalReport);
                break;
            case "Sales Process Step Usage":
                report = Sage.SalesLogix.Plugins.Plugin.LoadByName("Sales Process Step Usage", "Opportunity", Sage.SalesLogix.Plugins.PluginType.CrystalReport);
                break;
            //case "Quota vs. Actual Sales":
            //    report = Sage.SalesLogix.Plugins.Plugin.LoadByName("Quota Vs. Actual Sales", "Opportunity", Sage.SalesLogix.Plugins.PluginType.CrystalReport);
            //    break;
            case "Forecast by Account Manager":
                report = Sage.SalesLogix.Plugins.Plugin.LoadByName("Forecast by Account Manager", "Opportunity", Sage.SalesLogix.Plugins.PluginType.CrystalReport);
                break;
            //case "Competetive Analysis":
            //    report = Sage.SalesLogix.Plugins.Plugin.LoadByName("Competetive Analysis", "Opportunity", Sage.SalesLogix.Plugins.PluginType.CrystalReport);
            //    break;
        }

        if (report.PluginId != null)
        {
            reportURL = "~/ReportManager.aspx?showthisreport=" + report.PluginId + "&showrptfamily=" + report.Family + "&filterbygroupid=" + groupInfo.GroupID;

            Response.Redirect(reportURL);
        }
    }
开发者ID:RyanTest,项目名称:SalesLogix_Eval,代码行数:38,代码来源:OpportunityStatistics.ascx.cs

示例10: Parse

        public GroupInfo Parse(SelectAtomContext ctx)
        {
            var result = new GroupInfo();

            foreach (var f in this.Field_regulars)
            {
                var temp = f.Parse(ctx);
                FieldRegularInfo fr = temp;
                if (fr == null)
                    System.Diagnostics.Debug.Assert(false, "�����ֶ���������");

                result.Fields.Add(fr.FullName);
            }

            if (Having_clause_full != null)
            {
                result.Having = new HavingInfo();
                Having_clause_full.Parse(result.Having);
                //result.Having = temp;
                //result = result.Join(temp);
            }
            return result;
        }
开发者ID:koksaver,项目名称:CodeHelper,代码行数:23,代码来源:Group_Clause.cs

示例11: FindClosestGroup

 private int FindClosestGroup()
 {
     Groups.Clear();
     int GroupRange = WowControl.GroupRange;
     int RangeFromPlayerToGroup = WowControl.RangeFromPlayerToGroup;
     int MinPlayersInGroup = WowControl.MinPlayersInGroup;
     for (int i = 1; i < wow.Objects.Count; i++)
     {
         if ((wow.Objects[i].Health > 1) & (wow.Objects[i].Faction == wow.Objects[0].Faction))
         {
             GroupInfo Temp = new GroupInfo();
             Temp.Indexes = new List<int>();
             if (Groups.Count == 0)
             {
                 Temp.X = wow.Objects[i].X;
                 Temp.Y = wow.Objects[i].Y;
                 Temp.Z = wow.Objects[i].Z;
                 Temp.CountPlayers++;
                 Temp.Range = WowControl.CheckPoint(wow.Objects[0].X, wow.Objects[0].Y, wow.Objects[0].Z, wow.Objects[i].X, wow.Objects[i].Y, wow.Objects[i].Z);
                 Temp.Indexes.Add(i);
                 Groups.Add(Temp);
             }
             else
             {
                 bool InGroup = false;
                 for (int g = 0; g < Groups.Count; g++)
                 {
                     double Range = WowControl.CheckPoint(wow.Objects[i].X, wow.Objects[i].Y, wow.Objects[i].Z, Groups[g].X, Groups[g].Y, Groups[g].Z);
                     if (Range < GroupRange)
                     {
                         InGroup = true;
                         GroupInfo[] TempGroup = Groups.ToArray();
                         //TempGroup[g].Indexes = new List<int>(Groups[g].Indexes.Count);
                         //for (int count = 0; count < Groups[g].Indexes.Count; count++)
                             //TempGroup[g].Indexes.Add(Groups[g].Indexes[count]);
                         TempGroup[g].Indexes.Add(i);
                         TempGroup[g].CountPlayers++;
                         float x = 0, y = 0, z = 0;
                         for (int gi = 0; gi < TempGroup[g].Indexes.Count; gi++)
                         {
                             x += wow.Objects[TempGroup[g].Indexes[gi]].X;
                             y += wow.Objects[TempGroup[g].Indexes[gi]].Y;
                             z += wow.Objects[TempGroup[g].Indexes[gi]].Z;
                         }
                         TempGroup[g].X = x / TempGroup[g].Indexes.Count;
                         TempGroup[g].Y = y / TempGroup[g].Indexes.Count;
                         TempGroup[g].Z = z / TempGroup[g].Indexes.Count;
                         TempGroup[g].Range = WowControl.CheckPoint(TempGroup[g].X, TempGroup[g].Y, TempGroup[g].Z, Groups[0].X, Groups[0].Y, Groups[0].Z);
                         Groups.Clear();
                         for (int c = 0; c < TempGroup.Length; c++)
                         {
                             Groups.Add(TempGroup[c]);
                             //for (int ii = 0; ii < TempGroup[c].Indexes.Count; ii++)
                                 //Groups[c].Indexes.Add(TempGroup[c].Indexes[ii]);
                         }
                     }
                 }
                 if (InGroup == false)
                 {
                     Temp.X = wow.Objects[i].X;
                     Temp.Y = wow.Objects[i].Y;
                     Temp.Z = wow.Objects[i].Z;
                     Temp.CountPlayers++;
                     Temp.Range = WowControl.CheckPoint(wow.Objects[0].X, wow.Objects[0].Y, wow.Objects[0].Z, wow.Objects[i].X, wow.Objects[i].Y, wow.Objects[i].Z);
                     Temp.Indexes.Add(i);
                     Groups.Add(Temp);
                 }
             }
         }
     }
     double MinRange = 10000;
     int ClosestGroup = 1000;
     for (int i = 0; i < Groups.Count; i++)
     {
         double Range = WowControl.CheckPoint(wow.Objects[0].X, wow.Objects[0].Y, wow.Objects[0].Z, Groups[i].X, Groups[i].Y, Groups[i].Z);
         if (Range < RangeFromPlayerToGroup)
             if ((Groups[i].Range != 0) & (Groups[i].Range < MinRange) & (Groups[i].Range < RangeFromPlayerToGroup) & (Groups[i].CountPlayers >= MinPlayersInGroup))
             {
                 MinRange = Groups[i].Range;
                 ClosestGroup = i;
             }
     }
     return ClosestGroup;
 }
开发者ID:Bia10,项目名称:clrn,代码行数:84,代码来源:FarmHonor.cs

示例12: CreateGroupMediaLibrary

    /// <summary>
    /// Creates group media library.
    /// </summary>
    /// <param name="group">Particular group info object</param>
    private void CreateGroupMediaLibrary(GroupInfo group)
    {
        // Set general values
        string codeName = "Library_group_" + group.GroupGUID;

        // Check if library with same name already exists
        MediaLibraryInfo mlInfo = MediaLibraryInfoProvider.GetMediaLibraryInfo(codeName, SiteContext.CurrentSiteID, group.GroupID);
        if (mlInfo == null)
        {
            // Create new object (record) if needed
            mlInfo = new MediaLibraryInfo();
            const string suffix = " media";
            mlInfo.LibraryDisplayName = TextHelper.LimitLength(@group.GroupDisplayName, 200 - suffix.Length, string.Empty) + suffix;
            mlInfo.LibraryFolder = @group.GroupName;
            mlInfo.LibraryName = codeName;
            mlInfo.LibraryDescription = string.Empty;
            mlInfo.LibraryGroupID = @group.GroupID;
            mlInfo.LibrarySiteID = SiteContext.CurrentSiteID;

            // Set security
            mlInfo.FileCreate = SecurityAccessEnum.GroupMembers;
            mlInfo.FileDelete = SecurityAccessEnum.GroupMembers;
            mlInfo.FileModify = SecurityAccessEnum.GroupMembers;
            mlInfo.FolderCreate = SecurityAccessEnum.GroupMembers;
            mlInfo.FolderDelete = SecurityAccessEnum.GroupMembers;
            mlInfo.FolderModify = SecurityAccessEnum.GroupMembers;
            mlInfo.Access = SecurityAccessEnum.GroupMembers;

            try
            {
                MediaLibraryInfoProvider.SetMediaLibraryInfo(mlInfo);
            }
            catch
            {
            }

            // Create additional folders
            //MediaLibraryInfoProvider.CreateMediaLibraryFolder(SiteContext.CurrentSiteName, mlInfo.LibraryID, "Videos", false);
            //MediaLibraryInfoProvider.CreateMediaLibraryFolder(SiteContext.CurrentSiteName, mlInfo.LibraryID, "Other", false);
            //MediaLibraryInfoProvider.CreateMediaLibraryFolder(SiteContext.CurrentSiteName, mlInfo.LibraryID, "Photos & Images", false);
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:46,代码来源:GroupRegistration.ascx.cs

示例13: CreateGroupForumSearchIndex

    /// <summary>
    /// Creates forum search index.
    /// </summary>
    /// <param name="group">Particular group info object</param>
    private void CreateGroupForumSearchIndex(GroupInfo group)
    {
        string codeName = "forums_group_" + group.GroupGUID;

        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(codeName);
        if (sii == null)
        {
            // Create search index info
            sii = new SearchIndexInfo();
            sii.IndexName = codeName;
            const string suffix = " - Forums";
            sii.IndexDisplayName = TextHelper.LimitLength(group.GroupDisplayName, 200 - suffix.Length, string.Empty) + suffix;
            sii.IndexAnalyzerType = SearchAnalyzerTypeEnum.StandardAnalyzer;
            sii.IndexType = PredefinedObjectType.FORUM;
            sii.IndexIsCommunityGroup = false;

            // Create search index settings info
            SearchIndexSettingsInfo sisi = new SearchIndexSettingsInfo();
            sisi.ID = Guid.NewGuid();
            sisi.ForumNames = "*_group_" + group.GroupGUID;
            sisi.Type = SearchIndexSettingsInfo.TYPE_ALLOWED;
            sisi.SiteName = SiteContext.CurrentSiteName;

            // Create settings item
            SearchIndexSettings sis = new SearchIndexSettings();

            // Update settings item
            sis.SetSearchIndexSettingsInfo(sisi);

            // Update xml value
            sii.IndexSettings = sis;
            SearchIndexInfoProvider.SetSearchIndexInfo(sii);

            // Assing to current website and current culture
            SearchIndexSiteInfoProvider.AddSearchIndexToSite(sii.IndexID, SiteContext.CurrentSiteID);
            CultureInfo ci = DocumentContext.CurrentDocumentCulture;
            if (ci != null)
            {
                SearchIndexCultureInfoProvider.AddSearchIndexCulture(sii.IndexID, ci.CultureID);
            }
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:46,代码来源:GroupRegistration.ascx.cs

示例14: CreateGroupForum

    /// <summary>
    /// Creates group forum.
    /// </summary>
    /// <param name="group">Particular group info object</param>
    private void CreateGroupForum(GroupInfo group)
    {
        #region "Create forum group"

        // Get forum group code name
        string forumGroupCodeName = "Forums_group_" + group.GroupGUID;

        // Check if forum group with given name already exists
        if (ForumGroupInfoProvider.GetForumGroupInfo(forumGroupCodeName, SiteContext.CurrentSiteID) != null)
        {
            return;
        }

        // Create forum base URL
        string baseUrl = null;
        TreeNode groupDocument = TreeProvider.SelectSingleNode(group.GroupNodeGUID, DocumentContext.CurrentDocumentCulture.CultureCode, SiteContext.CurrentSiteName);
        if (groupDocument != null)
        {
            baseUrl = DocumentURLProvider.GetUrl(groupDocument.NodeAliasPath + "/" + FORUM_DOCUMENT_ALIAS);
        }

        ForumGroupInfo forumGroupObj = new ForumGroupInfo();
        const string suffix = " forums";
        forumGroupObj.GroupDisplayName = TextHelper.LimitLength(group.GroupDisplayName, 200 - suffix.Length, string.Empty) + suffix;
        forumGroupObj.GroupName = forumGroupCodeName;
        forumGroupObj.GroupOrder = 0;
        forumGroupObj.GroupEnableQuote = true;
        forumGroupObj.GroupGroupID = group.GroupID;
        forumGroupObj.GroupSiteID = SiteContext.CurrentSiteID;
        forumGroupObj.GroupBaseUrl = baseUrl;

        // Additional settings
        forumGroupObj.GroupEnableCodeSnippet = true;
        forumGroupObj.GroupEnableFontBold = true;
        forumGroupObj.GroupEnableFontColor = true;
        forumGroupObj.GroupEnableFontItalics = true;
        forumGroupObj.GroupEnableFontStrike = true;
        forumGroupObj.GroupEnableFontUnderline = true;
        forumGroupObj.GroupEnableQuote = true;
        forumGroupObj.GroupEnableURL = true;
        forumGroupObj.GroupEnableImage = true;

        // Set forum group info
        ForumGroupInfoProvider.SetForumGroupInfo(forumGroupObj);

        #endregion

        #region "Create forum"

        string codeName = "General_discussion_group_" + group.GroupGUID;

        // Check if forum with given name already exists
        if (ForumInfoProvider.GetForumInfo(codeName, SiteContext.CurrentSiteID, group.GroupID) != null)
        {
            return;
        }

        // Create new forum object
        ForumInfo forumObj = new ForumInfo();
        forumObj.ForumSiteID = SiteContext.CurrentSiteID;
        forumObj.ForumIsLocked = false;
        forumObj.ForumOpen = true;
        forumObj.ForumDisplayEmails = false;
        forumObj.ForumRequireEmail = false;
        forumObj.ForumDisplayName = "General discussion";
        forumObj.ForumName = codeName;
        forumObj.ForumGroupID = forumGroupObj.GroupID;
        forumObj.ForumModerated = false;
        forumObj.ForumAccess = 40000;
        forumObj.ForumPosts = 0;
        forumObj.ForumThreads = 0;
        forumObj.ForumPostsAbsolute = 0;
        forumObj.ForumThreadsAbsolute = 0;
        forumObj.ForumOrder = 0;
        forumObj.ForumUseCAPTCHA = false;
        forumObj.SetValue("ForumHTMLEditor", null);

        // Set security
        forumObj.AllowAccess = SecurityAccessEnum.GroupMembers;
        forumObj.AllowAttachFiles = SecurityAccessEnum.GroupMembers;
        forumObj.AllowMarkAsAnswer = SecurityAccessEnum.GroupMembers;
        forumObj.AllowPost = SecurityAccessEnum.GroupMembers;
        forumObj.AllowReply = SecurityAccessEnum.GroupMembers;
        forumObj.AllowSubscribe = SecurityAccessEnum.GroupMembers;

        if (ForumInfoProvider.LicenseVersionCheck(RequestContext.CurrentDomain, FeatureEnum.Forums, ObjectActionEnum.Insert))
        {
            ForumInfoProvider.SetForumInfo(forumObj);
        }

        #endregion
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:96,代码来源:GroupRegistration.ascx.cs

示例15: CreateGroupContentSearchIndex

    /// <summary>
    /// Creates content search index.
    /// </summary>
    /// <param name="group">Particular group info object</param>
    private void CreateGroupContentSearchIndex(GroupInfo group)
    {
        string codeName = "default_group_" + group.GroupGUID;

        SearchIndexInfo sii = SearchIndexInfoProvider.GetSearchIndexInfo(codeName);
        if (sii == null)
        {
            // Create search index info
            sii = new SearchIndexInfo();
            sii.IndexName = codeName;
            const string suffix = " - Default";
            sii.IndexDisplayName = TextHelper.LimitLength(group.GroupDisplayName, 200 - suffix.Length, string.Empty) + suffix;
            sii.IndexAnalyzerType = SearchAnalyzerTypeEnum.StandardAnalyzer;
            sii.IndexType = TreeNode.OBJECT_TYPE;
            sii.IndexIsCommunityGroup = false;

            // Create search index settings info
            SearchIndexSettingsInfo sisi = new SearchIndexSettingsInfo();
            sisi.ID = Guid.NewGuid();
            sisi.Path = mGroupTemplateTargetAliasPath + "/" + group.GroupName + "/%";
            sisi.SiteName = SiteContext.CurrentSiteName;
            sisi.Type = SearchIndexSettingsInfo.TYPE_ALLOWED;
            sisi.ClassNames = "";

            // Create settings item
            SearchIndexSettings sis = new SearchIndexSettings();

            // Update settings item
            sis.SetSearchIndexSettingsInfo(sisi);

            // Update xml value
            sii.IndexSettings = sis;
            SearchIndexInfoProvider.SetSearchIndexInfo(sii);

            // Assign to current website and current culture
            SearchIndexSiteInfoProvider.AddSearchIndexToSite(sii.IndexID, SiteContext.CurrentSiteID);
            CultureInfo ci = DocumentContext.CurrentDocumentCulture;
            if (ci != null)
            {
                SearchIndexCultureInfoProvider.AddSearchIndexCulture(sii.IndexID, ci.CultureID);
            }

            // Register rebuild index action
            SearchTaskInfoProvider.CreateTask(SearchTaskTypeEnum.Rebuild, null, null, sii.IndexName, sii.IndexID);
        }
    }
开发者ID:dlnuckolls,项目名称:pfh-paypalintegration,代码行数:50,代码来源:GroupRegistration.ascx.cs


注:本文中的GroupInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。