How do I tell if the customer is B2B or B2C

I'm wanting to create a "dealer" area on our website.  A place where B2B customers can go to download special deals, pricelists, etc.
My idea was to put a link on the my account page to an asp page that I would build.  On that page I need it to figure out if the customer in that session is B2B or not.  If not, give them a "sorry" message, and redirect them back to the my account page.
If it's a dealer, it displays the page with all the dealer info.
Is there a way to do this in netpoint already?  If so, how?  If not, how do I tell if the customer is B2B or not in an asp page?
Thanks,
Jim

Hi Jim,
To determine if a user is a B2B account or not you can use the API.
So for example here is a skeleton you can use: (assuming you are using c#)
<%@ Page Language="C#" inherits = "netpoint.classes.NPBasePage" %>
<%@ Import Namespace = "netpoint.classes" %>
<%@ Import Namespace = "netpoint.api.account" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
        //check if this is a B2B user.
        NPBasePage p = (NPBasePage)Page;
        NPAccount acc = new NPAccount(p.AccountID);
        if (acc.AccountType == "B")
            //its a B2B user
      else
           //not a b2b user, redirect
           Response.Redirect("http://wherever you want to go to");
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    </div>
    </form>
</body>
</html>
hope that helps.

Similar Messages

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more.

    My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more. Was working while watching a movie but when I pulled it out from the computer and put it back in the system would no longer mirrorr the screen on the TV.

    The best option is an appointment at an Apple store genius bar.  The evaluation will be for FREE!
    Ciao.

  • How can you tell who the original sender of a group text is on an iPhone 5, when all that appears is a list of recipients in no particular order

    how can you tell who the original sender of a group text is on an iPhone 5, when all that appears is a list of recipients in no particular order? I can't seem to identify the sender in the details list.

    Start a separate thread to the original sender.

  • How can I tell if the mini dvi on my 2010 13" macbook pro supports audio?

    How can I tell if the mini dvi on my 2010 13" macbook pro supports audio?

    If it's a post 2009 Mac it supports audio on the HDMI port. See:
    About Mini DisplayPort to HDMI adapters
    Mac mini (Mid 2010)- Frequently asked questions about HDMI

  • Hi, my Macbook Pro isn't charging when I plug in my charger and the light on the charger thing isn't lighting up. How can I tell if the charger or the computer is broken? Also, is there a way to fix it? Thanks.

    Hi, my Macbook Pro isn't charging when I plug in my charger and the light on the charger thing isn't lighting up. How can I tell if the charger or the computer is broken? Also, is there a way to fix it? Thanks.

    Not sure how I would tell if the contacts are stuck, but they look normal. The other stuff:
    Battery Information:
      Model Information:
      Serial Number:    W0046Q08UBX0A
      Manufacturer:    SMP
      Device name:    bq20z451
      Pack Lot Code:    0000
      PCB Lot Code:    0000
      Firmware Version:    0201
      Hardware Revision:    000a
      Cell Revision:    0157
      Charge Information:
      Charge remaining (mAh):    3211
      Fully charged:    No
      Charging:    No
      Full charge capacity (mAh):    5845
      Health Information:
      Cycle count:    943
      Condition:    Normal
      Battery Installed:    Yes
      Amperage (mA):    -1354
      Voltage (mV):    11210
    System Power Settings:
      AC Power:
      System Sleep Timer (Minutes):    10
      Disk Sleep Timer (Minutes):    10
      Display Sleep Timer (Minutes):    10
      Wake On AC Change:    No
      Wake On Clamshell Open:    Yes
      Wake On LAN:    Yes
      Display Sleep Uses Dim:    Yes
      GPUSwitch:    2
      Battery Power:
      System Sleep Timer (Minutes):    10
      Disk Sleep Timer (Minutes):    10
      Display Sleep Timer (Minutes):    2
      Wake On AC Change:    No
      Wake On Clamshell Open:    Yes
      Current Power Source:    Yes
      Display Sleep Uses Dim:    Yes
      GPUSwitch:    2
      Reduce Brightness:    Yes
    Hardware Configuration:
      UPS Installed:    No
    AC Charger Information:
      Connected:    No
      Charging:    No

  • How do I tell if the database engine is installed?

    I'm using SS 2008 R2. I don't think the database engine was installed and I would like to check this. 
    How do I tell if the database engine is installed?

    I'm quite surprised that with all the answers you have been given, nobody has noticed the obvious. In actual fact everyone is sorta right. The answer to your question of whether you have the db engine installed is ...yes an no ;)
    You do not have the traditional engine installed, but you do have sqlexpress localdb.
    For more info check out:
    http://technet.microsoft.com/en-us/library/hh510202.aspx
    and
    http://geekswithblogs.net/krislankford/archive/2012/06/19/sql-server-2012-express-localdb-how-to-get-started.aspx
    Im not a big fan of it but it does what it says on the tin...
    Regards,
    Mark Broadbent
    Contact me through twitter |
    blog | sqlcloud
    Please click "Propose as answer" if a post solves your problem
    or/and vote the post up if it's been helpful.
    Want professional SQL Server High Availability Training? Click here

  • HT201653 We are a retail shop which has a copy of AppleCare Protection plan. The box is not sealed. How can I tell if the product has been registered or not.

    We are a retail shop which has a copy of AppleCare Protection plan. The box is not sealed. How can I tell if the product has been registered or not.

    Since the only thing needed in that box is the small piece of paper with the (very long) registration code on it (usually found inside the booklet), see if that is actually there and, if it is, call Apple at 800-275-2273 and ask to be transferred to the Applecare department. Here is the link to the Applecare plan - just in case you may need it, see the fax numbers listed under para. 9 (Cancellation).
    http://www.apple.com/legal/sales-support/applecare/appmacnaen.html

  • How do you tell if the advanceddatagrid scroll bars are showing?

    How do you tell if the advanceddatagrid scroll bars are showing? This is because the grid crashes when mouse scroll events are firing when theres not enough data so that scroll bars are not showing

    Basically when you have enough data in a datagrid so that it cannot all be displayed at once, you have the scrollbars showning allowing you to scroll.When you can see all the data or rows at once you cannot see the scrollbars. What I need to test for is whether these SB's are currently showning.
    Hope that is clearer.

  • How can I tell what the iTunes build is before I download?

    I am having difficulty finding out what the iTunes build is for the current download from the Apple site. I am running iTunes 7.6 (29); I assume the "29" is the build for my installed version. I also assume that Software Update will ignore build changes unless the version changes.
    I do not want to download and install the current iTunes build unless it is different from my currently installled app. How can you tell what the specific version and build are from the Apple download site?
    Thanks!

    I am running iTunes on Leopard.

  • How do I do use the custom code and format for a percentage with 2 decimals in Report Builder 3.0?

    In Report Builder 3.0, I have the following custom code entered:
      Public Function SafeDivide(Numerator as String, Denominator as String) as String
    Try
    If Numerator = “” or Denominator = “” then
    Return “-“
    End if
    If Numerator = “-“ or Denominator = “-“ then
    Return “-“
    End If
    If CDbl(Numerator) =0 or CDbl(Denominator) = 0 then
    Return “-“
    End if
    If IsNothing(Numerator) or IsNothing(Denominator) then
    Return "-"
    End if
    Return Val( ( (CDbl(Numerator) / CDbl(Denominator) )*100 ) )
    Catch
    Return "-"
    End Try
    End Function
    I call the custom code in the cell with the following equation:
      =Code.SafeDivide(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value),sum(Fields!LY_UNITS.Value))
    I have the format for the cell set to 0.00%, but it’s not being followed.
    I want the result to be formatted as a Percentage, but instead I get values like: 
    -78.9473684210
    80
    300
    -100
    I have the format for the cell set to 0.00%, but it’s not being followed.
    How do I do use the custom code and format for a percentage with 2 decimals?

    Hi AngP,
    After testing the issue in my local environment, I can reproduce it. Based on my research, I find this issue is caused by the type of Units_VAR_Percentage cell is string, while the type of CDbl(Parameters!Var_Threshold.Value) is double, so they cannot be
    compared.
    To fix this issue, we can add a hidden column (Textbox91) next to the Units_VAR_Percentage column, and type =(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value)) /sum(Fields!LY_UNITS.Value) as the expression. Then use the expression below to control the
    BackgroundColor:
    =iif(iif(reportitems!Units_VAR_Percentage.Value=CStr(format(reportitems!Textbox91.Value,"0.00%")),reportitems!Textbox91.Value,0)>CDbl(Parameters!Var_Threshold.Value),"Yellow","PaleTurquoise")
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How can we tell if the iphone is already fully charged in ios7? Even if its 100% the thunderbolt icon is still displayed. Not like in ios 6 that we will know when to unplug the charger because there is an indicator.

    How can we tell if the iphone is already fully charged in ios7? Even if its 100% the thunderbolt icon is still displayed. Not like in ios 6 that we will know when to unplug the charger because there is an indicator.

    For those who seem unfamiliar with what is being asked:
    On iOS 6 and older, just because the phone reached 100%, didn't mean it was Fully Charged. The way you could tell was the lightning bolt symbol that indicated the device was charging would change to an outlet plug when the device was not only 100%, but also stopped accepting further charge. This symbol switch would occur anywhere from 5-15 minutes after the device already was displaying 100%.
    Now, on iOS 7, while it still reaches 100% with that same lightning bolt charge symbol, during the 100% point, it never switches to the plug symbol to indicate the charge period is totally finished.
    Can anyone confirm if there is a way to see this charge completion in iOS 7 since it appears that there is no longer a symbol for it? Is there any indication that Apple may have changed the charging display so that now it only displays 100% when it would have previously displayed that plug symbol?

  • How do I tell if the RMAN Registration has worked correctly?

    Am using Oracle, DataProtector and SAP with RMAN and am registering the database in RMAN using the standard DataProtector commands.
    How do I tell that the database has actually registered the catalog inside the RMAN DB? I can do a "list backups" but it does not tell me whether the control file is being used for the catalog or the RMAN Database. Can anyone assist?
    Share and Enjoy! Ian

    I believe I have registered the database to use the
    RMAN Database to store the catalog - how do I confirm
    this?issue some rman commands which access the recovery catalog like 'list backup' or ask the recovery catalog:
    'select * from rc_database'
    regards,
    -ap

  • How do I tell if the license and serial have been activated on CS4?

    How do I tell if the license and serial number have been activated on CS4?

    try and activate a cs4 install and you'll see an activation count message if there are already 2 current activations.

  • How does one tell if the J2EE services are running with Unlimited

    How does one tell if the J2EE services are running with Unlimited
    security? We have applied the export Policy to the server but we do notsee any reference to it running with it. .we apply the Service packs SAP now upgrades that JAVA as well . Do that process treat the JAVA
    lib/security area correctly.

    Just out of curiosity... Is there something you do
    like about Mac/Apple?
    To answer your question: no, not really. However, the points that I made here were about Safari and accompanying utilities, not about Apple in general.
    If it makes you feel any better, I am just as, or even more, critical of Micro$oft as the occasions arise...Windoze Vista is the most recent occasion and has given sufficient reasons and opportunities to vent my spleen that I actually have eased up on Apple, politicians, nut-case religious extremists, cell phone owners, and the Department of Homeland Paranioa, etc., due to an exhaustion of creative energy.

  • Touchsmart 320, windows 7 how can i tell if the caps are on?

    how can i tell if the caps are on?

    If you have the HP Keyboard software installed, you are supposed to get an on screen display that pops up in the lower left corner of your screen showing you when numlock, caplock are enabled. If you don't get that, you can try reinstalling the keyboard software using HP recovery manager (just the keyboard software - do not do a system recovery!)
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

Maybe you are looking for