當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。