/// <summary> /// Asynchronous export item's properties /// </summary> /// <returns>An <see cref="ExportableCI"/> instance containing all relevant properties</returns> public Task <ExportableRoundCI> ExportAsync() { return(Task.FromResult(new ExportableRoundCI { Names = new Dictionary <CultureInfo, string>(_names), Type = Type, GroupId = GroupId?.ToString(), Group = Group, OtherMatchId = OtherMatchId, Number = Number, BetradarId = BetradarId, PhaseOrGroupLongName = new Dictionary <CultureInfo, string>(_phaseOrGroupLongName ?? new Dictionary <CultureInfo, string>()), Phase = Phase, CupRoundMatchNumber = CupRoundMatchNumber, CupRoundMatches = CupRoundMatches })); }
private void Cancel_Click(object sender, EventArgs e) { Response.Redirect(ModuleContext.NavigateUrl(TabId, "", false, new String[] { "groupid=" + GroupId.ToString() })); }
protected void Page_Load(object sender, EventArgs e) { JavaScript.RequestRegistration(CommonJs.DnnPlugins); imgGroup.Src = Page.ResolveUrl("~/DesktopModules/SocialGroups/Images/") + "sample-group-profile.jpg"; if (!Page.IsPostBack && GroupId > 0) { var roleInfo = RoleController.Instance.GetRoleById(PortalId, GroupId); if (roleInfo != null) { if (!UserInfo.IsInRole(PortalSettings.AdministratorRoleName)) { if (roleInfo.CreatedByUserID != UserInfo.UserID) { Response.Redirect(ModuleContext.NavigateUrl(TabId, "", false, new String[] { "groupid=" + GroupId.ToString() })); } } txtGroupName.Visible = !roleInfo.IsSystemRole; reqGroupName.Enabled = !roleInfo.IsSystemRole; if (!roleInfo.IsSystemRole) { txtGroupName.Text = roleInfo.RoleName; } else { litGroupName.Text = roleInfo.RoleName; } txtDescription.Text = roleInfo.Description; rdAccessTypePrivate.Checked = !roleInfo.IsPublic; rdAccessTypePublic.Checked = roleInfo.IsPublic; if (roleInfo.Settings.ContainsKey("ReviewMembers")) { chkMemberApproved.Checked = Convert.ToBoolean(roleInfo.Settings["ReviewMembers"].ToString()); } imgGroup.Src = roleInfo.PhotoURL; } else { Response.Redirect(ModuleContext.NavigateUrl(TabId, "", false)); } } }
private void SCAOnlineDisplayGroup_PreRender(object sender, EventArgs e) { if (ShowPartOf) { if (Null.IsNull(ParentGroupId)) { Label parentGroupLabel = new Label(); parentGroupLabel.Text = ParentGroupName; divPartOf.Controls.Add(parentGroupLabel); } else { HyperLink parentGroupLink = new HyperLink(); parentGroupLink.Text = ParentGroupName; parentGroupLink.NavigateUrl = Globals.NavigateURL(MyModule.TabId, string.Empty, "gid=" + ParentGroupId.ToString()); divPartOf.Controls.Add(parentGroupLink); } } else { divPartOf.Visible = false; } if (ShowAwardsList) { hlAwardList.NavigateUrl = Globals.NavigateURL(MyModule.TabId, "", "list=charters", "f=" + GroupId.ToString()); trAwardsHeader.Visible = true; } if (ShowCrownsList) { hlCrownList.NavigateUrl = Globals.NavigateURL(MyModule.TabId, "", "list=crown", "f=" + GroupId.ToString()); trCrownsHeader.Visible = true; } }
public string GetEditUrl() { return(ModuleContext.EditUrl("GroupId", GroupId.ToString("D"), "Edit")); }
public bool BakeGeometry(RhinoDoc doc, ObjectAttributes baking_attributes, out Guid obj_guid) { if (Value != null) { var att = baking_attributes.Duplicate(); // set user strings att.SetUserString("SOF_OBJ_TYPE", "SLN"); att.SetUserString("SOF_ID", Math.Max(0, Id).ToString()); if (GroupId > 0) { att.SetUserString("SOF_GRP", GroupId.ToString()); } if (SectionIdStart > 0) { att.SetUserString("SOF_STYP", ElementType); att.SetUserString("SOF_STYP2", "E"); att.SetUserString("SOF_SNO", SectionIdStart.ToString()); if (SectionIdEnd > 0) { att.SetUserString("SOF_SNOE", SectionIdEnd.ToString()); } else { att.SetUserString("SOF_SNOE", "SOF_PROP_COMBO_NONE"); } } if (ElementSize != 0.0) { att.SetUserString("SOF_SDIV", ElementSize.ToString()); } if (DirectionLocalZ.Length > 1.0E-6) { var dir_z = DirectionLocalZ; dir_z.Unitize(); att.SetUserString("SOF_DRX", dir_z.X.ToString("F6")); att.SetUserString("SOF_DRY", dir_z.Y.ToString("F6")); att.SetUserString("SOF_DRZ", dir_z.Z.ToString("F6")); } if (string.IsNullOrWhiteSpace(fixLiteral) == false) { string fix_literal = FixLiteral.Replace("PP", "PXPYPZ").Replace("MM", "MXMYMZ"); if (fix_literal == "F") { fix_literal = "PXPYPZMXMYMZ"; } att.SetUserString("SOF_FIX", fix_literal); } if (string.IsNullOrWhiteSpace(UserText) == false) { att.SetUserString("SOF_USERTXT", UserText); } obj_guid = doc.Objects.AddCurve(Value, att); } else { obj_guid = new Guid(); } return(true); }
public override string ToString() { return(GroupId.ToString() + '.' + Name); }
protected string GetHtml(object dataItem) { var tab = (TabInfo)dataItem; string returnValue = string.Empty; if ((_groupTabID > -1 && _groupTabID != tab.ParentId)) { _groupTabID = -1; if ((!tab.DisableLink)) { returnValue = "<br style=\"clear:both;\" /><br />"; } } if ((tab.DisableLink)) { const string headerHtml = "<br style=\"clear:both;\" /><br /><h1><span class=\"TitleHead\">{0}</span></h1><br style=\"clear:both\" />"; returnValue += string.Format(headerHtml, DataBinder.Eval(dataItem, "TabName")); _groupTabID = int.Parse(DataBinder.Eval(dataItem, "TabID").ToString()); } else { var sb = new StringBuilder(); if (tab.TabID == PortalSettings.ActiveTab.TabID) { sb.Append("<div class=\"active console-none \">"); } else { sb.Append("<div class=\"console-none \">"); } sb.Append("<a href=\"{0}\">"); if (DefaultSize != "IconNone" || (AllowSizeChange || AllowViewChange)) { sb.Append("<img src=\"{1}\" alt=\"{3}\" width=\"16px\" height=\"16px\"/>"); sb.Append("<img src=\"{2}\" alt=\"{3}\" width=\"32px\" height=\"32px\"/>"); } sb.Append("</a>"); sb.Append("<h3>{3}</h3>"); sb.Append("<div>{4}</div>"); sb.Append("</div>"); //const string contentHtml = "<div>" + "<a href=\"{0}\"><img src=\"{1}\" alt=\"{3}\" width=\"16px\" height=\"16px\"/><img src=\"{2}\" alt=\"{3}\" width=\"32px\" height=\"32px\"/></a>" + "<h3>{3}</h3>" + "<div>{4}</div>" + "</div>"; var tabUrl = Globals.NavigateURL(tab.TabID); if (ProfileUserId > -1) { tabUrl = Globals.NavigateURL(tab.TabID, "", "UserId=" + ProfileUserId.ToString(CultureInfo.InvariantCulture)); } if (GroupId > -1) { tabUrl = Globals.NavigateURL(tab.TabID, "", "GroupId=" + GroupId.ToString(CultureInfo.InvariantCulture)); } returnValue += string.Format(sb.ToString(), tabUrl, GetIconUrl(dataItem, "IconFile"), GetIconUrl(dataItem, "IconFileLarge"), tab.LocalizedTabName, tab.Description); } return(returnValue); }
public List <Claim> GetAllClaims() { return(Claims.Select(c => new Claim(GroupId.ToString(), c)).ToList()); }
public bool BakeGeometry(RhinoDoc doc, ObjectAttributes baking_attributes, out Guid obj_guid) { if (Value != null) { var att = baking_attributes.Duplicate(); att.SetUserString("SOF_OBJ_TYPE", "SAR"); att.SetUserString("SOF_ID", Math.Max(0, Id).ToString()); if (GroupId > 0) { att.SetUserString("SOF_GRP", GroupId.ToString()); } if (MaterialId > 0) { att.SetUserString("SOF_MNO", MaterialId.ToString()); } if (ReinforcementId > 0) { att.SetUserString("SOF_MRF", ReinforcementId.ToString()); } att.SetUserString("SOF_T", Thickness.ToString()); att.SetUserString("SOF_QREF", Alignment); if (MeshOptions == "AUTO") { att.SetUserString("SOF_MCTL", "0"); } else if (MeshOptions == "REGM") { att.SetUserString("SOF_MCTL", "1"); } else if (MeshOptions == "SNGQ") { att.SetUserString("SOF_MCTL", "2"); } else if (MeshOptions == "OFF") { att.SetUserString("SOF_MCTL", "-1"); } if (ElementSize != 0.0) { att.SetUserString("SOF_HMIN", ElementSize.ToString()); } if (DirectionLocalX.Length > 1.0e-6) { var dir_x = DirectionLocalX; dir_x.Unitize(); att.SetUserString("SOF_DRX", dir_x.X.ToString("F6")); att.SetUserString("SOF_DRY", dir_x.Y.ToString("F6")); att.SetUserString("SOF_DRZ", dir_x.Z.ToString("F6")); } if (string.IsNullOrWhiteSpace(UserText) == false) { att.SetUserString("SOF_USERTXT", UserText); } obj_guid = doc.Objects.AddBrep(Value, att); } else { obj_guid = new Guid(); } return(true); }
private void Save_Click(object sender, EventArgs e) { if (GroupId > 0) { Security.PortalSecurity ps = Security.PortalSecurity.Instance; txtGroupName.Text = ps.InputFilter(txtGroupName.Text, Security.PortalSecurity.FilterFlag.NoScripting); txtGroupName.Text = ps.InputFilter(txtGroupName.Text, Security.PortalSecurity.FilterFlag.NoMarkup); txtDescription.Text = ps.InputFilter(txtDescription.Text, Security.PortalSecurity.FilterFlag.NoScripting); txtDescription.Text = ps.InputFilter(txtDescription.Text, Security.PortalSecurity.FilterFlag.NoMarkup); var roleInfo = RoleController.Instance.GetRoleById(PortalId, GroupId); if (roleInfo != null) { if (txtGroupName.Visible) //if this is visible assume that we're editing the groupname { if (txtGroupName.Text != roleInfo.RoleName) { if (RoleController.Instance.GetRoleByName(PortalId, txtGroupName.Text) != null) { lblInvalidGroupName.Visible = true; return; } } } if (!roleInfo.IsSystemRole) { roleInfo.RoleName = txtGroupName.Text; } roleInfo.Description = txtDescription.Text; roleInfo.IsPublic = rdAccessTypePublic.Checked; if (roleInfo.Settings.ContainsKey("ReviewMembers")) { roleInfo.Settings["ReviewMembers"] = chkMemberApproved.Checked.ToString(); } else { roleInfo.Settings.Add("ReviewMembers", chkMemberApproved.Checked.ToString()); } RoleController.Instance.UpdateRoleSettings(roleInfo, true); RoleController.Instance.UpdateRole(roleInfo); if (inpFile.PostedFile.ContentLength > 0) { IFileManager _fileManager = FileManager.Instance; IFolderManager _folderManager = FolderManager.Instance; var rootFolderPath = PathUtils.Instance.FormatFolderPath(PortalSettings.HomeDirectory); IFolderInfo groupFolder = _folderManager.GetFolder(PortalSettings.PortalId, "Groups/" + roleInfo.RoleID); if (groupFolder == null) { groupFolder = _folderManager.AddFolder(PortalSettings.PortalId, "Groups/" + roleInfo.RoleID); } if (groupFolder != null) { var fileName = Path.GetFileName(inpFile.PostedFile.FileName); var fileInfo = _fileManager.AddFile(groupFolder, fileName, inpFile.PostedFile.InputStream, true); roleInfo.IconFile = "FileID=" + fileInfo.FileId; RoleController.Instance.UpdateRole(roleInfo); } } //Clear Roles Cache DataCache.RemoveCache("GetRoles"); } Response.Redirect(_navigationManager.NavigateURL(TabId, "", new String[] { "groupid=" + GroupId.ToString() })); } }
protected void Page_Load(object sender, EventArgs e) { m_IsModernTheme = (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern); m_UserContext = UserContext.Current; this.LoadResources(); if (!this.IsPostBack) { this.EnsureActiveInstance(); } this.List_DataBind(); if (!string.IsNullOrEmpty(this.ReturnUrl)) { CancelLink.NavigateUrl = this.ReturnUrl; } DetailMenu1.ShowDescriptionAsToolTip = true; if (this.DisplayedSettingLevel != SettingLevels.Group) { if (this.MasterPage != null) { if (this.ActionId != Guid.Empty) { this.MasterPage.CustomName = this.Action.CustomName; } Micajah.Common.Bll.Action action = this.MasterPage.ActiveAction; while ((action != null) && (action.ActionId != ActionProvider.ConfigurationPageActionId)) { action = action.ParentAction; if (action != null) { if (!action.GroupInDetailMenu) { break; } } } if (string.IsNullOrEmpty(this.ReturnUrl)) { if (action != null) { CancelLink.NavigateUrl = action.CustomAbsoluteNavigateUrl; } } } if (this.Action == null) { DetailMenu1.Visible = false; } else { DetailMenu1.ParentActionId = m_Action.ActionId; } } else { if (string.IsNullOrEmpty(this.ReturnUrl)) { CancelLink.NavigateUrl = string.Concat(CustomUrlProvider.CreateApplicationAbsoluteUrl(ResourceProvider.GroupsInstancesRolesPageVirtualPath), "?GroupId=", GroupId.ToString("N")); } DetailMenu1.Visible = false; if (this.DiagnoseConflictingSettings) { CommandBar.Visible = false; } } if (m_IsModernTheme) { CancelLink.Visible = false; } else { AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator); } }
bool PopulateHeader() { if (GroupId > 0) { AWAPI_Data.Data.awContestGroup group = _contestLib.GetContestGroup(GroupId); if (group == null) { return(false); } lblTitle.Text = "Contest Group Entries - " + group.title; _hplExportExcel.NavigateUrl = "~/admin/reports/handlers/excel.ashx?report=" + AWAPI.admin.reports.handlers.excel.Reports.ContestGroupEntries + "&groupid=" + GroupId.ToString(); } else { AWAPI_Data.CustomEntities.ContestExtended contest = _contestLib.GetContest(ContestId, false); if (contest == null) { return(false); } lblTitle.Text = "Contest Entries - " + contest.title; _hplExportExcel.NavigateUrl = "~/admin/reports/handlers/excel.ashx?report=" + AWAPI.admin.reports.handlers.excel.Reports.ContestEntries + "&contestid=" + ContestId.ToString(); } return(true); }
public bool BuildDialString() { if (string.IsNullOrEmpty(DialPrefix)) { return(false); } if (ActionType == PA_ACTION_TYPE.PA_ACT_NONE) { return(false); } if (Sections == null) { return(false); } string dialstring = DialPrefix; switch (ActionType) { case PA_ACTION_TYPE.PA_ACT_MANUAL: dialstring += "11"; break; case PA_ACTION_TYPE.PA_ACT_MUSIC: dialstring += "2"; break; case PA_ACTION_TYPE.PA_ACT_AUTO: dialstring += "3"; break; case PA_ACTION_TYPE.PA_ACT_EAVESDROP: dialstring += "4"; break; default: return(false); } dialstring += LoopCount.ToString(); dialstring += GroupId.ToString(); string section = null, zones = null; BuildSectionString(ref section, ref zones); if (section == null || zones == null) { return(false); } SectionsId = section; Zones = zones; dialstring += section; dialstring += zones; DialString = dialstring; return(true); }