本文整理汇总了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();
}
}
示例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();
}
示例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();
}
示例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);
}