|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
HI
Hope all is well. I wold just like to know how do I go about customizing the registration process? What I would like to do is basically once a user registers, we as the 'administrator' would first like to access the new user then if the user meets a certain criteria, we then activate or instantiate the account
Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
I think you would be best creating your own registration module. It would not be that difficult. I have done before and soon again must create a customised registration module.
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi
Thanks for the reply. I really appreciate it. This is the first time I am taking up such a project. Do you have any pointers to give me when undertaking this task?
Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
This post (made quite recently!) is a good place to start: http://www.cuyahoga-project.org/home/forum.aspx?g=posts&t=1347There are some documents on this site also: http://www.cuyahoga-project.org/home/developers.aspxCheck out the module developer document. It all may seem a little daunting at first but when you get the information inside your head it will trigger lots of ideas and possibilities. It is worth the effort!
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi
Thanks again for all the resources I really really appreciate, do you perhaps know of any other tutorial around that takes through creating a data driven module?
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote:Hi
Thanks again for all the resources I really really appreciate, do you perhaps know of any other tutorial around that takes through creating a data driven module? If you post or email a SQL Server Table (or even type the fields here) I can send you an installable module for you to examine and back engineer to understand how it is put together. You will be then able to view the structure and see how the install/uninstall scripts, NHibernate mappings and POCO's, module class, module and module admin all relate to each other. Also the post build events etc. It may sound complicated but it really is not too bad.
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi
Thank you, thank you so much
EmployTable -strName -strSurname -intDepartmentID
DeparmentTable -intDepartmentID -strDepartment
Hope the above suffices
Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote:Hi
Thank you, thank you so much
EmployTable -strName -strSurname -intDepartmentID
DeparmentTable -intDepartmentID -strDepartment
Hope the above suffices
Regards Farhad
I will post this later today.
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
Here is the test module. You need to unpack the files and add the folder to your solution (right click > add existing item > browse to the project and add it). Build the solution. You may need to add some references. When you are looking at how it is put together one thing to remember (as it puzzled me when I started building modules). The NHibernate mapping files need each to have their build actions set to 'Embedded Resource'. If not you get errors. This frustrated me when I first made a module. I hope this helps people begin to get an understanding of modules. File Attachment(s): Cuyahoga.Modules.Company.zip (16kb) downloaded 74 time(s).
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi
Firstly....thank you soooo much for your assistance, it's been great and much appreciated.
I will get my head around this and let you know my progress.
Thanks again
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi
Thanks again for the module..it is helping me alot.
I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one... and could you perhaps exlpain the bag tags
Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote:Hi
Thanks again for the module..it is helping me alot.
I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one... and could you perhaps exlpain the bag tags
Regards
Here is a rundown of NHibernate Mapping. It helped me a lot and I like the no-nonsense to the point way it is written, see: https://www.hibernate.org/hib_docs/nhibernate/html/mapping.htmlIn short the < bag> is just one way to declare a collection in the mapping. Others being < set>, < list>, < map>, < bag>, < array> and < primitive-array>. For more on this see: https://www.hibernate.org/hib_docs/nhibernate/html/collections.html It is also worth while looking deeper at the other documentation. You can do this later after you get things working. With the collections mapped you can do things like this: Code:Employee emp = _module.GetEmployee({Id}); string theEmployeesDepartment = emp.ParentDepartment.Name; From the Employee object you can get to the Department object (or the related Department table content) via ParentDepartment directly. So you can traverse the object tree. When you have a few tables linked and you need to get related information (objects) easily then this is REALLY great. This is not the clearest way of putting it. Just check the links and things should become clear.
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Constructor wrote:bheeks wrote:Hi
Thanks again for the module..it is helping me alot.
I am currently looking at the hbm.xml files. Is it mandatory to have the relationship tags i.e. many-to-one... and could you perhaps exlpain the bag tags
Regards
Here is a rundown of NHibernate Mapping. It helped me a lot and I like the no-nonsense to the point way it is written, see: https://www.hibernate.org/hib_docs/nhibernate/html/mapping.htmlIn short the < bag> is just one way to declare a collection in the mapping. Others being < set>, < list>, < map>, < bag>, < array> and < primitive-array>. For more on this see: https://www.hibernate.org/hib_docs/nhibernate/html/collections.html It is also worth while looking deeper at the other documentation. You can do this later after you get things working. With the collections mapped you can do things like this: Code:Employee emp = _module.GetEmployee({Id}); string theEmployeesDepartment = emp.ParentDepartment.Name; From the Employee object you can get to the Department object (or the related Department table content) via ParentDepartment directly. So you can traverse the object tree. When you have a few tables linked and you need to get related information (objects) easily then this is REALLY great. This is not the clearest way of putting it. Just check the links and things should become clear. You don't perhaps have the mapping 2.0 xsd ?
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote: You don't perhaps have the mapping 2.0 xsd ?
I am unsure what you mean? What is wrong?
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Constructor wrote:bheeks wrote: You don't perhaps have the mapping 2.0 xsd ?
I am unsure what you mean? What is wrong? Hi My bad for not being a bit more clearer and I apologise. I was talking about the NHibernate xsd mapping file for Visual Studio to bring up the intelli-sense when creating the NHibernate mapping file I finally was able to download it after several attempts. Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote: Hi
My bad for not being a bit more clearer and I apologise. I was talking about the NHibernate xsd mapping file for Visual Studio to bring up the intelli-sense when creating the NHibernate mapping file I finally was able to download it after several attempts.
Regards
Oh, I now understand. You wanted intellisense for NHibernate Mapping. If you copy nhibernate-mapping-2.0.xsd (or other required version) and nhibernate-configuration-2.0.xsd (or other required version) from the install location to... C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml (or wherever VS.NET is installed) ...you will get IntelliSense and validation in the VS.NET XML editor when editing NHibernate mapping and configuration files. You may need to manually set the 'Schemas' properties value to this file. You can find this in the Visual Studio properties window when you have the mapping file open. The properties of the opened mapping file. You can get the .xsd files from here by downloading the package: http://sourceforge.net/projects/nhibernate/files/NHibernate/
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi Constructor
Going through the link I put up earlier(http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate), they mention adding the Domain classes to the NHibernate Configuration obj. I do not see this happening in the sample you provided. Does Cuyahoga engine add these domain classes to the NHibernate Config itself?
Regards
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
bheeks wrote:Hi Constructor
Going through the link I put up earlier(http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate), they mention adding the Domain classes to the NHibernate Configuration obj. I do not see this happening in the sample you provided. Does Cuyahoga engine add these domain classes to the NHibernate Config itself?
Regards If you are looking at how to use NHibernate then you do not have to worry about that when creating modules. This is only required when you use NHbernate in your own site. It is much simpler than this when creating modules. Cuyahoga takes care of all that. Just look at the module provided and the .pdf on how to create a Cuyahoga module. Take a look at the modules SQL install script. It adds an entry into the cuyahoga_moduleservice INSERT INTO cuyahoga_moduleservice (moduletypeid, servicekey, servicetype, classtype) VALUES (etc...etc...etc...) GO This is how you register your services... In short the module (whatever one you make) inherits the ModuleBase. public class MyNewModule : ModuleBaseThis has the NHibernate session from the current ASP.NET context in it: protected ISession NHSession Next you will be led into IOC
|
|
Rank: Member Groups: Member
Joined: 9/29/2009 Posts: 23 Points: 69
|
Hi Thanks for that...makes a lot of sense...you really are the pro in this huh? ..... I see that the classes have attributes i.e. [Tranactional] and so on. Where will I find more info on this?.... IOC?....International Olympic Committee?...lol...just kidding....okay poor joke...but what does IOC stand for?
|
|
Guest |