本文整理汇总了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());
}
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例6: Add
public Guid Add(string name, CategoryType type, int? num)
{
CategoryDomain domain = new CategoryDomain(name, type, num);
unitOfWork.Commit();
return domain.Entity.Id;
}
示例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);
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
}
示例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;
}
示例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);
}