private void LoadPanes() { PanesDropDownList.Items.Add(new ListItem(LocalizeString("FullPage"), "dnn_full_page")); foreach (string pane in PortalSettings.ActiveTab.Panes) { Control obj = (Control)DotNetNuke.Common.Globals.FindControlRecursiveDown(Page, pane); PanesDropDownList.Items.Add(new ListItem(pane, obj.ClientID)); } if (Settings["DefaultPane"] != null) { PanesDropDownList.SelectedValue = Settings["DefaultPane"].ToString(); } Session["PanesDropDown_" + TabId.ToString()] = PanesDropDownList.Items; PanesDropDownList.Attributes.Remove("style"); if (Settings["HideDefaultPane"] != null) { if (Convert.ToBoolean(Settings["HideDefaultPane"].ToString())) { PanesDropDownList.Attributes.Add("style", "display: none;"); } } }
private string ReemplazoTags(string Query) { var mySQL = Settings[Query].ToString(); mySQL = mySQL.Replace("[DNN:UserID]", UserId.ToString()); mySQL = mySQL.Replace("[DNN:TabID]", TabId.ToString()); mySQL = mySQL.Replace("[DNN:ModuleID]", ModuleId.ToString()); mySQL = mySQL.Replace("[DNN:PortalID]", PortalId.ToString()); try // si está logueado exite user info { if (UserId != -1) // si está logueado exite user info { mySQL = mySQL.Replace("[DNN:Username]", UserInfo.Username.ToString()); mySQL = mySQL.Replace("[DNN:DisplayName]", UserInfo.DisplayName.ToString()); mySQL = mySQL.Replace("[DNN:Email]", UserInfo.Email.ToString()); mySQL = mySQL.Replace("[DNN:LastName]", UserInfo.LastName.ToString()); mySQL = mySQL.Replace("[DNN:FirstName]", UserInfo.FirstName.ToString()); } } catch (Exception ex) // error en userinfo { Excepcion(ex); } return(mySQL); }
protected void Page_Load(object sender, EventArgs e) { try { Get_Cache(); if (!String.IsNullOrEmpty(Session[TabId.ToString() + _currentUser.UserID + "_Message"] as string) && !String.IsNullOrEmpty(Session[TabId.ToString() + _currentUser.UserID + "_Type"] as string)) { if (Session[TabId.ToString() + _currentUser.UserID + "_Message"].ToString() != "" && Session[TabId.ToString() + _currentUser.UserID + "_Type"].ToString() != "") { ClassCommon.THONGBAO_TOASTR(Page, null, _currentUser, Session[TabId.ToString() + _currentUser.UserID + "_Message"].ToString(), "Thông báo", Session[TabId.ToString() + _currentUser.UserID + "_Type"].ToString()); } Session[TabId.ToString() + _currentUser.UserID + "_Message"] = ""; Session[TabId.ToString() + _currentUser.UserID + "_Type"] = ""; } DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.jQuery); DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.DnnPlugins); DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(this.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn); if (!IsPostBack) { txtTuNgay.SelectedDate = DateTime.Now.AddYears(-1); txtDenNgay.SelectedDate = DateTime.Now; LoadDSNhomTV(); drpDonVi.SelectedValue = "0"; LoadDanhSach(0, 0); } } catch (Exception ex) { ClassCommon.ShowToastr(Page, "Có lỗi xãy ra, vui lòng liên hệ quản trị", "Thông báo", "error"); } }
protected void ddl_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddl = sender as DropDownList; ProductGroupId = Convert.ToInt32(ddl.SelectedValue); int dynamicTab = Convert.ToInt32(Settings["DynamicPage"] ?? TabId.ToString()); if (ProductGroupId == -1) { Controller.DeleteProductFilter(PortalId, FilterSessionId, "ProductGroup"); Response.Redirect(Globals.NavigateURL(dynamicTab)); } SetFilter(ProductGroupId, IncludeChilds); ProductGroupInfo pgi = Controller.GetProductGroup(PortalId, CurrentLanguage, ProductGroupId); if (pgi != null && pgi.ProductListTabId != -1) { Response.Redirect(Globals.NavigateURL(pgi.ProductListTabId, "", "productgroup=" + ProductGroupId.ToString())); } else { Response.Redirect(Globals.NavigateURL(dynamicTab, "", "productgroup=" + ProductGroupId.ToString())); } }
protected void Page_Load(object sender, EventArgs e) { vJavascriptMask = ClassParameter.vJavascriptMaskNumber; HD_ID = Convert.ToInt32(Request.QueryString["HD_ID"]); try { if (!String.IsNullOrEmpty(Session[TabId.ToString() + "_Message"] as string) && !String.IsNullOrEmpty(Session[TabId.ToString() + "_Type"] as string)) { if (Session[TabId.ToString() + "_Message"].ToString() != "" && Session[TabId.ToString() + "_Type"].ToString() != "") { ClassCommon.THONGBAO_TOASTR(Page, null, _currentUser, Session[TabId.ToString() + "_Message"].ToString(), "Thông báo", Session[TabId.ToString() + "_Type"].ToString()); } Session[TabId.ToString() + "_Message"] = ""; Session[TabId.ToString() + "_Type"] = ""; } if (!IsPostBack) { SetInfoForm(HD_ID); LoadDSTT(HD_ID); txtGhiChu.Attributes.Add("maxlength", txtGhiChu.MaxLength.ToString()); txtTenCongTrinh.Attributes.Add("maxlength", txtTenCongTrinh.MaxLength.ToString()); GetSessionTapTin(); } } catch (Exception ex) { ClassCommon.THONGBAO_TOASTR(Page, ex, _currentUser, "Có lỗi trong quá trình xử lý, vui lòng liên hệ với quản trị!", "Thông báo lỗi", "error"); log.Error("", ex); } }
protected void Page_Load(object sender, EventArgs e) { try { if (!String.IsNullOrEmpty(Session[TabId.ToString() + "_Message"] as string) && !String.IsNullOrEmpty(Session[TabId.ToString() + "_Type"] as string)) { if (Session[TabId.ToString() + "_Message"].ToString() != "" && Session[TabId.ToString() + "_Type"].ToString() != "") { ClassCommon.THONGBAO_TOASTR(Page, null, _currentUser, Session[TabId.ToString() + "_Message"].ToString(), "Thông báo", Session[TabId.ToString() + "_Type"].ToString()); } Session[TabId.ToString() + "_Message"] = ""; Session[TabId.ToString() + "_Type"] = ""; } DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.jQuery); DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.DnnPlugins); DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(this.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn); Get_Cache(); if (!IsPostBack) { LoadDS(0); //if (ModulePermissionController.CanAdminModule(this.ModuleConfiguration) == true) //{ // btn_ThemMoi.Visible = true; // int count_columns_table = dgDanhSach.Columns.Count; //} } } catch (Exception ex) { ClassCommon.THONGBAO_TOASTR(Page, ex, _currentUser, "Có lỗi trong quá trình xữ lý, vui lòng liên hệ với quản trị!", "Thông báo lỗi", "error"); } }
protected void Page_Load(object sender, EventArgs e) { vJavascriptMask = ClassParameter.vJavascriptMaskNumber; if (!String.IsNullOrEmpty(Session[TabId.ToString() + "_Message"] as string) && !String.IsNullOrEmpty(Session[TabId.ToString() + "_Type"] as string)) { if (Session[TabId.ToString() + "_Message"].ToString() != "" && Session[TabId.ToString() + "_Type"].ToString() != "") { ClassCommon.THONGBAO_TOASTR(Page, null, _currentUser, Session[TabId.ToString() + "_Message"].ToString(), "Thông báo", Session[TabId.ToString() + "_Type"].ToString()); } Session[TabId.ToString() + "_Message"] = ""; Session[TabId.ToString() + "_Type"] = ""; } DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.jQuery); DotNetNuke.Framework.JavaScriptLibraries.JavaScript.RequestRegistration(DotNetNuke.Framework.JavaScriptLibraries.CommonJs.DnnPlugins); DotNetNuke.UI.Utilities.ClientAPI.RegisterClientReference(this.Page, DotNetNuke.UI.Utilities.ClientAPI.ClientNamespaceReferences.dnn); try { if (!IsPostBack) { if (Request.QueryString["UserID"] != null) { vND_ID = Convert.ToInt32(Request.QueryString["UserID"]); if (vND_ID > 0) { btnCapNhatTiepTuc.Visible = false; } } LoadDSNhomDV(); SetInfoForm(vND_ID); } } catch { } }
protected void Page_Load(object sender, EventArgs e) { HD_ID = Convert.ToInt32(Request.QueryString["HD_ID"]); try { if (!String.IsNullOrEmpty(Session[TabId.ToString() + "_Message"] as string) && !String.IsNullOrEmpty(Session[TabId.ToString() + "_Type"] as string)) { if (Session[TabId.ToString() + "_Message"].ToString() != "" && Session[TabId.ToString() + "_Type"].ToString() != "") { ClassCommon.THONGBAO_TOASTR(Page, null, _currentUser, Session[TabId.ToString() + "_Message"].ToString(), "Thông báo", Session[TabId.ToString() + "_Type"].ToString()); } Session[TabId.ToString() + "_Message"] = ""; Session[TabId.ToString() + "_Type"] = ""; } Get_Cache(); if (!IsPostBack) { try { LoadDanhSach(vCurentPage); Mercolum(); } catch (Exception ex) { ClassCommon.ShowToastr(Page, ex + "", "Thông báo lỗi", "error"); log.Error("", ex); } } } catch (Exception ex) { ClassCommon.THONGBAO_TOASTR(Page, ex, _currentUser, "Có lỗi trong quá trình xử lý, vui lòng liên hệ với quản trị!", "Thông báo lỗi", "error"); log.Error("", ex); } }
/// ----------------------------------------------------------------------------- /// <summary> /// LoadSettings loads the settings from the Database and displays them /// </summary> /// ----------------------------------------------------------------------------- public override void LoadSettings() { try { if (Page.IsPostBack == false) { //Check for existing settings and use those on this page //Settings["SettingName"] /* uncomment to load saved settings in the text boxes */ if (Settings.Contains("ExportTypeDropDownCssClass")) { ExportTypeDropDownCssClassTextBox.Text = Settings["ExportTypeDropDownCssClass"].ToString(); } if (Settings.Contains("ExportButtonCssClass")) { ExportButtonCssClassTextBox.Text = Settings["ExportButtonCssClass"].ToString(); } if (Settings.Contains("PaneSelectionDropDownCssClass")) { PaneSelectionDropDownCssClassTextBox.Text = Settings["PaneSelectionDropDownCssClass"].ToString(); } if (Session["PanesDropDown_" + TabId.ToString()] != null) { ListItemCollection items = (ListItemCollection)Session["PanesDropDown_" + TabId.ToString()]; foreach (ListItem item in items) { PanesDropDownList.Items.Add(item); } } if (Settings.Contains("DefaultPane")) { DefaultPaneTextBox.Text = Settings["DefaultPane"].ToString().Replace("dnn_", string.Empty); } if (PanesDropDownList.Items.Count <= 0) { DefaultPaneTextBox.Visible = true; PanesDropDownList.Visible = false; } if (Settings.Contains("HideDefaultPane")) { HideDefaultPaneCheckBox.Checked = Convert.ToBoolean(Settings["HideDefaultPane"].ToString()); } } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
string GetUrl(DnnUrlControl ctlUrl) { if (chkCurrentPage.Checked) { return(TabId.ToString()); } return(ctlUrl.Url); }
protected void Page_Load(object sender, EventArgs e) { tempService = new TempService(this); if (!IsPostBack) { if (ProductID == -1) { var products = from nw in Data.CV_Products join cat_ in Data.CV_CatProducts on nw.CatID equals cat_.CatID where (nw.CatID == CatID || CatID == -1) && (cat_.PortalID == PortalId) orderby nw.ProductID descending select new ProductInfo { Content = nw.Content, CreateDate = nw.CreatedDate.Value, Id = nw.ProductID, ImageThumUrl = GetWebImgOf(LocationImage.Product, nw.ImageName), Price = ConvertPrice(nw.Price), ShortContent = nw.ShortContent, Title = nw.Title, Url = WriteUrl(TabId.ToString(), "detailproduct", nw.ProductID.ToString(), nw.Title) }; //1 . chuyen truy van thanh list PagedList <ProductInfo> pl = new PagedList <ProductInfo>(products, PageCurr - 1, PageSize); if (pl.Count > 0) { //2 . gan vao repeater rptproducts.DataSource = pl; rptproducts.DataBind(); //3 . chuyen thanh thanh phan trang Pager pg = new Pager(PageSize, PageCurr, pl.TotalItemCount, TabId); //4. tao thanh phan trang pnPaging.Text = pg.RenderHtml(); } mv.SetActiveView(vList); } else { ProductDetail c = (ProductDetail)Page.LoadControl(ControlPath + "/ProductDetail.ascx"); c.ListProduct = this; c.TempService = this.tempService; c.DataBinding(); plhDetail.Controls.Add(c); mv.SetActiveView(vDetail); } } }
} // updatePropLayout() public void updatePropLayout(CswEnumNbtLayoutType LayoutType, CswNbtMetaDataNodeTypeProp Prop, CswNbtMetaDataNodeTypeProp InsertAfterProp, bool DoMove) { bool Added = false; if (DoMove) { removePropFromLayout(LayoutType, Prop, Int32.MinValue); } if (InsertAfterProp != null) { Dictionary <Int32, NodeTypeLayout> InsertAfterPropLayouts = getLayout(LayoutType, InsertAfterProp, null); if (InsertAfterPropLayouts.Values.Count > 0) { foreach (Int32 TabId in InsertAfterPropLayouts.Keys) { NodeTypeLayout InsertAfterPropLayout = InsertAfterPropLayouts[TabId]; // Make space for the new prop CswTableUpdate LayoutUpdate = _CswNbtMetaDataResources.CswNbtResources.makeCswTableUpdate("makeSpaceForProp_Update", "nodetype_layout"); string WhereClause = "where layouttype = '" + LayoutType.ToString() + "' and nodetypeid = " + InsertAfterProp.NodeTypeId.ToString(); if (TabId != Int32.MinValue && LayoutType == CswEnumNbtLayoutType.Edit) { WhereClause += " and nodetypetabsetid = " + TabId.ToString(); } DataTable LayoutTable = LayoutUpdate.getTable(WhereClause); foreach (DataRow Row in LayoutTable.Rows) { if (CswConvert.ToInt32(Row["display_column"]) == InsertAfterPropLayout.DisplayColumn && CswConvert.ToInt32(Row["display_row"]) > InsertAfterPropLayout.DisplayRow) { Row["display_row"] = CswConvert.ToDbVal(CswConvert.ToInt32(Row["display_row"]) + 1); } } LayoutUpdate.update(LayoutTable); // Add new prop to the layout updatePropLayout(LayoutType, Prop.NodeTypeId, Prop, false, TabId, InsertAfterPropLayout.DisplayRow + 1, InsertAfterPropLayout.DisplayColumn, InsertAfterPropLayout.TabGroup); Added = true; } // foreach( Int32 TabId in InsertAfterPropLayouts.Keys ) } // if( InsertAfterPropLayouts.Values.Count > 0 ) } // if( InsertAfterProp != null ) if (false == Added) { // Just add it somewhere updatePropLayout(LayoutType, Prop.NodeTypeId, Prop, false, Prop.getNodeType().getFirstNodeTypeTab().TabId); } if (_Cache.ContainsKey(Prop.NodeTypeId)) { _Cache.Remove(Prop.NodeTypeId); } } // updatePropLayout()
public TabMgr(ProjectMainForm owner, TabId id) { m_owner = owner; m_eId = id; m_undo = new UndoMgr(owner, id); m_winLists = new List<Form>[(int)FormListType.MAX]; for (int i=0; i<(int)FormListType.MAX; i++) m_winLists[(int)i] = new List<Form>(); }
private void BindTabControls() { BindBeforeAfterTabControls(); divInsertPositionRow.Visible = cboPositionTab.Items.Count > 0; cboParentTab.AutoPostBack = true; if (cboPositionTab.FindItemByValue(TabId.ToString(CultureInfo.InvariantCulture)) != null) { cboPositionTab.ClearSelection(); cboPositionTab.FindItemByValue(TabId.ToString(CultureInfo.InvariantCulture)).Selected = true; } }
string FormatDoneUrl(string doneUrlTemplate, bool openInPopup, int userId) { var doneUrl = doneUrlTemplate.Replace("[USERID]", userId.ToString()) .Replace("[PORTALID]", PortalId.ToString()) .Replace("[TABID]", TabId.ToString()); if (openInPopup) { return(UrlUtils.PopUpUrl(doneUrl, PortalSettings, false, false, 550, 950)); } return(doneUrl); }
private void BindTabControls() { cboParentTab.DataSource = GetTabs(true); cboParentTab.DataBind(); BindBeforeAfterTabControls(); divInsertPositionRow.Visible = cboPositionTab.Items.Count > 0; cboParentTab.AutoPostBack = true; if (cboPositionTab.Items.FindByValue(TabId.ToString()) != null) { cboPositionTab.ClearSelection(); cboPositionTab.Items.FindByValue(TabId.ToString()).Selected = true; } }
public TabMgr(ProjectMainForm owner, TabId id) { m_owner = owner; m_eId = id; m_undo = new UndoMgr(owner, id); m_winLists = new List <Form> [(int)FormListType.MAX]; for (int i = 0; i < (int)FormListType.MAX; i++) { m_winLists[(int)i] = new List <Form>(); } }
protected void Page_Load(object sender, EventArgs e) { tempService = new TempService(this); if (!IsPostBack) { if (NewsID == -1) { var Data = IB.Common.Base.V_Base.Data; var news = from nw in Data.CV_News join cat_ in Data.CV_CatNews on nw.CatNewsID equals cat_.CatID where (nw.CatNewsID == CatID || CatID == -1) && cat_.PortalID == PortalId orderby nw.NewsID descending select new NewsInfo { Content = nw.Content, CreatedDate = nw.CreatedDate.Value, ImageName = nw.ImageName, NewsId = nw.NewsID, ShortContent = nw.ShortContent, Title = nw.Title, Url = WriteUrl(TabId.ToString(), "detailnews", nw.NewsID.ToString(), nw.Title) }; //1 . chuyen truy van thanh list IB.Paging.PagedList <NewsInfo> pl = new IB.Paging.PagedList <NewsInfo>(news, PageCurr - 1, PageSize); //2 . gan vao repeater if (pl.Count > 0) { rptnews.DataSource = pl; rptnews.DataBind(); //3 . chuyen thanh thanh phan trang IB.Paging.Pager pg = new IB.Paging.Pager(PageSize, PageCurr, pl.TotalItemCount, TabId); //4. tao thanh phan trang pnPaging.Text = pg.RenderHtml(); } mv.SetActiveView(vList); } else { NewsDetail c = (NewsDetail)Page.LoadControl(ControlPath + "/NewsDetail.ascx"); c.ListNews = this; c.TempService = this.tempService; c.DataBinding(); plhDetail.Controls.Add(c); mv.SetActiveView(vDetail); } } }
/// <summary> /// InitializeTab loads the Controls with default Tab Data /// </summary> /// <history> /// [cnurse] 9/10/2004 Updated to reflect design changes for Help, 508 support /// and localisation /// </history> public void InitializeTab() { //Load TabControls LoadTabControls(null); // Populate Tab Names, etc. txtTabName.Text = ""; txtTitle.Text = ""; txtDescription.Text = ""; txtKeyWords.Text = ""; // tab administrators can only create children of the current tab if (PortalSecurity.IsInRoles(PortalSettings.AdministratorRoleName) == false) { if (cboTab.Items.FindByValue(TabId.ToString()) != null) { cboTab.Items.FindByValue(TabId.ToString()).Selected = true; } } else { // select the <None Specified> option cboTab.Items[0].Selected = true; } // hide the upload new file link until the tab has been saved chkHidden.Checked = false; chkDisableLink.Checked = false; // page template cboTemplate.DataSource = LoadTemplates(); cboTemplate.DataBind(); cboTemplate.Items.Insert(0, new ListItem("<" + Localization.GetString("None_Specified") + ">", "")); if (cboTemplate.Items.FindByText(Localization.GetString("DefaultTemplate", this.LocalResourceFile)) != null) { cboTemplate.Items.FindByText(Localization.GetString("DefaultTemplate", this.LocalResourceFile)).Selected = true; } else { cboTemplate.SelectedIndex = 0; // none specified } // copy page options cboCopyPage.DataSource = LoadPortalTabs(); cboCopyPage.DataBind(); cboCopyPage.Items.Insert(0, new ListItem("<" + Localization.GetString("None_Specified") + ">", "-1")); rowModules.Visible = false; }
/// <summary> /// 设置数据项 /// </summary> private void SetDataItem() { UpdateModuleSetting(ModuleId, "ClientZone_PortalID", ddlPortals.Items[ddlPortals.SelectedIndex].Value); if ((ddlTabModule.Items.Count > 0)) { string[] values = ddlTabModule.SelectedValue.Split(Convert.ToChar("-")); if (values.Length == 2) { UpdateModuleSetting(ModuleId, "ClientZone_TabID", values[0]); UpdateModuleSetting(ModuleId, "ClientZone_ModuleID", values[1]); } } UpdateModuleSetting(ModuleId, "ClientZone_ModulePageType", ddlModulePageType.Items[ddlModulePageType.SelectedIndex].Value); String ModulePageType = ddlModulePageType.Items[ddlModulePageType.SelectedIndex].Value; if (ModulePageType == ((Int32)EnumDisplayModuleType.Campaigns).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_Campaigns", TabId.ToString()); } else if (ModulePageType == ((Int32)EnumDisplayModuleType.Downloads).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_Downloads", TabId.ToString()); } else if (ModulePageType == ((Int32)EnumDisplayModuleType.Events).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_Events", TabId.ToString()); } else if (ModulePageType == ((Int32)EnumDisplayModuleType.GameSheets).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_GameSheets", TabId.ToString()); } else if (ModulePageType == ((Int32)EnumDisplayModuleType.Help).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_Help", TabId.ToString()); } else if (ModulePageType == ((Int32)EnumDisplayModuleType.MyAccount).ToString()) { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_MyAccount", TabId.ToString()); } else { UpdateModuleSetting(Settings_ModuleID, "ClientZone_DisplayTab_ProductRoadmap", TabId.ToString()); } }
public override string ToString() { var data = new string[] { "Portal ID: " + PortalId.ToString(), "Tab ID: " + TabId.ToString(), "Module ID: " + ModuleId.ToString(), "Mod. Def.ID: " + ModuleDefId.ToString(), "Url: " + Url, "Unique Key: " + UniqueKey, "Last Modified: " + ModifiedTimeUtc.ToString("o"), "Culture: " + CultureCode, }; return(string.Join(", ", data)); }
protected void lstProductGroups_SelectedIndexChanging(object sender, ListViewSelectEventArgs e) { ProductGroupId = (int)lstProductGroups.DataKeys[e.NewSelectedIndex].Value; SetFilter(ProductGroupId, IncludeChilds); ProductGroupInfo pgi = Controller.GetProductGroup(PortalId, CurrentLanguage, ProductGroupId); if (pgi != null && pgi.ProductListTabId != -1) { Response.Redirect(Globals.NavigateURL(pgi.ProductListTabId, "", "productgroup=" + ProductGroupId.ToString())); } else { int dynamicTab = Convert.ToInt32(Settings["DynamicPage"] ?? TabId.ToString()); Response.Redirect(Globals.NavigateURL(dynamicTab, "", "productgroup=" + ProductGroupId.ToString())); } }
protected void treeProductGroup_SelectedNodeChanged(object sender, EventArgs e) { ProductGroupId = Convert.ToInt32(treeProductGroup.SelectedNode.Value.Substring(1)); SetFilter(ProductGroupId, IncludeChilds); ProductGroupInfo pgi = Controller.GetProductGroup(PortalId, CurrentLanguage, ProductGroupId); if (pgi != null && pgi.ProductListTabId != -1) { Response.Redirect(Globals.NavigateURL(pgi.ProductListTabId, "", "productgroup=" + ProductGroupId.ToString())); } else { int dynamicTab = Convert.ToInt32(Settings["DynamicPage"] ?? TabId.ToString()); Response.Redirect(Globals.NavigateURL(dynamicTab, "", "productgroup=" + ProductGroupId.ToString())); } }
private string ParseControls(string Template) { string sOutput = Template; sOutput = sOutput.Replace("[JUMPTO]", "<asp:placeholder id=\"plhQuickJump\" runat=\"server\" />"); if (sOutput.Contains("[STATISTICS]")) { sOutput = sOutput.Replace("[STATISTICS]", "<am:Stats id=\"amStats\" MID=\"" + ModuleId + "\" PID=\"" + PortalId.ToString() + "\" runat=\"server\" />"); } if (sOutput.Contains("[WHOSONLINE]")) { sOutput = sOutput.Replace("[WHOSONLINE]", MainSettings.UsersOnlineEnabled ? "<asp:placeholder id=\"plhUsersOnline\" runat=\"server\" />" : string.Empty); } sOutput = sOutput.Replace("[PORTALID]", PortalId.ToString()); sOutput = sOutput.Replace("[MODULEID]", ModuleId.ToString()); sOutput = sOutput.Replace("[TABID]", TabId.ToString()); sOutput = sOutput.Replace("[USERID]", CurrentUserId.ToString()); return(sOutput); }
private void CreateThumb(string thumbFile) { string html = ""; if (CreateImageCallback != null) { html = CreateImageCallback(txtTemplate.Text); } WebClient client = new WebClient(); string baseUrl = Request.Url.Scheme + "://" + Request.Url.Host; string url = Globals.NavigateURL(TabId); if (!url.StartsWith("http")) { url = baseUrl + url; } string page = (string)DataCache.GetCache("bbstore_producttemplate_" + TabId.ToString()); if (page == null) { page = client.DownloadString(url); int bodystart = page.IndexOf("<body"); if (bodystart > 0) { page = page.Substring(0, bodystart) + "<body><div style=\"padding:20px;\">{{PLACEHOLDER}}</div></body></html>"; } DataCache.SetCache("bbstore_producttemplate_" + TabId.ToString(), page); } if (html != string.Empty) { html = page.Replace("{{PLACEHOLDER}}", html); WebThumb thumbMaker = new WebThumb("DesktopModules\\BBStore", Request.Url.Scheme + "://" + Request.Url.Host); thumbMaker.MakeThumb(html, thumbFile); } }
protected override void BeforeUpdateItem(EduProgramInfo item, bool isNew) { // fill the object item.Code = textCode.Text.Trim(); item.Title = textTitle.Text.Trim(); item.Generation = textGeneration.Text.Trim(); item.StartDate = datetimeStartDate.SelectedDate; item.EndDate = datetimeEndDate.SelectedDate; item.HomePage = chkUseCurrentPageAsHomePage.Checked ? TabId.ToString() : urlHomePage.Url; // update references item.EduLevelID = int.Parse(comboEduLevel.SelectedValue); item.EduLevel = ModelContext.Get <EduLevelInfo, int> (item.EduLevelID); if (!isNew) { item.LastModifiedOnDate = DateTime.Now; item.LastModifiedByUserId = UserInfo.UserID; } }
// コンストラクタ public CardPanelViewModel(IEventAggregator eventAggregator, AccountManager accountManager, LoggingService loggingService, CardPanelModel cardPanelModel, SidePanelModel sidePanelModel) { // DI _eventAggregator = eventAggregator; _accountManager = accountManager; _loggingService = loggingService; _cardPanelModel = cardPanelModel; _sidePanelModel = sidePanelModel; // 起動時のロード //UserDatas = new ReactiveCollection<UserData>(_accountManager.Current.Followers.Take(20).ToObservable()); // ロード完了時に発生するイベント購読して現在表示しているユーザーデータのコレクションを更新する Observable.FromEvent <IEnumerable <UserData> >( handler => _cardPanelModel.LoadCompleted += handler, handler => _cardPanelModel.LoadCompleted -= handler ) .Subscribe(userData => { UserDatas = (userData ?? new List <UserData>()) .ToObservable() .ToReactiveCollection(); }) .AddTo(Disposables); // タブのIdをCardPanelModelに書き戻す TabId .PropertyChangedAsObservable() .Subscribe(_ => { _cardPanelModel.TabId = TabId.Value; }) .AddTo(Disposables); // タブが削除されたらリソースを開放する _eventAggregator .GetEvent <TabRemovedEvent>() .Subscribe(_ => Disposables.Dispose(), ThreadOption.PublisherThread, false, tabRemovedEventArgs => tabRemovedEventArgs.TabId == TabId.Value) .AddTo(Disposables); }
public MenuNode FindByNameOrId(string tabNameOrId) { if (tabNameOrId.Equals(Text, StringComparison.InvariantCultureIgnoreCase)) { return(this); } if (tabNameOrId == TabId.ToString()) { return(this); } foreach (var child in Children) { var result = child.FindByNameOrId(tabNameOrId); if (result != null) { return(result); } } return(null); }
public void WriteXml(XmlWriter writer) { writer.WriteStartElement("Exception"); writer.WriteElementString("AssemblyVersion", AssemblyVersion); writer.WriteElementString("PortalId", PortalId.ToString()); writer.WriteElementString("UserId", UserId.ToString()); writer.WriteElementString("TabId", TabId.ToString()); writer.WriteElementString("RawUrl", RawUrl); writer.WriteElementString("Referrer", Referrer); writer.WriteElementString("UserAgent", UserAgent); writer.WriteElementString("ExceptionHash", ExceptionHash); writer.WriteElementString("Message", Message); writer.WriteElementString("StackTrace", StackTrace); writer.WriteElementString("InnerMessage", InnerMessage); writer.WriteElementString("InnerStackTrace", InnerStackTrace); writer.WriteElementString("Source", Source); writer.WriteElementString("FileName", FileName); writer.WriteElementString("FileLineNumber", FileLineNumber.ToString()); writer.WriteElementString("FileColumnNumber", FileColumnNumber.ToString()); writer.WriteElementString("Method", Method); writer.WriteEndElement(); }
protected override void BeforeUpdateItem(DivisionInfo item, bool isNew) { // fill the object item.Title = txtTitle.Text.Trim(); item.ShortTitle = txtShortTitle.Text.Trim(); item.Email = txtEmail.Text.Trim().ToLowerInvariant(); item.SecondaryEmail = txtSecondaryEmail.Text.Trim().ToLowerInvariant(); item.Phone = txtPhone.Text.Trim(); item.Fax = txtFax.Text.Trim(); item.Address = textAddress.Text.Trim(); item.Location = txtLocation.Text.Trim(); item.WebSite = txtWebSite.Text.Trim(); item.WebSiteLabel = textWebSiteLabel.Text.Trim(); item.ParentDivisionID = parentDivisionSelector.DivisionId; item.HomePage = chkUseCurrentPageAsHomePage.Checked ? TabId.ToString() : urlHomePage.Url; item.DocumentUrl = urlDocumentUrl.Url; item.StartDate = datetimeStartDate.SelectedDate; item.EndDate = datetimeEndDate.SelectedDate; item.IsSingleEntity = checkIsSingleEntity.Checked; item.IsInformal = checkIsInformal.Checked; item.IsGoverning = checkIsGoverning.Checked; item.HeadPositionID = ParseHelper.ParseToNullable <int> (comboHeadPosition.SelectedValue, true); }
protected void btnSearch_Click(object sender, EventArgs e) { StringBuilder queryString = new StringBuilder(64); queryString.Append("pg").Append("/").Append("List"); if (ddlPropertyType.SelectedValue.ToString().Length > 0) { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Type").Append("/").Append(ddlPropertyType.SelectedValue.ToString()); } if (ddl_Town.SelectedValue.ToString().Length > 0) { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Town").Append("/").Append(ddl_Town.SelectedValue.ToString()); } if (ddl_Village.SelectedValue.ToString().Length > 0) { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Village").Append("/").Append(ddl_Village.SelectedValue.ToString()); } if (ddlBedRooms.SelectedValue.ToString() != "0") { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Beds").Append("/").Append(ddlBedRooms.SelectedValue.ToString()); } if (ddlBathRooms.SelectedValue.ToString() != "0") { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Baths").Append("/").Append(ddlBathRooms.SelectedValue.ToString()); } if (cbxWaterFront.Checked) { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("WaterFront").Append("/").Append("True"); } if (cbxWaterView.Checked) { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("WaterView").Append("/").Append("True"); } if (ddlPriceLow.SelectedValue.ToString() != "0") { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("Low").Append("/").Append(ddlPriceLow.SelectedValue.ToString()); } if (ddlPriceHigh.SelectedValue.ToString() != "0") { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("High").Append("/").Append(ddlPriceHigh.SelectedValue.ToString()); } if (ddlDOM.SelectedValue.ToString() != "0") { if (queryString.Length > 0) { queryString.Append("/"); } queryString.Append("DOM").Append("/").Append(ddlDOM.SelectedValue.ToString()); } string vLink = ""; //if (_SearchResultPage.ToString().Length > 0) //{ // vLink = "/TabID/" + _SearchResultPage.ToString() + "/" + queryString.ToString() + "/Default.aspx"; //} //else //{ // vLink = Globals.NavigateURL(this.TabId, "List", "mid", this.ModuleId.ToString(), queryString.ToString()); //} //Response.Redirect(NavigateURL(TabId, "", CType(objParams.ToArray(GetType(String)), String())), True) // Response.Redirect(NavigateURL(TabId, "", Convert.ToString(objParams.ToArray(typeof(string)))), true); vLink = Globals.NavigateURL(TabId, "View", queryString.ToString()); vLink = vLink.ToString().Replace("ctl/View/", ""); //// FOR DEBUGGING lblFormMessage.Visible = true; lblFormMessage.Text = queryString.ToString() + " <br />" + vLink.ToString() + " <br />tabID=" + TabId.ToString(); Response.Redirect(vLink.ToString()); }