questions on login and integration

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
15 лет назад
I know this has already been asked.  Yes I can use this in my VB project.  That's wonderful, except I don't know how.  I'm afraid I'll need a bit of hand holding here, can someone walk me through how to add this to my VB website?

Also, does this integrate with the rest of the site's membership, or does it use it's own membership provider?

Diane
15 лет назад
Rewrite all .cs code to VB.NET (.vb) using http://www.developerfusion.com/tools/convert/csharp-to-vb/
Don't know if you have to make some modifications te .aspx pages, but if so, just read the error notifications.

Projects like Nop.Common don't have to be rewritten in .vb. Just compile them to dll into the bin folder.
So basically it's not that hard to convert it to .vb.

Start rewriting with the pages (.aspx), modify the Page Language="C#" to Page Language="VB" and the CodeFile="ShippingInfo.aspx.cs" to CodeFile="ShippingInfo.aspx.vb"

Currently i am converting nopcommerce to vb.net for a developer. In time i can post a link to the zip file.

Memberships are stored in DB so doesn't effect membership off te rest of your site.
15 лет назад
Thank you MDP, but I'm as confused as before.  It seems to me that converting everything to VB would be a huge undertaking, just from the number of files I'm seeing.  My customer has a long list of projects for me.  He wouldn't appreciate me taking the time to convert all that code to VB.  It would make more sense to convert what I need to when I need to make changes, then convert the changes back.  I should also start learning C#.

I don't know your time frame.  When you've completed your conversion, if you're willing to share it, I would be very appreciative.

It seems all the best open source .Net apps are written in C# and I have a website with several hundred VB files I want to integrate them with.  I know it can be done.  People have explained to me how, but while the explanations make sense, I don't get how to implement them.  I need step by step help I think.

As for membership, I'm using the default provider.  If nopCommerce uses a different provider, I'd effectively have two membership systems, each using it's own set of tables in the database.  I would have to disable the nopCommerce registration, pointing my customers to my own registration page instead, and programmatically update the nopCommerce membership system whenever users register with the site or edit their account.  

Diane
15 лет назад
No, converting to .vb isn't that much work. It depends on your needs.
Like i said, the whole Nop.Common, Nop.DataAccess, Nop.DataAccess.SqlServer etc doesn't need to be rewritten.
You don't even have to touch them 'cause they're already compiled into the bin folder of NopCommerceWeb.
That leaves us to the only folder we need to focus on and that's the NopCommerceWeb folder.
But you can explain to your customer that if he want to use your services you have to rewrite the code, if he/she doesn't like that.. too bad.
I'm almost haveway with rewriting the code to .vb. I think after this weekend i will complete the conversion.

If you want to intergrate/convert one programming language into another language you will have to start by looking what the differences are between the languages and how the overall syntax will affect your code. There are so many tutorials and explainations to find on google.

a simple example of how syntax will change:

c# code:
        public static IDataReader GetApplicationTopNavigation()
        {
            try
            {
                DbCommand command = db.GetStoredProcCommand(StoredProcedures.sp_GetApplicationTopNavigation.ToString());

                return db.ExecuteReader(command);
            }
            catch (Exception error)
            {
                LogDBManager.InsertLog(LogTypes.SqlError.ToString(), error.toString(), error.Message.ToString(), error.StackTrace);
                return null;
            }
        }

vb code:
        Public Shared Function GetApplicationTopNavigation() As IDataReader
        Try
             Dim command As DbCommand = db.GetStoredProcCommand(StoredProcedures.sp_GetApplicationTopNavigation.ToString())
       
             Return db.ExecuteReader(command)
        Catch [error] As Exception
             LogDBManager.InsertLog(LogTypes.SqlError.ToString(), [error].toString(), [error].Message.ToString(), [error].StackTrace)
             Return Nothing
        End Try
        End Function

About the membership, i think you will have to write down the exact structure of your current database/code and the Nopcommerce database/code.
Create a common function wich can maybe handle both memberships or just use one membership provider. If you use one provider you will have to alter many things. Keep that in mind. What you can do is add a table into one of the two databases. Add a relationship between the two tables (guid) and innerjoin them.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.