public string GetCateName(object Value) { if ((Value != null) && (Value.ToString().Length > 0)) { Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories(); int categoryId = Globals.SafeInt(Value.ToString(), 0); if (categoryId > 0) { Maticsoft.Model.SNS.Categories model = categories.GetModel(categoryId); if (model != null) { return model.Name; } } } return "暂无分类对应"; }
private void ShowInfo(int CategoryId) { Maticsoft.Model.SNS.Categories model = new Maticsoft.BLL.SNS.Categories().GetModel(CategoryId); this.lblCategoryId.Text = model.CategoryId.ToString(); this.lblName.Text = model.Name; this.lblDescription.Text = model.Description; this.lblParentID.Text = model.ParentID.ToString(); this.lblPath.Text = model.Path; this.lblDepth.Text = model.Depth.ToString(); this.lblSequence.Text = model.Sequence.ToString(); this.lblHasChildren.Text = model.HasChildren ? "是" : "否"; this.lblIsMenu.Text = model.IsMenu ? "是" : "否"; this.lblType.Text = model.Type.ToString(); this.lblMenuIsShow.Text = model.MenuIsShow ? "是" : "否"; this.lblMenuSequence.Text = model.MenuSequence.ToString(); this.lblCreatedUserID.Text = model.CreatedUserID.ToString(); this.lblCreatedDate.Text = model.CreatedDate.ToString(); this.lblStatus.Text = model.Status.ToString(); }
private void ShowInfo(int CategoryId) { Maticsoft.Model.SNS.Categories model = new Maticsoft.BLL.SNS.Categories().GetModel(CategoryId); this.txtName.Text = model.Name; this.txtDescription.Text = model.Description; this.textFontColor.Text = model.FontColor; this.txtSeoTitle.Text = model.Meta_Title; this.txtSeoKeywords.Text = model.Meta_Keywords; this.txtSeoDescription.Text = model.Meta_Description; if (model.MenuIsShow) { this.rbIsMenuShow.SelectedIndex = 0; } else { this.rbIsMenuShow.SelectedIndex = 1; } if (model.IsMenu) { this.radlState.SelectedIndex = 0; } else { this.radlState.SelectedIndex = 1; } if (model.Status == 0) { this.rbIsused.SelectedIndex = 1; } else { this.rbIsused.SelectedIndex = 0; } }
protected string GetCategoryName(object target) { string str = string.Empty; if (StringPlus.IsNullOrEmpty(target)) { return str; } Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories(); int categoryId = Globals.SafeInt(target.ToString(), 0); Maticsoft.Model.SNS.Categories model = categories.GetModel(categoryId); if (model != null) { return model.Name; } return ""; }
public PartialViewResult MenuCategory(int Top = -1, string ViewName = "MenuCategory") { List<Maticsoft.Model.SNS.Categories> menuByCategory = new Maticsoft.BLL.SNS.Categories().GetMenuByCategory(Top); return this.PartialView(ViewName, menuByCategory); }
public PartialViewResult CategoryDetailPart(int topcid, string Name, int topcate = 5, int top = 12) { Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories(); categories.GetMenuByCategory(-1); ProductCategory cateListByParentIdEx = categories.GetCateListByParentIdEx(topcid); cateListByParentIdEx.TagsList = this.TagTypeBll.GetTagListByCid(topcid, topcate); ProductQuery query = new ProductQuery { CategoryID = new int?(topcid), IsTopCategory = true, Order = "popular" }; string valueByCache = Maticsoft.BLL.SysManage.ConfigSystem.GetValueByCache("HomeGetValueType"); if (valueByCache != null) { int num = 1; if (valueByCache == num.ToString()) { query.IsRecomend = 1; } } cateListByParentIdEx.CurrentCateName = Name; return this.PartialView("CategoryDetailPart", cateListByParentIdEx); }
public static IPageSetting GetPhotoListSetting(int cid, ApplicationKeyType applicationType = 1) { Maticsoft.Model.SNS.Categories modelByCache = new Maticsoft.BLL.SNS.Categories().GetModelByCache(cid); PageSetting setting = new PageSetting("PhotoList", applicationType); if (setting._title.IndexOf("{hostname}", StringComparison.Ordinal) > -1) { setting._title = PageSettingBase.ReplaceHostName(setting._title); } if ((modelByCache != null) && !string.IsNullOrWhiteSpace(modelByCache.Meta_Title)) { setting._title = PageSettingBase.ReplaceHostName(modelByCache.Meta_Title); } if (setting._keywords.IndexOf("{hostname}", StringComparison.Ordinal) > -1) { setting._keywords = PageSettingBase.ReplaceHostName(setting._keywords); } if ((modelByCache != null) && !string.IsNullOrWhiteSpace(modelByCache.Meta_Keywords)) { setting._keywords = PageSettingBase.ReplaceHostName(modelByCache.Meta_Keywords); } if (setting._description.IndexOf("{hostname}", StringComparison.Ordinal) > -1) { setting._description = PageSettingBase.ReplaceHostName(setting._description); } if ((modelByCache != null) && !string.IsNullOrWhiteSpace(modelByCache.Meta_Description)) { setting._description = PageSettingBase.ReplaceHostName(modelByCache.Meta_Description); } return setting; }
public static string GetProductUrl(Maticsoft.Model.SNS.Products productInfo) { Maticsoft.BLL.SNS.Categories categories = new Maticsoft.BLL.SNS.Categories(); string valueByCache = Maticsoft.BLL.SysManage.ConfigSystem.GetValueByCache("ProductStaticRoot"); valueByCache = (valueByCache.LastIndexOf("/") > -1) ? valueByCache : (valueByCache + "/"); int id = productInfo.CategoryID.HasValue ? productInfo.CategoryID.Value : -1; return string.Concat(new object[] { valueByCache, categories.GetUrlByIdCache(id), "/", productInfo.ProductID, ".html" }).Replace("--", "-").ToLower(); }