• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CategoryInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CategoryInfo的典型用法代码示例。如果您正苦于以下问题:C# CategoryInfo类的具体用法?C# CategoryInfo怎么用?C# CategoryInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CategoryInfo类属于命名空间,在下文中一共展示了CategoryInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CateModel

 public CateModel()
 {
     Category = new CategoryInfo();
     CateSelectItem = new List<SelectListItem>();
     CateType = new List<SelectListItem>();
     CateList = new List<CategoryInfo>();
 }
开发者ID:robotbird,项目名称:jqpress,代码行数:7,代码来源:CateModel.cs


示例2: UpdateCategory

        public int UpdateCategory(CategoryInfo category)
        {
            CheckSlug(category);

            string cmdText = @"update [loachs_terms] set
                                [Type][email protected],
                                [Name][email protected],
                                [Slug][email protected],
                                [Description][email protected],
                                [Displayorder][email protected],
                                [Count][email protected],
                                [CreateDate][email protected]
                                where [email protected]";
            OleDbParameter[] prams = {
                                OleDbHelper.MakeInParam("@Type",OleDbType.Integer,1,(int)TermType.Category),
                                OleDbHelper.MakeInParam("@Name",OleDbType.VarWChar,255,category.Name),
                                OleDbHelper.MakeInParam("@Slug",OleDbType.VarWChar,255,category.Slug),
                                OleDbHelper.MakeInParam("@Description",OleDbType.VarWChar,255,category.Description),
                                OleDbHelper.MakeInParam("@Displayorder",OleDbType.Integer,4,category.Displayorder),
                                OleDbHelper.MakeInParam("@Count",OleDbType.Integer,4,category.Count),
                                OleDbHelper.MakeInParam("@CreateDate",OleDbType.Date,8,category.CreateDate),
                                OleDbHelper.MakeInParam("@termid",OleDbType.Integer,1,category.CategoryId),
                            };
            return Convert.ToInt32(OleDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams));
        }
开发者ID:azraelrabbit,项目名称:LoachsMono,代码行数:25,代码来源:Category.cs


示例3: Update

 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static int Update(CategoryInfo model)
 {
     string strSQL = "UPDATE Categories SET Name = @Name,Sort = @Sort,ImageUrl = @ImageUrl,LinkUrl = @LinkUrl,Introduction = @Introduction,Alias = @Alias,TemplateType = @TemplateType,IsShowFirstChildNode = @IsShowFirstChildNode,BannerAdImageUrl = @BannerAdImageUrl,IsEnabled = @IsEnabled,IsDeleted = @IsDeleted WHERE ID = @ID";
     SqlParameter[] parms = { 
                             new SqlParameter("ParentId",SqlDbType.Int),
                             new SqlParameter("ParentIdList",SqlDbType.NVarChar),
                             new SqlParameter("Sort",SqlDbType.Int),
                             new SqlParameter("Name",SqlDbType.NVarChar),
                             new SqlParameter("ImageUrl",SqlDbType.NVarChar),
                             new SqlParameter("LinkUrl",SqlDbType.NVarChar),
                             new SqlParameter("Introduction",SqlDbType.NVarChar),
                             new SqlParameter("Alias",SqlDbType.NVarChar),
                             new SqlParameter("TemplateType",SqlDbType.Int),
                             new SqlParameter("IsShowFirstChildNode",SqlDbType.Int),
                             new SqlParameter("BannerAdImageUrl",SqlDbType.NVarChar),
                             new SqlParameter("IsEnabled",SqlDbType.Int),
                             new SqlParameter("IsDeleted",SqlDbType.Int),
                             new SqlParameter("Id",SqlDbType.Int),
                            };
     parms[0].Value = model.ParentId;
     parms[1].Value = model.ParentIdList;
     parms[2].Value = model.Sort;
     parms[3].Value = model.Name == null ? string.Empty : model.Name;
     parms[4].Value = model.ImageUrl == null ? string.Empty : model.ImageUrl;
     parms[5].Value = model.LinkUrl == null ? string.Empty : model.LinkUrl;
     parms[6].Value = model.Introduction == null ? string.Empty : model.Introduction;
     parms[7].Value = model.Alias == null ? string.Empty : model.Alias;
     parms[8].Value = model.TemplateType;
     parms[9].Value = model.IsShowFirstChildNode;
     parms[10].Value = model.BannerAdImageUrl == null ? string.Empty : model.BannerAdImageUrl;
     parms[11].Value = model.IsEnabled;
     parms[12].Value = model.IsDeleted;
     parms[13].Value = model.Id;
     return Goodspeed.Library.Data.SQLPlus.ExecuteNonQuery(CommandType.Text,strSQL,parms);
 }
开发者ID:xbf321,项目名称:Elco,代码行数:40,代码来源:CategoryManage.cs


示例4: UpdateCategory

        public int UpdateCategory(CategoryInfo category)
        {
            CheckSlug(category);

            string cmdText = string.Format(@"update [{0}category] set
                                [Type][email protected],
                                [ParentId][email protected],
                                [CateName][email protected],
                                [Slug][email protected],
                                [Description][email protected],
                                [SortNum][email protected],
                                [PostCount][email protected],
                                [CreateTime][email protected]
                                where [email protected]", ConfigHelper.Tableprefix);
            OleDbParameter[] prams = {
                                OleDbHelper.MakeInParam("@Type",OleDbType.Integer,1,(int)CategoryType.Category),
                                OleDbHelper.MakeInParam("@ParentId",OleDbType.Integer,4,category.ParentId),
                                OleDbHelper.MakeInParam("@CateName",OleDbType.VarWChar,255,category.CateName),
                                OleDbHelper.MakeInParam("@Slug",OleDbType.VarWChar,255,category.Slug),
                                OleDbHelper.MakeInParam("@Description",OleDbType.VarWChar,255,category.Description),
                                OleDbHelper.MakeInParam("@SortNum",OleDbType.Integer,4,category.SortNum),
                                OleDbHelper.MakeInParam("@PostCount",OleDbType.Integer,4,category.PostCount),
                                OleDbHelper.MakeInParam("@CreateTime",OleDbType.Date,8,category.CreateTime),
                                OleDbHelper.MakeInParam("@categoryid",OleDbType.Integer,1,category.CategoryId),
                            };
            return Convert.ToInt32(OleDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams));
        }
开发者ID:robotbird,项目名称:jqpress-aspx,代码行数:27,代码来源:CategoryData.cs


示例5: Save

        public JsonResult Save(CategoryInfo cat)
        {
            if (string.IsNullOrEmpty(cat.PageName))
            {
                cat.PageName = cat.CateName;
            }

            cat.PageName = HttpHelper.HtmlEncode(StringHelper.FilterPageName(cat.PageName, "cate"));

            if (cat.CategoryId > 0)
            {
                var  oldcat = _categoryService.GetCategory(cat.CategoryId);
                cat.CreateTime = oldcat.CreateTime;
                cat.PostCount = oldcat.PostCount;
                _categoryService.UpdateCategory(cat);
            }
            else
            {
                cat.CreateTime = DateTime.Now;
                cat.PostCount = 0;
                cat.CategoryId = _categoryService.InsertCategory(cat);
            }
            cat.TreeChar = _categoryService.GetCategoryTreeList().Find(c => c.CategoryId == cat.CategoryId).TreeChar;

            return Json(cat, JsonRequestBehavior.AllowGet);
        }
开发者ID:robotbird,项目名称:jqpress,代码行数:26,代码来源:CategoryController.cs


示例6: Compare

 public int Compare(CategoryInfo info)
 {
     if (this.Equals(info)) {
         return 0;
     }
     try {
         Text[] texts = info.GetComponentsInChildren<Text>();
         for (int i = 0; i < texts.Length; i++) {
             if (texts[i].name.Equals("Rate")) {
                 float otherNumber = float.Parse(texts[i].text);
                 float myNumber = float.Parse(this.rate.text);
                 //There's no equal or approximate relations. Being thorough here.
                 if (myNumber < otherNumber) {
                     //Other number is larger, so we are smaller in comparison.
                     return -1;
                 }
                 else if (myNumber > otherNumber) {
                     //Other number is smaller, so we are larger in comparison.
                     return 1;
                 }
                 break;
             }
         }
     }
     catch (System.Exception e) {
         Debug.LogError("Error parsing data from Category Info: " + e.ToString());
     }
     return -1;
 }
开发者ID:tommai78101,项目名称:Multiplier,代码行数:29,代码来源:CategoryInfo.cs


示例7: InsertCategory

        /// <summary>
        /// 添加分类
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        public int InsertCategory(CategoryInfo category)
        {
            CheckSlug(category);

            string cmdText = @"insert into [loachs_terms]
                            (
                            [Type],[Name],[Slug],[Description],[Displayorder],[Count],[CreateDate]
                            )
                            values
                            (
                            @Type,@Name,@Slug,@Description,@Displayorder,@Count,@CreateDate
                            )";
            OleDbParameter[] prams = {
                                OleDbHelper.MakeInParam("@Type",OleDbType.Integer,1,(int)TermType.Category),
                                OleDbHelper.MakeInParam("@Name",OleDbType.VarWChar,255,category.Name),
                                OleDbHelper.MakeInParam("@Slug",OleDbType.VarWChar,255,category.Slug),
                                OleDbHelper.MakeInParam("@Description",OleDbType.VarWChar,255,category.Description),
                                OleDbHelper.MakeInParam("@Displayorder",OleDbType.Integer,4,category.Displayorder),
                                OleDbHelper.MakeInParam("@Count",OleDbType.Integer,4,category.Count),
                                OleDbHelper.MakeInParam("@CreateDate",OleDbType.Date,8,category.CreateDate)
                            };
            OleDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams);

            int newId = Convert.ToInt32(OleDbHelper.ExecuteScalar("select top 1 [termid] from [loachs_terms] order by [termid] desc"));

            return newId;
        }
开发者ID:azraelrabbit,项目名称:LoachsMono,代码行数:32,代码来源:Category.cs


示例8: Update

        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="mod">CategoryInfo</param>
        /// <returns>受影响行数</returns>
        public int Update(CategoryInfo mod)
        {
           using (DbConnection conn = db.CreateConnection())
			{
				conn.Open();
				using (DbTransaction tran = conn.BeginTransaction())
				{ 
					try
					{ 
						using (DbCommand cmd = db.GetStoredProcCommand("SP_Category_Update"))
						{
							db.AddInParameter(cmd, "@CategoryID", DbType.Int32, mod.CategoryID); 
							db.AddInParameter(cmd, "@CategoryName", DbType.String, mod.CategoryName); 
							db.AddInParameter(cmd, "@State", DbType.Int32, mod.State); 
							db.AddInParameter(cmd, "@IsDeleted", DbType.Int32, mod.IsDeleted); 
							db.AddInParameter(cmd, "@Sort", DbType.Int32, mod.Sort); 
							tran.Commit();
							return db.ExecuteNonQuery(cmd);
						} 
					}
					catch (Exception e)
					{
						tran.Rollback();
						throw e;
					}
					finally
					{
						conn.Close();
					}
				}
			}
        }  
开发者ID:aNd1coder,项目名称:Wojoz,代码行数:37,代码来源:CategoryDAL.cs


示例9: Delete

 /// <summary>
 /// 删除分类
 /// </summary>
 /// <param name="category"></param>
 /// <returns></returns>
 public int Delete(CategoryInfo category)
 {
     string cmdText = string.Format("delete from [{0}category] where [categoryid] = @categoryid", ConfigHelper.Tableprefix);
     using (var conn = new DapperHelper().OpenConnection())
     {
         return conn.Execute(cmdText, new { categoryid = category.CategoryId });
     }
 }
开发者ID:robotbird,项目名称:jqpress,代码行数:13,代码来源:CategoryRepository.cs


示例10: SerializeInternal

 private void SerializeInternal(CategoryInfo model, IDictionary<string, object> result)
 { 
     result.Add("categoryid", model.CategoryID);
     result.Add("categoryname", model.CategoryName);
     result.Add("state", model.State);
     result.Add("isdeleted", model.IsDeleted);
     result.Add("sort", model.Sort);
 }
开发者ID:aNd1coder,项目名称:Wojoz,代码行数:8,代码来源:CategoryJavascriptConverter.cs


示例11: CheckReadPermission

 private void CheckReadPermission(CategoryInfo category)
 {
     if ((category != null) && (category.CategoryUserID != currentUser.UserID))
     {
         // Check read permission for Categories module
         if (!currentUser.IsAuthorizedPerResource("CMS.Categories", "Read"))
         {
             RedirectToAccessDenied("CMS.Categories", "Read");
         }
     }
 }
开发者ID:kbuck21991,项目名称:kentico-blank-project,代码行数:11,代码来源:CategoryEdit.aspx.cs


示例12: InsertCategory

 public int InsertCategory(CategoryInfo category)
 {
     SqlConnection conn;
     int count = 0;
     using (conn = SqlHelper.CreateConntion())
     {
         conn.Open();
         count = categoryDal.InsertCategory(category, conn);
         conn.Close();
     }
     return count;
 }
开发者ID:uwitec,项目名称:my-shop-manage,代码行数:12,代码来源:CategoryService.cs


示例13: RenderLeftCategoryMenu

        public ActionResult RenderLeftCategoryMenu(CategoryInfo currentCategoryInfo, CategoryInfo rootCategoryInfo,string linkFormat)
        {          

            int rootId = rootCategoryInfo.Id;
            StringBuilder sbHtml = new StringBuilder();
            var allCatList = CategoryService.ListAllSubCatById(rootId).Where(p => p.IsDeleted == false && p.IsEnabled == true);

            Action<IEnumerable<CategoryInfo>, int, int, StringBuilder> fb = null;
            fb = (catList, parentId, level, sb) =>
            {
                var tempList = catList.Where(p => p.ParentId == parentId).OrderBy(p => p.Sort);

                string className = parentId == rootId ? "category-menu" : "none";
                sb.AppendFormat("<ul class=\"{0}\" {1}>", className, parentId == rootId ? "id=\"category_menu\"" : string.Empty);

                if (tempList.Count() == 0)
                {
                    //如果没有分类,则显示父分类名称
                    sbHtml.AppendFormat("<li class=\"on\"><a href=\"{1}\">{0}</a></li>", rootCategoryInfo.Name, Request.Url.AbsolutePath);
                }
                else
                {

                    foreach (var item in tempList)
                    {
                        //判断是否子分类
                        var ishasChild = catList.Where(p => p.ParentId == item.Id).Count() > 0;

                        if (currentCategoryInfo != null && currentCategoryInfo.Id == item.Id)
                        {
                            sb.Append("<li class=\"on\">");
                        }
                        else
                        {
                            sb.Append("<li>");
                        }
                        sb.AppendFormat("<a href=\"{3}\" id=\"d_menu_{1}\" title=\"{0}\" class=\"{2}\">{0}</a>", item.Name, item.Id, ishasChild ? "sub-icon" : string.Empty,string.IsNullOrEmpty(linkFormat) ? item.Url : string.Format(linkFormat,item.Id));


                        if (ishasChild)
                        {
                            fb(catList, item.Id, level + 1, sb);
                        }
                        sb.Append("</li>");
                    }
                }
                sb.Append("</ul>");
            };
            fb(allCatList, rootId, 0, sbHtml);

            return Content(sbHtml.ToString());
        }
开发者ID:xbf321,项目名称:Elco,代码行数:52,代码来源:HomeController.cs


示例14: Create

 /// <summary>
 /// 添加或更新分类信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns>主键ID</returns>
 public static int Create(CategoryInfo model)
 {
     if (model.Id == 0)
     {
         //Insert
         int i = CategoryManage.Insert(model);
         model.Id = i;
     }
     else
     {
         //Update
         CategoryManage.Update(model);
     }
     return model.Id;
 }
开发者ID:xbf321,项目名称:Elco,代码行数:20,代码来源:CategoryService.cs


示例15: btnEdit_Click

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            CategoryInfo term = new CategoryInfo();
            if (Operate == OperateType.Update)
            {
                term = CategoryManager.GetCategory(categoryId);
            }
            else
            {
                term.CreateDate = DateTime.Now;
                term.Count = 0;
            }
            term.Name = StringHelper.HtmlEncode(txtName.Text);
            term.Slug = txtSlug.Text.Trim();
            if (string.IsNullOrEmpty(term.Slug))
            {
                term.Slug = term.Name;
            }

            term.Slug = StringHelper.HtmlEncode(PageUtils.FilterSlug(term.Slug, "cate"));

            term.Description = StringHelper.HtmlEncode(txtDescription.Text);
            term.Displayorder = StringHelper.StrToInt(txtDisplayOrder.Text, 1000);

            if (term.Name == "")
            {
                ShowError("请输入名称!");
                return;
            }

            if (Operate == OperateType.Update)
            {
                CategoryManager.UpdateCategory(term);
                Response.Redirect("categorylist.aspx?result=2");
            }
            else
            {
                CategoryManager.InsertCategory(term);
                Response.Redirect("categorylist.aspx?result=1");
            }
        }
开发者ID:azraelrabbit,项目名称:LoachsMono,代码行数:46,代码来源:categorylist.aspx.cs


示例16: LoadExtensionInfo

        private void LoadExtensionInfo(CategoryInfo currentCatInfo) {
            CategoryInfo rootCatInfo = currentCatInfo;

            //获取当前节点的顶级父节点
            //可以是未启用的,因为有的列表就是页面顶部导航不显示,但是左边需要显示
            //不显示已删除的
            var _rootCatInfo = CategoryService.ListUpById(currentCatInfo.Id).Where(p => p.IsDeleted == false).FirstOrDefault();
            if (_rootCatInfo != null)
            {
                rootCatInfo = _rootCatInfo;
            }
            //是否显示子分类的首节点
            //如果是,当前节点更改为子节点
            //只显示启用的以及未删除的
            if (currentCatInfo.IsShowFirstChildNode)
            {
                var firstChildNode = CategoryService.ListByParentId(currentCatInfo.Id).Where(p => (p.IsDeleted == false && p.IsEnabled == true)).FirstOrDefault();
                if (firstChildNode != null)
                {
                    currentCatInfo = firstChildNode;
                }
            }
            ViewBag.RootCategoryInfo = rootCatInfo;
            ViewBag.CurrentCategoryInfo = currentCatInfo;

            //模板类型
            switch (currentCatInfo.TemplateType)
            {
                case (int)TemplateType.ArticleList:
                case (int)TemplateType.ArticleListWithImage:
                    int pageIndex = CECRequest.GetQueryInt("page", 1);
                    ViewBag.ArticleList = ArticleService.List(new ArticleSearchSetting
                    {
                        PageIndex = pageIndex,
                        CategoryId = currentCatInfo.Id,
                        IsOnlyShowPublished = true
                    });
                    break;
            }
            
        }
开发者ID:xbf321,项目名称:Elco,代码行数:41,代码来源:ChannelController.cs


示例17: CreateCategoryDialog_OkButtonClicked

    protected void CreateCategoryDialog_OkButtonClicked(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            CategoryInfo entity = new CategoryInfo();
            entity.CategoryName = CategoryNameTextBox.Text.ToString().Trim();
            entity.Visible = VisibleCheckBox.Checked;
            ClassroomController.InsertCategory(ref entity);

            CreateCategoryDialog.Reset();
            DataBind();
            OnCategoryCreated(EventArgs.Empty);
            //Response.Redirect("~/Admin/Categories/Default.aspx");

        }
        else
        {
            ValidationHelper.SetFocusToFirstError(this.Page, "create_category");
        }
       
    }
开发者ID:IdeaFortune,项目名称:Monaco,代码行数:21,代码来源:CreateCategoryDialog.ascx.cs


示例18: InsertCategory

        /// <summary>
        /// 添加分类
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        public int InsertCategory(CategoryInfo category)
        {
            CheckSlug(category);

            string cmdText = string.Format(@"insert into [{0}category]
                            ([Type],[ParentId],[CateName],[Slug],[Description],[SortNum],[PostCount],[CreateTime])
                            values
                            ( @Type,@ParentId,@CateName,@Slug,@Description,@SortNum,@PostCount,@CreateTime)", ConfigHelper.Tableprefix);
            OleDbParameter[] prams = {
                                OleDbHelper.MakeInParam("@Type",OleDbType.Integer,1,(int)CategoryType.Category),
                                OleDbHelper.MakeInParam("@ParentId",OleDbType.Integer,4,category.ParentId),
                                OleDbHelper.MakeInParam("@CateName",OleDbType.VarWChar,255,category.CateName),
                                OleDbHelper.MakeInParam("@Slug",OleDbType.VarWChar,255,category.Slug),
                                OleDbHelper.MakeInParam("@Description",OleDbType.VarWChar,255,category.Description),
                                OleDbHelper.MakeInParam("@SortNum",OleDbType.Integer,4,category.SortNum),
                                OleDbHelper.MakeInParam("@PostCount",OleDbType.Integer,4,category.PostCount),
                                OleDbHelper.MakeInParam("@CreateTime",OleDbType.Date,8,category.CreateTime)
                            };
            OleDbHelper.ExecuteScalar(CommandType.Text, cmdText, prams);

            int newId = Convert.ToInt32(OleDbHelper.ExecuteScalar(string.Format("select top 1 [categoryid] from [{0}category] order by [categoryid] desc",ConfigHelper.Tableprefix)));

            return newId;
        }
开发者ID:robotbird,项目名称:jqpress-aspx,代码行数:29,代码来源:CategoryData.cs


示例19: Insert

        /// <summary>
        /// 插入
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static int Insert(CategoryInfo model)
        {
            string strSQL = "INSERT INTO Categories(ParentId,ParentIdList,Sort,Name,ImageUrl,LinkUrl,Introduction,CreateDateTime,Alias,TemplateType,IsShowFirstChildNode,BannerAdImageUrl,IsEnabled,[Language]) VALUES(@parentId,@parentIdList,@Sort,@Name,@ImageUrl,@LinkUrl,@Introduction,GETDATE(),@Alias,@TemplateType,@IsShowFirstChildNode,@BannerAdImageUrl,@IsEnabled,@Language);SELECT @@IDENTITY;";
            SqlParameter[] parms = {
                                    new SqlParameter("ParentId",SqlDbType.Int),
                                    new SqlParameter("ParentIdList",SqlDbType.NVarChar),
                                    new SqlParameter("Sort",SqlDbType.Int),
                                    new SqlParameter("Name",SqlDbType.NVarChar),
                                    new SqlParameter("ImageUrl",SqlDbType.NVarChar),
                                    new SqlParameter("LinkUrl",SqlDbType.NVarChar),
                                    new SqlParameter("Introduction",SqlDbType.NVarChar),
                                    new SqlParameter("Alias",SqlDbType.NVarChar),
                                    new SqlParameter("TemplateType",SqlDbType.Int),
                                    new SqlParameter("IsShowFirstChildNode",SqlDbType.Int),
                                    new SqlParameter("BannerAdImageUrl",SqlDbType.NVarChar),
                                    new SqlParameter("IsEnabled",SqlDbType.Int),
                                    new SqlParameter("IsDeleted",SqlDbType.Int),
                                    new SqlParameter("Language",SqlDbType.SmallInt),
                                   };
            parms[0].Value = model.ParentId;
            parms[1].Value = model.ParentIdList;
            parms[2].Value = model.Sort;
            parms[3].Value = model.Name ?? string.Empty;
            parms[4].Value = model.ImageUrl ?? string.Empty ;
            parms[5].Value = model.LinkUrl ?? string.Empty;
            parms[6].Value = model.Introduction ?? string.Empty;
            parms[7].Value = model.Alias ?? string.Empty;
            parms[8].Value = model.TemplateType;
            parms[9].Value = model.IsShowFirstChildNode;
            parms[10].Value = model.BannerAdImageUrl ?? string.Empty ;
            parms[11].Value = model.IsEnabled;
            parms[12].Value = model.IsDeleted;
            parms[13].Value = (int)model.Language;

            return Convert.ToInt32(Goodspeed.Library.Data.SQLPlus.ExecuteScalar(CommandType.Text,strSQL,parms));
        }
开发者ID:xbf321,项目名称:Elco,代码行数:41,代码来源:CategoryManage.cs


示例20: PreselectCategory

 /// <summary>
 /// Preselects category in the tree.
 /// </summary>
 /// <param name="categoryObj">Category to be selected.</param>
 /// <param name="expandLast">Indicates, if selected ategori is to be expanded.</param>
 private void PreselectCategory(CategoryInfo categoryObj, bool expandLast)
 {
     if (categoryObj != null)
     {
         // Decide which tree will be affected
         if (categoryObj.CategoryIsPersonal)
         {
             treeElemP.SelectPath = categoryObj.CategoryIDPath;
             treeElemP.SelectedItem = categoryObj.CategoryName;
             treeElemP.ExpandPath = categoryObj.CategoryIDPath + (expandLast ? "/" : "");
         }
         else
         {
             treeElemG.SelectPath = categoryObj.CategoryIDPath;
             treeElemG.SelectedItem = categoryObj.CategoryName;
             treeElemG.ExpandPath = categoryObj.CategoryIDPath + (expandLast ? "/" : "");
         }
     }
 }
开发者ID:jiva,项目名称:Kentico,代码行数:24,代码来源:Categories.ascx.cs



注:本文中的CategoryInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CategoryModel类代码示例发布时间:2022-05-24
下一篇:
C# Category类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap