public String CategoryAdminList(HttpContext context, string editType, string editLangCurrent) { var ajaxInfo = NBrightBuyUtils.GetAjaxInfo(context); var razortemplate = ajaxInfo.GetXmlProperty("genxml/hidden/razortemplate"); if (razortemplate == "") { razortemplate = "Admin_CategoryList.cshtml"; } var themefolder = ajaxInfo.GetXmlProperty("genxml/hidden/themefolder"); if (themefolder == "") { themefolder = "config"; } var catid = ajaxInfo.GetXmlPropertyInt("genxml/hidden/selectedcatid"); var grpCats = new List <NBrightInfo>(); if (editType.ToLower() == "property") { var selgroup = ajaxInfo.GetXmlProperty("genxml/hidden/selectedgroup"); grpCats = NBrightBuyUtils.GetCatList(catid, selgroup, editLangCurrent); } else { grpCats = NBrightBuyUtils.GetCatList(catid, "cat", editLangCurrent); } var strOut = NBrightBuyUtils.RazorTemplRenderList(razortemplate, 0, "", grpCats, TemplateRelPath, themefolder, Utils.GetCurrentCulture(), StoreSettings.Current.Settings()); return(strOut); }
private void PageLoad() { #region "Data Repeater" if (UserId > 0) // only logged in users can see data on this module. { if (Utils.IsNumeric(_entryid) && _entryid != "0") { var categoryData = CategoryUtils.GetCategoryData(Convert.ToInt32(_entryid), EditLanguage); base.DoDetail(rpData, categoryData.Info); } else { var navigationData = new NavigationData(PortalId, "CategoryAdmin"); // get search data var sInfo = new NBrightInfo(); sInfo.XMLData = navigationData.XmlData; // display search base.DoDetail(rpSearch, sInfo); var grpCats = new List <NBrightInfo>(); if (!String.IsNullOrEmpty(Edittype) && Edittype.ToLower() == "group") { var selgroup = GenXmlFunctions.GetGenXmlValue(navigationData.XmlData, "genxml/dropdownlist/groupsel"); if (selgroup == "") { selgroup = GenXmlFunctions.GetField(rpSearch, "groupsel"); } grpCats = NBrightBuyUtils.GetCatList(_openid, selgroup, EditLanguage); } else { grpCats = NBrightBuyUtils.GetCatList(_openid, "cat", EditLanguage); } rpData.DataSource = grpCats; rpData.DataBind(); } } #endregion // display header (Do header after the data return so the productcount works) base.DoDetail(rpDataH); // display footer base.DoDetail(rpDataF); }