Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

how Replace an Enum with a database Table in Cuyahoga or Nhibernate Options
Bangaram
Posted: Thursday, October 7, 2010 2:14:10 AM
Rank: Newbie
Groups: Member

Joined: 7/3/2010
Posts: 6
Points: 18
Hi ,

We have a module called 'Articles' in cuyahoga CMS. This Article module contain category. and we have a corresponding table in the cms called dbo.cm_artclecategory and also we added enum with the name category in the ArticleModule.cs class.
This category enum maps to the values in the dbo.cm_artclecategory Table.

When ever we have to add a new category in to the CMS. we have to modify the enum with the new cateroy. this is we dont want to.

Could you please let me know how to replace this enum in the code. so that the cms can dynamically pick the category from the database.

for ex
public enum Category
{
News = 6,
Blogs =7,
InsuranceGuides = 10,
BusinessGuides = 11,
}
and also the same values in the cm_artclecategory Table
martijnb
Posted: Thursday, October 7, 2010 4:51:11 AM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
Why did you add the enum in the first place?
Bangaram
Posted: Thursday, October 7, 2010 6:25:58 AM
Rank: Newbie
Groups: Member

Joined: 7/3/2010
Posts: 6
Points: 18
hi Martijnb,

Thnks for viewing my query

The enum list was showing on the custom drop down on the section settings in the cms.
for example if a module has a section setting category. it shows on the category dropdown in the editsection page

thanks
Raj
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.