当前位置: 首页>>代码示例>>C#>>正文


C# CategoryType类代码示例

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


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

示例1: GetCategories

 /// <summary>
 /// Gets the categories for the specified category type.
 /// </summary>
 /// <param name="catType">Type of the cat.</param>
 /// <param name="activeOnly">if set to <c>true</c> [active only].</param>
 /// <returns></returns>
 public override ICollection<LinkCategory> GetCategories(CategoryType catType, bool activeOnly)
 {
     using (IDataReader reader = _procedures.GetCategory(null, null, activeOnly, BlogId, (int)catType))
     {
         return reader.ReadCollection(r => r.ReadLinkCategory());
     }
 }
开发者ID:rsaladrigas,项目名称:Subtext,代码行数:13,代码来源:LinkRepository.cs

示例2: TerrainPaintBrushCatalogResource

 public TerrainPaintBrushCatalogResource(int APIversion,
     uint version,
     uint brushVersion,
     Common common,
     BrushOperation normalOperation, BrushOperation oppositeOperation, TGIBlock profileTexture, BrushOrientation orientation,
     float width, float strength, byte baseTextureValue, float wiggleAmount,
     TGIBlock brushTexture,
     TerrainType terrain, CategoryType category
     )
     : base(APIversion,
         version,
         brushVersion,
         common,
         normalOperation,
         oppositeOperation,
         profileTexture,
         orientation,
         width,
         strength,
         baseTextureValue,
         wiggleAmount
     )
 {
     this.brushTexture = (TGIBlock)brushTexture.Clone(OnResourceChanged);
     this.terrain = terrain;
     this.category = category;
 }
开发者ID:dd-dk,项目名称:s3pi,代码行数:27,代码来源:TerrainPaintBrushCatalogResource.cs

示例3: GetCategory

       public IList<CategoryInfo> GetCategory(CategoryType categoryType, int categoryID)
       {
           SqlHelper objSqlHelper = new SqlHelper();
           
           List<CategoryInfo> categorys = new List<CategoryInfo>();
           SqlParameter[] objParams = new SqlParameter[2];
           objParams[0] = new SqlParameter("@categoryType", SqlDbType.Int, 4);
           objParams[1] = new SqlParameter("@categoryID", SqlDbType.Int, 4);
           objParams[0].Value = (int)categoryType;
           objParams[1].Value = categoryID;

           SqlDataReader reader = objSqlHelper.ExecuteReader("je_Cat_GetCategory", objParams); ;
           while (reader.Read())
           {
               
               CategoryInfo item = new CategoryInfo();
               item.CategoryID = reader.GetInt32(reader.GetOrdinal("categoryID"));
               item.CategoryName = reader.GetString(reader.GetOrdinal("categoryName"));
               item.ParentID = reader.GetInt32(reader.GetOrdinal("parentID"));
               item.IsMain = reader.GetBoolean(reader.GetOrdinal("IsMain"));
               categorys.Add(item);
           }
           reader.Close();
           objSqlHelper.close();
           
           return categorys;
       }
开发者ID:cathychen00,项目名称:003.DianZiShangWu,代码行数:27,代码来源:Category.cs

示例4: Adjust

 public Guid Adjust(Guid userId, decimal amount, CategoryType type, DateTime payDate, string remark)
 {
     var personalAccount = new PersonalAccountDomain(userId);
     var water = new PersonalAccountWaterDomain(personalAccount, amount, type, payDate, remark);
     unitOfWork.Commit();
     return water.Entity.Id;
 }
开发者ID:ufozy,项目名称:Account.Hexa.Core,代码行数:7,代码来源:PersonalAccountWaterApplication.cs

示例5: GetAll

        public List<CategoryDTO> GetAll(CategoryType type)
        {
            List<CategoryDTO> result = new List<CategoryDTO>();
            List<Category> data = _categoryRepository.GetAll(type);

            return ListToDTO<Category, CategoryDTO>(data);
        }
开发者ID:ufozy,项目名称:Account.Hexa.Core,代码行数:7,代码来源:CategoryApplication.cs

示例6: Add

        public Guid Add(string name, CategoryType type, int? num)
        {
            CategoryDomain domain = new CategoryDomain(name, type, num);
            unitOfWork.Commit();

            return domain.Entity.Id;
        }
开发者ID:ufozy,项目名称:Account.Hexa.Core,代码行数:7,代码来源:CategoryApplication.cs

示例7: AddCategoryUI

        /// <summary>
        /// Basic ctor that recieves an indicator of which category group
        ///  the category is being added to
        /// </summary>
        /// <param name="categoryType">Category group indicator</param>
        public AddCategoryUI(CategoryType categoryType)
        {
            InitializeComponent();
            CategoryType = categoryType;

            _context = new AccountingDataContext();
            _categoryService = new CategoryService(_context);
        }
开发者ID:stoiandan,项目名称:MyHome,代码行数:13,代码来源:AddCategoryUI.cs

示例8: Category

 public Category(string name, long categoryId, long parentId, CategoryType type, double seqNo)
 {
     this.categoryId = categoryId;
     this.name = name;
     this.parentId = parentId;
     this.type = type;
     this.seqNo = seqNo;
 }
开发者ID:wtain,项目名称:FinCalc,代码行数:8,代码来源:Category.cs

示例9: Add

 public long Add(string name, long parentId, CategoryType type)
 {
     string query = QueryBuilder.Insert("categories", GetNameColumnPair(name),
                                                           GetParentIdColumnPair(parentId),
                                                           GetTypeColumnPair(type));
     using (SQLiteCommand insert = new SQLiteCommand(query, m_conn))
         return (long) insert.ExecuteScalar();
 }
开发者ID:wtain,项目名称:FinCalc,代码行数:8,代码来源:CategoriesManager.cs

示例10: getCategoryFeature

 /// <summary>
 /// 
 /// </summary>
 public CategoryFeatureType getCategoryFeature(SiteCodeType site, CategoryType category)
 {
     Hashtable myCategoryMap = (Hashtable)_categoryFeaturesBySite[site];
      if(myCategoryMap != null) {
      return (CategoryFeatureType)myCategoryMap[category];
      }
      return null;
 }
开发者ID:fudder,项目名称:cs493,代码行数:11,代码来源:GetCategoryFeaturesHelper.cs

示例11: Insect

 /// <summary>
 /// 
 /// </summary>
 /// <param name="ID"></param>
 /// <param name="nickName"></param>
 /// <param name="age"></param>
 /// <param name="category"></param>
 /// <param name="gender"></param>
 /// <param name="canFly"></param>
 public Insect(string ID, string nickName, int age, CategoryType category, GenderType gender, bool canFly)
 {
     // TODO: Complete member initialization
     this.ID = ID;
     this.NickName = nickName;
     this.Age = age;
     this.Category = category;
     this.Gender = gender;
     this.canFly = canFly;
 }
开发者ID:dnacreative,项目名称:Animal-Motel,代码行数:19,代码来源:Insect.cs

示例12: Add

 private void Add(CodeBaseActionProxy action, CategoryType categoryType)
 {
     Category category;
     if(_categoriesByType.ContainsKey(categoryType))
         category = _categoriesByType[categoryType];
     else {
         category = new Category(categoryType);
         _categoriesByType[categoryType] = category;
     }
     category.Items.Add(action);
 }
开发者ID:DvdKhl,项目名称:dgrok,代码行数:11,代码来源:Catalog.cs

示例13: GetPrefix

 /// <summary>
 /// Translates the enumerated ValueType into the string prefixed used within the dictionary
 /// </summary>
 /// <param name="valueType">Enumeration value of the type</param>
 /// <returns>Enumerated ValueType into the string prefixed used within the dictionary</returns>
 private static string GetPrefix(CategoryType valueType)
 {
     switch (valueType)
     {
         case CategoryType.AlarmStates:          return AlarmStatesPrefix;
         case CategoryType.FaultCodes:           return FaultCodesPrefix;
         case CategoryType.BooleanTypes:         return BooleanTypesPrefix;
         case CategoryType.ConditionStates:      return ConditionStatePrefix;
         default: return InvalidPrefix;
     }
 }
开发者ID:shayaneumar,项目名称:gabbar,代码行数:16,代码来源:Translator.cs

示例14: Bird

 /// <summary>
 /// Constructor overloaded
 /// </summary>
 /// <param name="p"></param>
 /// <param name="p_2"></param>
 /// <param name="category"></param>
 /// <param name="gender"></param>
 /// <param name="wingSpan"></param>
 /// <param name="quaranteen"></param>
 /// <param name="numberOfDays"></param>
 public Bird(string p, string p_2, CategoryType category, GenderType gender, double wingSpan, bool quaranteen, int numberOfDays)
 {
     // TODO: Complete member initialization
     this.p = p;
     this.p_2 = p_2;
     this.Category = category;
     this.Gender = gender;
     this.wingSpan = wingSpan;
     this.quaranteen = quaranteen;
     this.NumberOfDays = numberOfDays;
 }
开发者ID:dnacreative,项目名称:Animal-Motel,代码行数:21,代码来源:Bird.cs

示例15: GetProductByPage

        public List<Product> GetProductByPage(int Page, int PageSize, CategoryType ct, bool IsDESC)
        {
            SqlParameter[] sprms = new SqlParameter[] {
                                        new SqlParameter("@CategoryType", ct.ToString()),
                                        new SqlParameter("@PageNumber",Page),
                                        new SqlParameter("@PageSize",PageSize)
            };

            DataTable dt = _dataAccess.Query("ProductAPI_GetProductsByPage", sprms);
            return EntityHelper<Product>.ConvertToList(dt);
        }
开发者ID:phamxuanlu,项目名称:MVC4-MobileStoreWeb,代码行数:11,代码来源:ProductAPI.cs


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