/// <summary> /// Initializes the label with specified user text. /// </summary> private void SetUserLabel(Label label, string columnName) { // Get the user ID int userId = ValidationHelper.GetInteger(Node.GetValue(columnName), 0); if (userId > 0) { // Get the user object UserInfo ui = null; string key = "user_" + userId; object userObject = RequestStockHelper.GetItem(key); if (userObject != null) { ui = (UserInfo)userObject; } else { // Get user object from database ui = UserInfoProvider.GetUserInfo(userId); RequestStockHelper.Add(key, ui); } if (ui != null) { label.Text = HTMLHelper.HTMLEncode(ui.FullName); } } else { label.Text = GetString("general.selectnone"); } }
private string GetUserName(int userId) { string userName = null; if (userId != 0) { string key = "UserInfo_" + userId; // Get user name from request cache userName = RequestStockHelper.GetItem(key) as string; if (userName == null) { // Get user information DataSet users = UserInfoProvider.GetUsers("UserID=" + userId, null, 1, "UserName, FullName"); if (!DataHelper.DataSourceIsEmpty(users)) { DataRow dr = users.Tables[0].Rows[0]; string usrName = ValidationHelper.GetString(DataHelper.GetDataRowValue(dr, "UserName"), null); string usrFullName = ValidationHelper.GetString(DataHelper.GetDataRowValue(dr, "FullName"), null); userName = Functions.GetFormattedUserName(usrName, usrFullName, IsLiveSite); // Store to request cache RequestStockHelper.Add(key, userName); } } } return(userName); }
/// <summary> /// Returns column value for current search result item. /// </summary> /// <param name="columnName">Column</param> public object GetSearchValue(string columnName) { // Get id of the current row string id = ValidationHelper.GetString(Eval("id"), String.Empty); // Get Datarows for current results Hashtable resultRows = RequestStockHelper.GetItem(SearchHelper.RESULTS_KEY) as Hashtable; // Check whether id and datarow collection exists if ((id != String.Empty) && (resultRows != null)) { // Get current datarow DataRow dr = resultRows[id] as DataRow; // Check whether datarow exists and contains required column if ((dr != null) && (dr.Table.Columns.Contains(columnName))) { // Return column value return(dr[columnName]); } } // Return nothing by default return(null); }
void Login1_LoginError(object sender, EventArgs e) { // Check if custom failure text is not set if (string.IsNullOrEmpty(FailureText)) { LocalizedLabel failureLit = Login1.FindControl("FailureText") as LocalizedLabel; if (failureLit != null) { // Display account lock information if (AuthenticationHelper.DisplayAccountLockInformation(CMSContext.CurrentSiteName)) { // Check if account locked due to reaching maximum invalid logon attempts string link = "<a href=\"#\" onclick=\"" + Page.ClientScript.GetCallbackEventReference(this, "null", "UpdateLabel_" + ClientID, "'" + failureLit.ClientID + "'") + ";\">" + GetString("general.clickhere") + "</a>"; if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedInvalidLogonAttempts"), false)) { failureLit.Text = string.Format(GetString("invalidlogonattempts.unlockaccount.accountlocked") + GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedPasswordExpired"), false)) { failureLit.Text = string.Format(GetString("passwordexpiration.accountlocked") + GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } } } } }
/// <summary> /// Returns user full name. /// </summary> /// <param name="userId">User id</param> public static string GetUserFullName(object userId) { int id = ValidationHelper.GetInteger(userId, 0); if (id > 0) { string key = "TransfUserFullName_" + id; // Most of the post will be from the same user, store fullname to the request to minimize the DB access if (RequestStockHelper.Contains(key)) { return(ValidationHelper.GetString(RequestStockHelper.GetItem(key), "")); } else { DataSet ds = CMS.Membership.UserInfoProvider.GetUsers(); //DataSet ds = UserInfoProvider.GetUsers("UserID = " + id, null, 1, "FullName"); if (!DataHelper.DataSourceIsEmpty(ds)) { string result = HTMLHelper.HTMLEncode(ValidationHelper.GetString(ds.Tables[0].Rows[0]["FullName"], "")); RequestStockHelper.Add(key, result); return(result); } } } return(""); }
private static void TrackReferral(string siteName) { string referrerURL = (RequestStockHelper.GetItem("AnalyticsReferrerString") as string); if (!string.IsNullOrEmpty(referrerURL)) { Uri referrer = new Uri(referrerURL); if ((referrer != null) && (CMSContext.ViewMode == ViewModeEnum.LiveSite)) { if (!referrer.AbsoluteUri.StartsWithCSafe("/") && !referrer.IsLoopback && (referrer.Host.ToLowerCSafe() != URLHelper.Url.Host)) { // Check other site domains SiteInfo rsi = SiteInfoProvider.GetRunningSiteInfo(referrer.Host, URLHelper.ApplicationPath); if ((rsi == null) || (rsi.SiteName != siteName)) { string path = URLHelper.RemoveQuery(referrer.AbsoluteUri); // Save the referrer value CMSContext.CurrentUser.URLReferrer = path; // Log referral string ip = HTTPHelper.UserHostAddress; HitLogProvider.LogHit(HitLogProvider.URL_REFERRALS, siteName, null, path, 0); } } } } }
/// <summary> /// Adds action. /// </summary> /// <param name="action">Action</param> public override void AddAction(HeaderAction action) { if (action == null) { return; } // Make sure the Save action is set only once string key = string.Format("HeaderActionsSaveSet_{0}_{1}", action.CommandArgument, ClientID); bool saveSet = ValidationHelper.GetBoolean(RequestStockHelper.GetItem(key), false); if (!(action is SaveAction) || !saveSet) { bool added = false; // Ensure correct index if (action.Index == -1) { action.Index = ActionsList.Count; } else { // Post processing of action attribute for (int i = 0; i < ActionsList.Count; i++) { if (ActionsList[i].Index == action.Index) { // Replace action with the same index ActionsList[i] = action; // Button added added = true; break; } } } // If action with the same index was not found, add it to the list if (!added) { ActionsList.Add(action); } // Keep flag if (action is SaveAction) { RequestStockHelper.Add(key, (action.BaseButton == null) || action.BaseButton.Visible); } } // Store base buttons if ((action.BaseButton != null) && !ProcessedBaseButtons.Contains(action.BaseButton)) { ProcessedBaseButtons.Add(action.BaseButton); } }
/// <summary> /// Returns groupguid for community group specified as an URL parameter of the current request. /// </summary> private static Guid GetCurrentGroupGuid() { // Try to get the group info from the request items collection BaseInfo gi = (BaseInfo)RequestStockHelper.GetItem("CurrentGroup", true); if (gi == null) { // Try to get group by its GroupID first int groupId = QueryHelper.GetInteger("groupid", 0); if (groupId > 0) { gi = ModuleCommands.CommunityGetGroupInfo(groupId); } // If group was not found by its GroupID if (gi == null) { // Try to get group by its GroupName string groupName = QueryHelper.GetString("groupname", ""); if (groupName != "") { gi = ModuleCommands.CommunityGetGroupInfoByName(groupName, CMSContext.CurrentSiteName); } } if (gi == null) { // Try to get group by its GroupName Guid groupGuid = QueryHelper.GetGuid("groupguid", Guid.Empty); if (groupGuid != Guid.Empty) { return(groupGuid); } } // If group was not found if ((gi == null) && (CMSContext.CurrentPageInfo != null)) { // Try to get group from current document groupId = CMSContext.CurrentPageInfo.NodeGroupID; if (groupId > 0) { gi = ModuleCommands.CommunityGetGroupInfo(groupId); } } // Save the group to the request items if new group was loaded from DB RequestStockHelper.Add("CurrentGroup", gi, true); } return(gi.Generalized.ObjectGUID); }
/// <summary> /// Returns true, if more than one currency is used and enabled, otherwise false. /// </summary> private bool MoreThanOneCurrencyUsed() { bool?moreUsed = RequestStockHelper.GetItem("MoreThanOneCurrencyUsed") as bool?; if (!moreUsed.HasValue) { InfoDataSet <CurrencyInfo> dataSet = CurrencyInfoProvider.GetCurrencies("CurrencyEnabled = 1", null, 2, "CurrencyID", CMSContext.CurrentSiteID); moreUsed = dataSet.Items.Count > 1; RequestStockHelper.Add("MoreThanOneCurrencyUsed", moreUsed); } return(moreUsed.Value); }
/// <summary> /// Gets GUID from hidden field .. if not there create new one. /// </summary> private String CurrentGuid() { // For reloaddata (f.e. webpart save) store guid also in request helper, because hidden is empty after control is reloaded. Guid guid = ValidationHelper.GetGuid(RequestStockHelper.GetItem("wppreportselector"), Guid.Empty); if (hdnGuid.Value == String.Empty) { hdnGuid.Value = (guid == Guid.Empty) ? Guid.NewGuid().ToString() : guid.ToString(); } if (guid == Guid.Empty) { RequestStockHelper.Add("wppreportselector", hdnGuid.Value); } return(hdnGuid.Value); }
/// <summary> /// Hide all forum viewers except the sender. /// </summary> /// <param name="sender">Forum instance which requires single display</param> private static void DisplayOnlyMe(Control sender) { var viewers = RequestStockHelper.GetItem("ForumViewerCollection") as List <ForumViewer>; if ((viewers != null) && (viewers.Count > 0)) { var senderType = sender as ForumViewer; foreach (var forumViewer in viewers) { if ((forumViewer != null) && (forumViewer != senderType)) { forumViewer.StopProcessing = true; forumViewer.Visible = false; } } } }
/// <summary> /// Loads inner IFrame content. /// </summary> private void LoadIFrame() { // Set iframe attributes if ((ControlGroup == null) || !ValidationHelper.GetBoolean(RequestStockHelper.GetItem(DIRECT_FILE_UPLOADER_STORAGE_KEY, ControlKey, true), false)) { uploaderFrame.Attributes.Add("src", ResolveUrl(IFrameUrl)); if (ControlGroup != null) { uploaderFrame.Attributes.Add("onload", String.Format("(function tryLoadDFU_{0}() {{ if (window.DFULoadIframes_{0}) {{ window.DFULoadIframes_{0}(); }} else {{ setTimeout(tryLoadDFU_{0}, 200); }} }})();", ControlKey)); } else { if (RequestHelper.IsCallback() && BrowserHelper.IsIE()) { uploaderFrame.Attributes.Add("allowTransparency", "true"); } else { string script = String.Format("var frameElem = document.getElementById('{0}'); if(frameElem) {{ frameElem.setAttribute('allowTransparency','true') }}", uploaderFrame.ClientID); ScriptHelper.RegisterStartupScript(this, typeof(string), "DFUTrans_" + ClientID, ScriptHelper.GetScript(script)); } } } else { uploaderFrame.Attributes.Add("style", "display:none;vertical-align:middle;"); uploaderFrame.Attributes.Add("class", IFrameCSSClass); string script = String.Format("if(!window.DFUframes) {{ var DFUframes = new Object(); }}if(!window.DFUpanels) {{ var DFUpanels = new Object(); }}DFUframes['{0}'] = {1};", uploaderFrame.ClientID, ScriptHelper.GetString(ResolveUrl(IFrameUrl))); ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "DFUArrays_" + ClientID, ScriptHelper.GetScript(script)); if (RequestHelper.IsAsyncPostback()) { ScriptHelper.RegisterStartupScript(this, typeof(string), "DFUArrays_" + ClientID, ScriptHelper.GetScript(script)); } } uploaderFrame.Attributes.Add("title", uploaderFrame.ID); uploaderFrame.Attributes.Add("name", uploaderFrame.ClientID); // Initialize design InitDesign(); }
/// <summary> /// Login error handler. /// </summary> protected void loginElem_LoginError(object sender, EventArgs e) { // Check if custom failure text is not set if (string.IsNullOrEmpty(FailureText)) { Label failureLit = loginElem.FindControl("FailureText") as Label; if (failureLit != null) { // Display account lock information if (AuthenticationHelper.DisplayAccountLockInformation(CMSContext.CurrentSiteName)) { // Check if account locked due to reaching maximum invalid logon attempts string link = "<a href=\"#\" onclick=\"" + Page.ClientScript.GetCallbackEventReference(this, "null", "UpdateLabel_" + ClientID, "'" + failureLit.ClientID + "'") + ";\">" + GetString("general.clickhere") + "</a>"; if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedInvalidLogonAttempts"), false)) { loginElem.FailureText = GetString("invalidlogonattempts.unlockaccount.accountlocked"); if (!ErrorAsPopup) { loginElem.FailureText += string.Format(GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } } if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedPasswordExpired"), false)) { loginElem.FailureText = GetString("passwordexpiration.accountlocked"); if (!ErrorAsPopup) { loginElem.FailureText += string.Format(GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } } } } } //Display the failure message in a client-side alert box if (ErrorAsPopup) { ScriptHelper.RegisterStartupScript(this, GetType(), "LoginError", ScriptHelper.GetScript("alert(" + ScriptHelper.GetString(loginElem.FailureText) + ");")); Label error = (Label)loginElem.FindControl("FailureText"); error.Visible = false; } }
/// <summary> /// Returns group member info, reult is cached in request. /// </summary> /// <param name="userId">User ID</param> /// <param name="groupId">Group ID</param> private GroupMemberInfo GetGroupMember(int userId, int groupId) { GroupMemberInfo gmi = RequestStockHelper.GetItem("CommunityShortCuts" + userId.ToString() + "_" + groupId.ToString()) as GroupMemberInfo; if ((gmi == null) && (!RequestStockHelper.Contains("CommunityShortCuts" + userId.ToString() + "_" + groupId.ToString()))) { gmi = GroupMemberInfoProvider.GetGroupMemberInfo(userId, groupId); if (gmi != null) { RequestStockHelper.Add("CommunityShortCuts" + userId.ToString() + "_" + groupId.ToString(), gmi); } else { RequestStockHelper.Add("CommunityShortCuts" + userId.ToString() + "_" + groupId.ToString(), false); } } return(gmi); }
/// <summary> /// OnPreRender override. /// </summary> protected override void OnPreRender(EventArgs e) { if (RenderCssClasses) { formElem.SubmitButton.CssClass = "SubmitButton"; } bool preloaderRequired = ValidationHelper.GetBoolean(RequestStockHelper.GetItem("CMSGraphAutoWidth"), false); if (UseProgressIndicator && (!preloaderRequired || RequestHelper.IsPostBack())) { ScriptHelper.RegisterProgress(Page); } wasPreRender = true; if (RequestHelper.IsPostBack() && (!UseExternalReload || DisplayFilter)) { try { formElem.SaveData(null); } catch { } } if (!reportLoaded) { ReloadData(true); } // Disable CSS class for filter if filter isn't visible if ((mDisplayFilterResult == false) || (formElem == null) || (ReportInfo == null) || (ReportInfo.ReportParameters == "") || (ReportInfo.ReportParameters.ToLowerCSafe() == "<form></form>")) { formElem.CssClass = ""; } base.OnPreRender(e); }
private void Login1_LoginError(object sender, EventArgs e) { if (FailureLabel != null) { if (AuthenticationHelper.DisplayAccountLockInformation(CMSContext.CurrentSiteName)) { string link = "<a href=\"#\" onclick=\"" + Page.ClientScript.GetCallbackEventReference(this, "null", "UpdateLabel_" + ClientID, "'" + FailureLabel.ClientID + "'") + ";\">" + GetString("general.clickhere") + "</a>"; if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedInvalidLogonAttempts"), false)) { FailureLabel.Text = string.Format(GetString("invalidlogonattempts.unlockaccount.accountlocked") + GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } if (ValidationHelper.GetBoolean(RequestStockHelper.GetItem("UserAccountLockedPasswordExpired"), false)) { FailureLabel.Text = string.Format(GetString("passwordexpiration.accountlocked") + GetString("invalidlogonattempts.unlockaccount.accountlockedlink"), link); } } else { FailureLabel.Text = GetString("Login_FailureText"); } } }
/// <summary> /// OnPreRender override - set preloader area if is required. /// </summary> protected override void OnPreRender(EventArgs e) { // Hide panel by default pnlPreLoader.Style.Add("display", "none"); bool useAutoWidth = ValidationHelper.GetBoolean(RequestStockHelper.GetItem("CMSGraphAutoWidth"), false); // If is initial request, display preparing information if (!RequestHelper.IsPostBack() && useAutoWidth) { pnlPreLoader.Style.Clear(); pnlPreLoader.Style.Add("position", "absolute"); pnlPreLoader.Style.Add("top", "0"); pnlPreLoader.Style.Add("left", "0"); pnlPreLoader.Style.Add("width", "100%"); pnlPreLoader.Style.Add("height", "100%"); pnlPreLoader.Style.Add("z-index", "100000"); pnlPreLoader.Style.Add("background-color", "#ffffff"); pnlPreLoader.Style.Add("overflow", "hidden"); } base.OnPreRender(e); }
/// <summary> /// OnPreRender override. /// </summary> protected override void OnPreRender(EventArgs e) { bool preloaderRequired = ValidationHelper.GetBoolean(RequestStockHelper.GetItem("CMSGraphAutoWidth"), false); if (UseProgressIndicator && (!preloaderRequired || RequestHelper.IsPostBack())) { ScriptHelper.RegisterLoader(Page); } wasPreRender = true; if (RequestHelper.IsPostBack() && (!UseExternalReload || DisplayFilter)) { try { formParameters.SaveData(null, false); } catch (Exception) { } } if (!reportLoaded) { ReloadData(true); } // Disable CSS class for filter if filter isn't visible if ((!mDisplayFilterResult) || (ReportInfo == null) || (ReportInfo.ReportParameters == String.Empty) || ReportInfo.ReportParameters.Equals("<form></form>", StringComparison.OrdinalIgnoreCase)) { formParameters.CssClass = String.Empty; } base.OnPreRender(e); }
protected void Page_Load(object sender, EventArgs e) { // Keep current user object CurrentUserInfo currentUser = CMSContext.CurrentUser; // Title element settings titleElem.TitleImage = GetImageUrl("Objects/PM_ProjectTask/object.png"); titleElem.TitleText = GetString("pm.projecttask.edit"); #region "Header actions" if (CMSContext.CurrentUser.IsAuthenticated()) { // New task link string[,] actions = new string[1, 7]; actions[0, 0] = HeaderActions.TYPE_LINKBUTTON; actions[0, 1] = GetString("pm.projecttask.newpersonal"); actions[0, 2] = null; actions[0, 4] = null; actions[0, 5] = GetImageUrl("Objects/PM_Project/add.png"); actions[0, 6] = "new_task"; HeaderActions.Actions = actions; HeaderActions.ActionPerformed += new CommandEventHandler(actionsElem_ActionPerformed); HeaderActions.ReloadData(); } #endregion // Switch by display type and set correct list grid name switch (this.TasksDisplayType) { // Project tasks case TasksDisplayTypeEnum.ProjectTasks: ucTaskList.OrderByType = ProjectTaskOrderByEnum.NotSpecified; ucTaskList.Grid.OrderBy = "TaskPriorityOrder ASC,ProjectTaskDeadline DESC"; ucTaskList.Grid.GridName = "~/CMSModules/ProjectManagement/Controls/LiveControls/ProjectTasks.xml"; pnlListActions.Visible = false; break; // Tasks owned by me case TasksDisplayTypeEnum.TasksOwnedByMe: ucTaskList.OrderByType = ProjectTaskOrderByEnum.NotSpecified; ucTaskList.Grid.OrderBy = "TaskPriorityOrder ASC,ProjectTaskDeadline DESC"; ucTaskList.Grid.GridName = "~/CMSModules/ProjectManagement/Controls/LiveControls/TasksOwnedByMe.xml"; break; // Tasks assigned to me case TasksDisplayTypeEnum.TasksAssignedToMe: // Set not specified order by default ucTaskList.OrderByType = ProjectTaskOrderByEnum.NotSpecified; // If sitename is not defined => display task from all sites => use user order if (String.IsNullOrEmpty(this.SiteName)) { ucTaskList.OrderByType = ProjectTaskOrderByEnum.UserOrder; } ucTaskList.Grid.OrderBy = "TaskPriorityOrder ASC,ProjectTaskDeadline DESC"; ucTaskList.Grid.GridName = "~/CMSModules/ProjectManagement/Controls/LiveControls/TasksAssignedToMe.xml"; break; } #region "Force edit by TaskID in querystring" // Check whether is not postback if (!RequestHelper.IsPostBack()) { // Try get value from request stroage which indicates whether force dialog is displayed bool isDisplayed = ValidationHelper.GetBoolean(RequestStockHelper.GetItem("cmspmforceitemdisplayed", true), false); // Try get task id from querystring int forceTaskId = QueryHelper.GetInteger("taskid", 0); if ((forceTaskId > 0) && (!isDisplayed)) { ProjectTaskInfo pti = ProjectTaskInfoProvider.GetProjectTaskInfo(forceTaskId); ProjectInfo pi = ProjectInfoProvider.GetProjectInfo(pti.ProjectTaskProjectID); // Check whether task is defined // and if is assigned to some project, this project is assigned to current site if ((pti != null) && ((pi == null) || (pi.ProjectSiteID == CMSContext.CurrentSiteID))) { bool taskIdValid = false; // Switch by display type switch (this.TasksDisplayType) { // Tasks created by me case TasksDisplayTypeEnum.TasksOwnedByMe: if (pti.ProjectTaskOwnerID == currentUser.UserID) { taskIdValid = true; } break; // Tasks assigned to me case TasksDisplayTypeEnum.TasksAssignedToMe: if (pti.ProjectTaskAssignedToUserID == currentUser.UserID) { taskIdValid = true; } break; // Project task case TasksDisplayTypeEnum.ProjectTasks: if (!String.IsNullOrEmpty(ProjectNames) && (pi != null)) { string projectNames = ";" + ProjectNames.ToLower() + ";"; if (projectNames.Contains(";" + pi.ProjectName.ToLower() + ";")) { // Check whether user can see private task if (!pti.ProjectTaskIsPrivate || ((pti.ProjectTaskOwnerID == currentUser.UserID) || (pti.ProjectTaskAssignedToUserID == currentUser.UserID)) || ((pi.ProjectGroupID > 0) && currentUser.IsGroupAdministrator(pi.ProjectGroupID)) || ((pi.ProjectGroupID == 0) && (currentUser.IsAuthorizedPerResource("CMS.ProjectManagement", CMSAdminControl.PERMISSION_MANAGE)))) { taskIdValid = true; } } } break; } bool displayValid = true; // Check whether do not display finished tasks is required if (!this.ShowFinishedTasks) { ProjectTaskStatusInfo ptsi = ProjectTaskStatusInfoProvider.GetProjectTaskStatusInfo(pti.ProjectTaskStatusID); if ((ptsi != null) && (ptsi.TaskStatusIsFinished)) { displayValid = false; } } // Check whether private task should be edited if (!this.ShowPrivateTasks) { if (pti.ProjectTaskProjectID == 0) { displayValid = false; } } // Check whether ontime task should be edited if (!this.ShowOnTimeTasks) { if ((pti.ProjectTaskDeadline != DateTimeHelper.ZERO_TIME) && (pti.ProjectTaskDeadline < DateTime.Now)) { displayValid = false; } } // Check whether overdue task should be edited if (!this.ShowOverdueTasks) { if ((pti.ProjectTaskDeadline != DateTimeHelper.ZERO_TIME) && (pti.ProjectTaskDeadline > DateTime.Now)) { displayValid = false; } } // Check whether user is allowed to see project if ((pi != null) && (ProjectInfoProvider.IsAuthorizedPerProject(pi.ProjectID, ProjectManagementPermissionType.READ, CMSContext.CurrentUser))) { displayValid = false; } // If task is valid and user has permissions to see this task display edit task dialog if (displayValid && taskIdValid && ProjectTaskInfoProvider.IsAuthorizedPerTask(forceTaskId, ProjectManagementPermissionType.READ, CMSContext.CurrentUser, CMSContext.CurrentSiteID)) { this.ucTaskEdit.ItemID = forceTaskId; this.ucTaskEdit.ReloadData(); // Render dialog this.ucPopupDialog.Visible = true; this.ucPopupDialog.Show(); // Set "force dialog displayed" flag RequestStockHelper.Add("cmspmforceitemdisplayed", true, true); } } } } #endregion #region "Event handlers registration" // Register list action handler ucTaskList.OnAction += new CommandEventHandler(ucTaskList_OnAction); #endregion #region "Pager settings" // Paging if (!EnablePaging) { ucTaskList.Grid.PageSize = "##ALL##"; ucTaskList.Grid.Pager.DefaultPageSize = -1; } else { ucTaskList.Grid.Pager.DefaultPageSize = PageSize; ucTaskList.Grid.PageSize = this.PageSize.ToString(); ucTaskList.Grid.FilterLimit = PageSize; } #endregion // Use postbacks on list actions ucTaskList.UsePostbackOnEdit = true; // Check delete permission ucTaskList.OnCheckPermissionsExtended += new CheckPermissionsExtendedEventHandler(ucTaskList_OnCheckPermissionsExtended); // Dont register JS edit script ucTaskList.RegisterEditScript = false; // Hide default ok button on edit ucTaskEdit.ShowOKButton = false; // Disable on site validators ucTaskEdit.DisableOnSiteValidators = true; // Check modify permission ucTaskEdit.OnCheckPermissionsExtended += new CheckPermissionsExtendedEventHandler(ucTaskEdit_OnCheckPermissionsExtended); // Build condition event ucTaskList.BuildCondition += new CMSModules_ProjectManagement_Controls_UI_ProjectTask_List.BuildConditionEvent(ucTaskList_BuildCondition); }