protected void RadPanelBar1_ItemCreated(object sender, RadPanelBarEventArgs e) { var radPanel = ((RadPanelBar)sender).FindItemByText("Calendar"); if (radPanel != null) { var cal1 = radPanel.FindControl("Calendar1") as RadCalendar; if (cal1 != null) { var currentDateString = Request.QueryString["dt1"]; if (!string.IsNullOrEmpty(currentDateString)) { try { var dateArr = currentDateString.Split('/'); var year = int.Parse(dateArr[2]); var month = int.Parse(dateArr[0]); var day = int.Parse(dateArr[1]); var currentDate = new DateTime(year, month, day); cal1.SelectedDate = currentDate; } catch (Exception) { // write log } } } } }
protected void OnSelected(object sender, RadPanelBarEventArgs e) { RadPanelBarEventHandler SelectedHandler = (RadPanelBarEventHandler)Events[EventSelected]; if (SelectedHandler != null) { SelectedHandler(sender, e); } }
protected void ReportClick(object sender, RadPanelBarEventArgs e) { RadPanelItem ItemClicked = e.Item; if (e.Item.Value != "") { Response.Redirect("~/pages/main.aspx?idSmartReport=" + e.Item.Value); } }
protected void ModuleCPMenu_List_OnCategorySelected(object sender, RadPanelBarEventArgs e) { _selected_componentid = ModuleCPMenu_List.Selected_ComponentID; ViewState["Selected_ComponentID"] = _selected_componentid; if (!DataEval.IsEmptyQuery(_selected_componentid)) { lbl_ControlName.Text = ModuleCPMenu_List.Selected_ComponentText; iframe_ControlPanel.Attributes["src"] = string.Format("Modules/ControlManager.aspx?ControlID={0}", _selected_componentid); } }
/// <remarks> /// The event handler is used to enable the feature of hiding the url for a group /// page PanelItem. The type of the page corresponding to the current node is checked and /// if it is a group page, the url for the CmsSiteMapNode is set to an empty string. /// </remarks> /// <summary> /// A handler for the <strong>RadPanelbar</strong> ItemDataBound event. Performs /// hiding of URLs for group pages, if the <strong>HideUrlForGroupPages</strong> property /// is <strong>true</strong>. /// </summary> /// <param name="sender">The object that caused the event.</param> /// <param name="e"> /// An instance of the RadPanelbarEventArgs class containing information about the /// event. /// </param> public void RadPanelbar1_ItemDataBound(object sender, RadPanelBarEventArgs e) { if (this.hideUrlForGroupPages) { CmsSiteMapNode node = e.Item.DataItem as CmsSiteMapNode; if (node != null && node.PageType == CmsPageType.Group) { e.Item.NavigateUrl = ""; } } }
protected void panelbar_ItemClick1(object sender, RadPanelBarEventArgs e) { if (e.Item.Value != "") { mSession.GroupName = e.Item.Value; mSession.MenuType = ((RadPanelItem)e.Item.Parent).Text; ShowBasket(false); gMenu.Rebind(); mSession.ViewingBasket = false; //gMenu.Rebind(); } }
/// <summary> /// Occurs when a section is selected /// </summary> /// <param name="sender">The panel bar</param> /// <param name="e">PanelBarEventArgs</param> protected void MenuItemPanelBar_ItemClick(object sender, RadPanelBarEventArgs e) { ApplicationSectionEventArgs args = new ApplicationSectionEventArgs(); ApplicationModules selectedModule = (ApplicationModules)Enum.Parse(typeof(ApplicationModules), e.Item.Value); args.CurrentApplicationModule = selectedModule; args.DataFormType = ApplicationMenu.GetDataFormType(selectedModule); ApplicationSectionSelected(args); }
protected void RadPanelBar_ControlPanel_ItemClick(object sender, RadPanelBarEventArgs e) { if (e.Item.Value != null) { _selected_componentid = e.Item.Value; ViewState["Selected_ComponentID"] = _selected_componentid; _selected_componenttext = e.Item.Text; ViewState["Selected_ComponentText"] = _selected_componenttext; OnSelected(sender, e); } }
protected void m_pnlBar_ItemClick(object sender, RadPanelBarEventArgs e) { if (e.Item == m_pnlItemLogonUser) { Response.Redirect("Login.aspx"); } else { if (!string.IsNullOrEmpty(e.Item.Value)) { Response.Redirect(e.Item.Value);; } } }
protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e) { if (e.Item.Owner is RadPanelItem) { RadPanelItem parentItem = (RadPanelItem)e.Item.Owner; switch (parentItem.Text) { case "Mensajes": RadPanelItem item = e.Item; SplData.ContentUrl = String.Format("MensajeGrid.aspx?GrupoMensajesId={0}", item.Value); break; } } }
/// <summary> /// Handles the OnItemClick event of the rpbReports control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Telerik.Web.UI.RadPanelBarEventArgs"/> instance containing the event data.</param> protected void rpbReports_OnItemClick(object sender, RadPanelBarEventArgs e) { if (!string.IsNullOrEmpty(e.Item.Value)) { if (!rdpStartDate.SelectedDate.HasValue || !rdpEndDate.SelectedDate.HasValue) { var date = DateTime.Now; var firstDayOfWeek = DateTimeHelper.GetFirstDayOfWeek(date); rdpStartDate.SelectedDate = firstDayOfWeek.Date; rdpEndDate.SelectedDate = DateTime.Now.AddDays(1).Date; } var analyticReportId = Guid.Parse(e.Item.Value); lrlReportTitle.Text = e.Item.Text; ucChart.Visible = true; ucAnalyticReportFilters.ClearFilters(); ucAnalyticReportFilters.AxisToBuildChart = null; ucAnalyticReportFilters.AnalyticReportId = analyticReportId; ucXAxis.AnalyticReportId = analyticReportId; ucXAxis.BindData(); ucAnalyticReportFilters.BindData(); ucAnalyticReportAxisValue.ValueToBuildChart = null; ucAnalyticReportAxisValue.AnalyticReportId = analyticReportId; ucAnalyticReportAxisValue.BindData(); ucChart.AnalyticReportId = analyticReportId; ucTableReport.AnalyticReportId = analyticReportId; if (!string.IsNullOrEmpty(hfWidth.Value)) { ucChart.Width = int.Parse(hfWidth.Value) - 280; } var analyticReportSystems = DataManager.AnalyticReportSystem.SelectByAnalyticReportId(analyticReportId); plPeriods.Visible = analyticReportSystems.Any(o => o.tbl_AnalyticAxis.SystemName == "Period"); RefreshReports(); } }
// //////////////////////////////////////////////////////////////////////// // NAVIGATION EVENTS // protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { // Store active tab for postback Session["activeTabProjects"] = "0"; Session["dialogOpenedProjects"] = "0"; string url = ""; switch (e.Item.Value) { case "mProjectCostingSheets": this.PostPageChanges(); Session["lfsProjectTDS"] = projectTDS; url = "./project_costing_sheets_navigator.aspx?source_page=project_edit.aspx&project_id=" + hdfProjectId.Value + "&active_tab=" + hdfActiveTab.Value + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value + "&state=edit"; break; case "mSections": this.PostPageChanges(); Session["lfsProjectTDS"] = projectTDS; url = "./project_sections_navigator.aspx?source_page=lm&project_id=" + hdfProjectId.Value + "&active_tab=" + hdfActiveTab.Value + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value + "&state=edit"; break; case "mSearch": Session.Remove("lfsLibraryTDS"); Session.Remove("fromAttachment"); projectTDS.RejectChanges(); url = "./projects.aspx?source_page=lm"; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mSearch": url = "./../../LabourHours/ActualCosts/actual_costs_navigator.aspx?source_page=out"; Response.Redirect(url); break; } }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; // Store active tab for postback Session["activeTabFll"] = "0"; Session["dialogOpenedFll"] = "0"; switch (e.Item.Value) { case "mSearch": url = "./fl_navigator.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=" + hdfWorkType.Value; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mAddHoursBySubcontractor": url = "./../../LabourHours/SubcontractorHours/subcontractor_hours_add_by_subcontractor.aspx?source_page=lm" + GetNavigatorState(); Response.Redirect(url); break; case "mAddHoursByClientProject": url = "./../../LabourHours/SubcontractorHours/subcontractor_hours_add_by_client_project.aspx?source_page=lm" + GetNavigatorState(); Response.Redirect(url); break; case "mSearch": url = "./../../LabourHours/SubcontractorHours/subcontractor_hours_navigator.aspx?source_page=out"; Response.Redirect(url); break; } }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mSearchS": url = "./jls_navigator.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value; break; case "mLiningPlan": url = "./jl_lining_plan.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=" + hdfWorkType.Value; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mProjectCostingSheets": url = "./project_costing_sheets_navigator.aspx?source_page=project_sections_navigator2.aspx&project_id=" + hdfProjectId.Value + "&active_tab=" + (string)ViewState["active_tab"] + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value + "&state=" + (string)ViewState["state"]; break; case "mProject": if (ViewState["state"].ToString() == "summary") { url = "./project_summary.aspx?source_page=lm&project_id=" + hdfProjectId.Value + "&active_tab=" + (string)ViewState["active_tab"] + GetNavigatorState() + "&update=" + (string)ViewState["update"]; } if (ViewState["state"].ToString() == "edit") { url = "./project_edit.aspx?source_page=lm&project_id=" + hdfProjectId.Value + "&active_tab=" + (string)ViewState["active_tab"] + GetNavigatorState() + "&origin=" + (string)ViewState["origin"] + "&update=" + (string)ViewState["update"] + "&data_changed=" + hdfDataChanged.Value; } break; case "mSearch": url = "./projects.aspx?source_page=lm"; break; } if (url != "") Response.Redirect(url); }
// //////////////////////////////////////////////////////////////////////// // NAVIGATION EVENTS // protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { switch (e.Item.Value) { case "mSRManager": Session.Remove("dialogOpenedServicesManagerTool"); PostPageChanges(); // Store active tab for postback Session["activeTabServices"] = "0"; Session["dialogOpenedServices"] = "0"; Session.Remove("libraryTDSForServices"); int serviceId = GetServiceId(); if (serviceId > 0) { string script = "<script language='javascript'>"; string url = "services_manager_tool.aspx?source_page=services_navigator2.aspx&service_id=" + serviceId + "&dashboard=False&unit_id=none"; script = script + string.Format("window.open('{0}', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=525, height=650')", url); script = script + "</script>"; Response.Write(script); } else { string script = "<script language='javascript'>"; string url = "services_manager_tool.aspx?&source_page=lm&dashboard=False"; script = script + string.Format("window.open('{0}', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=525, height=650')", url); script = script + "</script>"; Response.Write(script); } break; } }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mChange": url = "./jliner_main.aspx?source_page=lm&client=" + hdfCurrentClient.Value; break; case "mLiningPlan": url = "./linning_plan.aspx?source_page=lm&client=" + hdfCurrentClient.Value; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { // Store active tab for postback Session["activeTabUnits"] = "0"; Session["dialogOpenedUnits"] = "0"; Session.Remove("libraryTDSForUnits"); string url = ""; switch (e.Item.Value) { case "mSearch": url = "./units_navigator.aspx?source_page=lm"; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { DropDownList ddlOthersFor = (DropDownList)tkrpbLeftMenuOthersTimesheets.FindItemByValue("nbOthersTimesheetsDDL").FindControl("ddlOthersFor"); Session["ddlOthersForSelectedValue"] = ddlOthersFor.SelectedValue; string url = ""; switch (e.Item.Value) { case "nbTimesheetsToolsApproveProjectTimes": url = "./timesheet_approve.aspx?source_page=timesheet_summary.aspx&others=yes + GetNavigatorState()"; break; case "nbOthersTimesheetsViewCurrent": if (ddlOthersFor.SelectedIndex >= 0) { Response.Redirect("./../timesheet/timesheet.aspx?source_page=lm&others=yes&employee_id=" + ddlOthersFor.SelectedValue); } break; case "nbOthersTimesheetsViewAll": if (ddlOthersFor.SelectedIndex >= 0) { Response.Redirect("./../timesheet/timesheet_all.aspx?source_page=lm&others=yes&employee_id=" + ddlOthersFor.SelectedValue); } break; case "nbMyTimesheetsViewCurrent": url = "./../timesheet/timesheet.aspx?source_page=lm&others=no"; break; case "nbMyTimesheetsViewAll": url = "./../timesheet/timesheet_all.aspx?source_page=lm&others=no"; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mSearch": url = "./toDoList_navigator.aspx?source_page=lm"; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { switch (e.Item.Value) { case "mSearch": string url = "./pr_navigator.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value + "&work_type=" + hdfWorkType.Value; Response.Redirect(url); break; } }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mRehabAssessmentPlan": url = "./ra_lining_plan.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { // Store active tab for postback Session["activeTabEmployees"] = "0"; string url = ""; switch (e.Item.Value) { case "mSearch": url = "./employees_navigator.aspx?source_page=lm&resource_type=" + hdfResourceType.Value; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { string url = ""; switch (e.Item.Value) { case "mRehabAssessmentPlan": url = "./ra_lining_plan.aspx?source_page=lm&client_id=" + hdfCurrentClientId.Value + "&project_id=" + hdfCurrentProjectId.Value; break; case "mM1M2ReportByClient": PostPageChanges(); ArrayList sectionIdArrayList2 = GetSectionIdArrayList(); if (sectionIdArrayList2.Count > 0) { Session["sectionsSelected"] = sectionIdArrayList2; } string script2 = "<script language='javascript'>"; url = "./../FullLengthLining/fl_m12_report.aspx?source_page=lm&project_id=" + hdfCurrentProjectId.Value + "&client_id=" + hdfCurrentClientId.Value + "&work_type=Junction Lining Section"; script2 = script2 + string.Format("window.open('{0}', '_blank', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=800, height=680')", url); script2 = script2 + "</script>"; ScriptManager.RegisterStartupScript(this, this.GetType(), "M1Report", script2, false); url = ""; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { Session.Remove("projectTimeIdSelected"); Session.Remove("divScrollPosition"); DropDownList ddlOthersFor = (DropDownList)tkrpbLeftMenuOthersTimesheets.FindItemByValue("nbOthersTimesheetsDDL").FindControl("ddlOthersFor"); Session["ddlOthersForSelectedValue"] = ddlOthersFor.SelectedValue; string url = ""; switch (e.Item.Value) { case "nbOthersTimesheetsViewCurrent": lblError.Visible = false; if (ddlOthersFor.SelectedIndex >= 0) { Response.Redirect("./../timesheet/timesheet.aspx?source_page=lm&others=yes&employee_id=" + ddlOthersFor.SelectedValue); } break; case "nbOthersTimesheetsViewAll": lblError.Visible = false; if (ddlOthersFor.SelectedIndex >= 0) { Response.Redirect("./../timesheet/timesheet_all.aspx?source_page=lm&others=yes&employee_id=" + ddlOthersFor.SelectedValue); } break; case "nbMyTimesheetsViewCurrent": lblError.Visible = false; url = "./../timesheet/timesheet.aspx?source_page=lm&others=no"; break; case "nbMyTimesheetsViewAll": lblError.Visible = false; url = "./../timesheet/timesheet_all.aspx?source_page=lm&others=no"; break; } if (url != "") Response.Redirect(url); }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { DropDownList ddlVacationsFor = (DropDownList)tkrpbLeftMenuAllVacations.FindItemByValue("nbVacationsForDDL").FindControl("ddlVacationsFor"); Session["ddlVacationsForSelectedValue"] = ddlVacationsFor.SelectedValue; switch (e.Item.Value) { case "nbViewVacations": if (ddlVacationsFor.SelectedIndex > 0) { Response.Redirect("./vacations_all.aspx?source_page=vacations_edit.aspx&employee_id=" + ddlVacationsFor.SelectedValue + "&date_to_show=" + ViewState["date_to_show"]); } else { Response.Redirect("./vacations_all.aspx?source_page=vacations_edit.aspx&date_to_show=" + ViewState["date_to_show"]); } break; case "nbNonWorkingDaysDefinition": Response.Redirect("./vacations_non_working_days_definition.aspx?source_page=vacations_edit.aspx" + "&date_to_show=" + ViewState["date_to_show"]); break; case "nbApproveVacationRequests": if (ddlVacationsFor.SelectedIndex > 0) { Response.Redirect("./vacations_approve_vacation_request.aspx?source_page=vacations_edit.aspx&employee_id=" + ddlVacationsFor.SelectedValue + "&date_to_show=" + ViewState["date_to_show"]); } else { Response.Redirect("./vacations_approve_vacation_request.aspx?source_page=vacations_edit.aspx&date_to_show=" + ViewState["date_to_show"]); } break; case "nbCancelVacationRequests": if (ddlVacationsFor.SelectedIndex > 0) { Response.Redirect("./vacations_cancel_vacation_request.aspx?source_page=vacations_edit.aspx&employee_id=" + ddlVacationsFor.SelectedValue + "&date_to_show=" + ViewState["date_to_show"]); } else { Response.Redirect("./vacations_cancel_vacation_request.aspx?source_page=vacations_edit.aspx&date_to_show=" + ViewState["date_to_show"]); } break; } }
protected void tkrpbLeftMenu_ItemClick(object sender, RadPanelBarEventArgs e) { switch (e.Item.Value) { } }
protected void RadPanelBarItems_ItemClick(object sender, RadPanelBarEventArgs e) { LblState.Text = string.Empty; RadPanelBar rtv = (RadPanelBar)sender; HiddenField hf = (HiddenField)rtv.Parent.Parent.FindControl("HiddenFieldMaterialId"); TextBox TxtMID = (TextBox)rtv.Parent.Parent.FindControl("TxtItemCatID"); Label LblItemName = (Label)rtv.Parent.Parent.FindControl("LblItemName"); hf.Value = e.Item.Value; if (e.Item.Value != "-1") { if (e.Item.ToolTip != "1") { hf.Value = string.Empty; TxtMID.Text = string.Empty; LblItemName.Text = string.Empty; } else { hf.Value = e.Item.Value; TxtMID.Text = MC.LoadDataTable("Select CategoryId From TblMaterialDetiels Where MaterialId = " + e.Item.Value, "").Rows[0][0].ToString(); LblItemName.Text = e.Item.Text; } } else { hf.Value = string.Empty; TxtMID.Text = string.Empty; LblItemName.Text = string.Empty; } }