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


C# DataManager.GetGroups方法代码示例

本文整理汇总了C#中DataManager.GetGroups方法的典型用法代码示例。如果您正苦于以下问题:C# DataManager.GetGroups方法的具体用法?C# DataManager.GetGroups怎么用?C# DataManager.GetGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataManager的用法示例。


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

示例1: RepSelected_ItemCommand

        protected void RepSelected_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            // roles
            if (this.radTabStrip.SelectedIndex == 0) // roles
            {
                this.SelectedRoles.Rows[e.Item.ItemIndex].Delete();

                this.RepSelected.DataSource = this.SelectedRoles;
                this.RepSelected.DataBind();

                // bind to user repeater control
                this.repRoles.DataSource = Telerik.Security.UserManager.Default.GetAllRoles();
                this.repRoles.DataBind();
            }
            // groups
            else
            {
                this.SelectedGroups.Rows[e.Item.ItemIndex].Delete();

                this.RepSelected.DataSource = this.SelectedGroups;
                this.RepSelected.DataBind();

                DataManager manager = new DataManager();
                // bind to user repeater control
                this.RepGroups.DataSource = manager.GetGroups(string.Empty);
                this.RepGroups.DataBind();
            }
        }
开发者ID:quicksolutions,项目名称:Pets-without-Parents,代码行数:28,代码来源:ChangeRecepients.aspx.cs

示例2: RepGroups_ItemCommand

        protected void RepGroups_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            DataRow row = SelectedGroups.NewRow();
            row["Name"] = ((Label)RepGroups.Items[e.Item.ItemIndex].FindControl("ltrlGroupNM")).Text;
            row["Id"] = ((HiddenField)RepGroups.Items[e.Item.ItemIndex].FindControl("hfGroupId")).Value;
            this.SelectedGroups.Rows.Add(row);

            ((LinkButton)this.RepGroups.Items[e.Item.ItemIndex].FindControl("selectbtn")).Enabled = false;

            this.RepSelected.DataSource = this.SelectedGroups;
            this.RepSelected.DataBind();

            manager = new DataManager();
            this.RepGroups.DataSource = manager.GetGroups(string.Empty);
            this.RepGroups.DataBind();
        }
开发者ID:quicksolutions,项目名称:Pets-without-Parents,代码行数:16,代码来源:ChangeRecepients.aspx.cs

示例3: RepSelectedGroups_ItemCommand

        protected void RepSelectedGroups_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            this.SelectedGroups.Rows[e.Item.ItemIndex].Delete();

            this.RepSelected.DataSource = this.SelectedGroups;
            this.RepSelected.DataBind();

            DataManager manager = new DataManager();
            // bind to user repeater control
            this.RepGroups.DataSource = manager.GetGroups(string.Empty);
            this.RepGroups.DataBind();

            this.RepSelected.DataSource = this.SelectedGroups;
            this.RepSelected.DataBind();
        }
开发者ID:quicksolutions,项目名称:Pets-without-Parents,代码行数:15,代码来源:ChangeRecepients.aspx.cs

示例4: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                this.TemplateId = new Guid(HttpContext.Current.Request.QueryString["TemplateId"]);
                this.EventId = new Guid(HttpContext.Current.Request.QueryString["EventId"]);
                this.ModuleId = new Guid(HttpContext.Current.Request.QueryString["ModuleId"]);
                this.manager = new DataManager();

                this.SelectedRoles.Clear();
                this.SelectedGroups.Clear();
                foreach (IRecipientRole cuurentRole in manager.GetRecipientRolesRelatedToEvent(ModuleId, EventId, TemplateId))
                {
                    DataRow row = SelectedRoles.NewRow();
                    row["Name"] = cuurentRole.RoleName;
                    row["Id"] = row["Name"];
                    this.SelectedRoles.Rows.Add(row);
                }
                foreach (IRecipientGroup cuurentGroup in manager.GetRecipientGroupsRelatedToEvent(ModuleId, EventId, TemplateId))
                {
                    DataRow row = this.SelectedGroups.NewRow();
                    row["Name"] = cuurentGroup.Group.GroupName;
                    row["Id"] = cuurentGroup.Group.GroupId;
                    this.SelectedGroups.Rows.Add(row);
                }
                this.RepSelected.DataSource = this.SelectedRoles;
                this.RepSelected.DataBind();
            }

            // bind to user repeater control
            this.repRoles.DataSource = Telerik.Security.UserManager.Default.GetAllRoles();
            this.repRoles.DataBind();

            manager = new DataManager();
            this.RepGroups.DataSource = manager.GetGroups(string.Empty);
            this.RepGroups.DataBind();

            this.radTabStrip.TabClick += new Telerik.Web.UI.RadTabStripEventHandler(radTabStrip_TabClick);
        }
开发者ID:quicksolutions,项目名称:Pets-without-Parents,代码行数:40,代码来源:ChangeRecepients.aspx.cs


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