Exemple #1
0
        public ActionResult Edit(long id)
        {
            var model    = Articles.ArticleInfoToVModel(Articles.GetArticleInfo(id));
            var typeinfo = ArticleTypes.GetArticleTypeInfo(model.Type);

            model.TypeName = typeinfo != null ? typeinfo.Name : "未知";
            return(View(model));
        }
Exemple #2
0
        public ActionResult Edit(int id)
        {
            var model = ArticleTypes.ArticleTypeInfoToVModel(ArticleTypes.GetArticleTypeInfo(id));

            if (model.PId != 0)
            {
                var parent = ArticleTypes.GetArticleTypeInfo(model.PId);
                if (parent != null)
                {
                    model.PName = parent.Name;
                }
            }
            return(View(model));
        }
        public ActionResult Edit(int id)
        {
            var model = ArticleTypes.ArticleTypeInfoToVModel(ArticleTypes.GetArticleTypeInfo(id));

            return(View(model));
        }