Advanced XML Creation using Helper class created by XSD.EXE from a schema

I'm going to paste the section of the helper class below.  What I
can't figure out is really what is required or how to set the value
for the item - Identification which is of type PharmacyID.  Language
is C#.

Here's my code attempt and where I'm stuck:

            PharmacyIDType ID = new PharmacyIDType();
            ItemsChoiceType it = new ItemsChoiceType();
            // choicetype?
           //  it. in the editor doesn't give me any options to set a
value - only a name
          // ID. offers an ItemsElementName which I will set to "it"
and is of ItemsChoiceType
            ID.Items[0]=NCPDPID; // passed parm with the id number a
string.
            rqpharmacy.Identification = ID;

I just don't know how to set the value for a type that ultimately has
is an "enum".

The helper class section:

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.s.com/
messaging")]
public partial class PharmacyIDType {

    private string[] itemsField;

    private ItemsChoiceType[] itemsElementNameField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("BINLocationNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("DEANumber", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("FileID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("HIN", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("MedicaidNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("MedicareNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("NAICCode", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("NCPDPID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("NPI", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("PPONumber", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute("PayerID", typeof
(string))]
    [System.Xml.Serialization.XmlElementAttribute
("PriorAuthorization", typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("PromotionNumber",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("SecondaryCoverage",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute("SocialSecurity",
typeof(string))]
    [System.Xml.Serialization.XmlElementAttribute
("StateLicenseNumber", typeof(string))]
    [System.Xml.Serialization.XmlChoiceIdentifierAttribute
("ItemsElementName")]
    public string[] Items {
        get {
            return this.itemsField;
        }
        set {
            this.itemsField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("ItemsElementName")]
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public ItemsChoiceType[] ItemsElementName {
        get {
            return this.itemsElementNameField;
        }
        set {
            this.itemsElementNameField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd",
"2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.s.com/
messaging", IncludeInSchema=false)]
public enum ItemsChoiceType {

    /// <remarks/>
    BINLocationNumber,

    /// <remarks/>
    DEANumber,

    /// <remarks/>
    FileID,

    /// <remarks/>
    HIN,

    /// <remarks/>
    MedicaidNumber,

    /// <remarks/>
    MedicareNumber,

    /// <remarks/>
    NAICCode,

    /// <remarks/>
    NCPDPID,

    /// <remarks/>
    NPI,

    /// <remarks/>
    PPONumber,

    /// <remarks/>
    PayerID,

    /// <remarks/>
    PriorAuthorization,

    /// <remarks/>
    PromotionNumber,

    /// <remarks/>
    SecondaryCoverage,

    /// <remarks/>
    SocialSecurity,

    /// <remarks/>
    StateLicenseNumber,
}
0
10/29/2009 6:18:17 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
1956 Views

Similar Articles

[PageSpeed] 46

Reply:

Similar Artilces:

Store.exe crashing on 2 Exchange 2003 servers
We have 2 Exchange 2003 SP1 servers (Win 2K SP4) which have developed a problem with the store crashing every half hour or so. System event log: The Microsoft Exchange Information Store service terminated unexpectedly. It has done this 2 time(s). The following corrective action will be taken in 0 milliseconds: No action. Application event log Faulting application store.exe, version 6.5.7226.3, stamp 407db771, faulting module storevs2.dll, version 7.1.367.0, stamp 40746ce5, debug? 0, fault address 0x00002238. I think it is interesting that both servers are crashing, but not at exact...

Outlook Client install hangs at MSDE sqlredis.exe
I see a number of people seem to have had the problem where an installation of the Sales for Outlook client just hangs about 30 seconds into the MSDE part of the install. It seems to get stuck with the sqlredis.exe process. Well on the strengh of what Microsoft support recommended, I suspected it might have something to do with my wireless/bluetooth connections and software to syncronise my cell phone with Outlook. So I killed off as many processes in my task manager I could find that seemed related to these, and the install worked! ...

How do I create a database from an Excel form?
Hello Everybody - I need to see if Excel can be used to create a mailing list database from an Excel form. If so...how do I go about doing this? The list will need to include the name of the company, contact person, and address. Thanks in advance for all of your help! It is greatly appreciated! Here are a couple of links: http://www.mvps.org/dmcritchie/excel/mailmerg.htm http://www.mvps.org/word/FAQs/MailMerge The first is from David McRitchie and the second is by Beth Melton and Dave Rado. FIRESIGN98 wrote: > > Hello Everybody - > > I need to see if Excel can be used...

Create calendar item/mtg request when people register for webinar?
Hi! I need assistance with figuring out how to generate an Outlook calendar item whenever people register for a webinar or other activity through our website. Is a plug-in available? Ideally, whenever someone signs up for an activity through our website, it would then forward a meeting item to their Outlook calendar. I've seen this done in so many places. "jasovi" <jasovi@discussions.microsoft.com> wrote in message news:EDED7311-4B37-4D4A-A0F5-B77C982D2014@microsoft.com... > Hi! I need assistance with figuring out how to generate an Outlook calendar &...

which xml access type?
Hi, I'm developing an ASP.NET web app and i'm retrieving some data from xml files. My question is, if an xml file is going to be accessed a page is loaded, should i: 1. use an in-memory XmlDocument (created each time the page is accessed); or 2. use a forward-only XmlTextReader object (created each time the pages is accessed). Thanks very much in advance, Tim. If the XML file doesn't change frequently, and it's not a HUGE file, you should cache it programmatically with the Cache property on Page, set a dependency on the physical file (if it may change at all), and use...

Creating a view with concatenated columns
I have a table with about 20 columns and I am trying to create a view of it that includes about 10 columns. The problem is that in the process, I am trying to concatenate some fields into one field and I am unable to get any thing working. Below is one example of my attempts to tackle this. Any ideas will be highly appreciated. // The following should be considered as pseudo-SQL CREATE function [dbo].[fn_myview] (@CardNo varchar(11)) returns Table as BEGIN declare @FullName as nvarchar(128) (SELECT FirstName, FatherName, GFatherName, FamilyName, Birthdate, Birthplace...

Date datatype in my schema
I have created a simple XML document, generated a schema from it (which Visual Studio makes everything a string element). I then went through and changed all fields that are dates to the Date data type. Now, when I use the datagrid to edit the data in the XML file and then switch back to the raw XML text date, the dates are formatted like this "1973-10-27T00:00:00.0000000-06:00" and not as I expected, which are supposed to be a simple date, such as "1973-10-27" as per the W3C spec. Also, when I validate the document, it fails on all date elements with this error: C:\Doc...

Service Call SQL Object creation error #2
Hi, I am trying to configure Service Call Management, and when I execute the step to set up permissions for the GP users who can perform service call escalations (i.e Tools \ Setup \ Project \ Service Setup \ Service button \ SQL Objects button - Set permissions for Sql Objects for Escalation, then I get the following error: 'An error occurred executing add group statements'. When I click OK the next error is: 'The role FSSQLJOB does not exist in the current database.' I am on GP10 and am doing this in the Fabrikam database. Thanks Neil You will want to run the follow...

Add new record using first available non-numeric ID; update two ta
Access 2003, Windows XP Pro SP2 I have two tables, tblDed and tblVendor. tblDed contains two columns (DedID and Avail). The first column contains a list of all DedIDs allowed to be used. The second is a Yes/No choice indicating whether or not that DedID has been used already. tblVendor contains multiple columns with misc. data relevant to the Vendor. I want to create a form that will accomplish three things: 1. Use the next available unused DedID when a command button on a referring menu page (frmMenu, btnNew) is pressed. 2. Mark the now-used DedID in tblDed as "No" - no ...

RFID Use with Access
I am looking to find the steps necessary to make Access ready to interface RFID information captured from passive RFID devices. I would appreciate anyone in the group sharing this how-to with me. Zachry1 <Zachry1@discussions.microsoft.com> wrote: >I am looking to find the steps necessary to make Access ready to interface >RFID information captured from passive RFID devices. You should really be looking to the vendor of the RFID capture devices. They should have DLLs/OCXs which you can install and sample code. VB 6 code usually works just fine in Access. Tony -- Tony Toews...

Display Non Inventory description on Create Purchase Orders screen
Display the item Description for non-inventory items on the Create Purchase Orders screen. Currently, only inventory item descriptions are displayed. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrow...

Advanced Financial Reports
We would like to print an AFA report in landscape by default. Currently in Great Plains Advanced Financial Reports can only print in portrait by default. Each time we want to print in landscape, we have have to open the report layout and change the printer setup to landscape before printing. ...

OL2003 uses 100% of CPU resources after shutdown
If leaving my computer on over night with OL2003 with Business Contact Manager (BCM) running usually results in OL2003 stop responding but maintain 100% CPU usage. Even shutting down OL2003 w/BCM does not free up the CPU, which still shows OL2003 claiming 100% CPU usage. This also prevents my computer from going into power standby mode. How do I resolve this issue? ...

COUNTIF using formatting?
Here is a basic example of what I'm trying to do: I have a list of football teams. Each week, I format the football teams that won with red font. Is there a way to find a count of those teams formatting in red and display that number in my worksheet? I know an alternate way around this would be to have a win/loss column and do a COUNTIF based on the values there. But I'm wondering if there's a way to do it based on the formatting instead of the values. Nicolle K. wrote: > Here is a basic example of what I'm trying to do: > > I have a list of football team...

Outlook 2007
Hi All I have a mail server configured on a IPv6 only machine. I would like to specify my POP3 account with these IPv6 Addresses as the Incoming mail server and SMTP server. For that in the Email Accounts i want to use IPv6 addresses. This is not working, i have also tried using the IPv6 address resolved name also, still it doesn't work. It works fine with IPv4 address and hostname. Can anyone help me solve this problem. Thanks Anilkumar Can you PING the IPv6 address? Can you use a HOSTS file to map the address to a name? <anilgkonline@gmail.com> wrote in message news:11781...

File Transfer using vb.net code
Hi, I would like to transfer/move a file from one folder to other folder in shareopint site. That needs to be done using vb.net. Could you please prove the code for that? Regards, Balu Submitted via EggHeadCafe - Software Developer Portal of Choice Dr. Dotnetsky's Cool .NET Tips and Tricks # 16 http://www.eggheadcafe.com/tutorials/aspnet/960bc693-889f-46c1-9b0e-1b0a67d13ea5/dr-dotnetskys-cool-net.aspx So your asking someone on this list to do your work for you? For free? Sounds like you might want to get some consulting time. -- Daniel A. Galant Imagine what w...

Unable to create mailboxes
Two weeks ago we created and installed a new exchange 2003 server in mixed mode in a 2000 active directory enviroment. We are still using the existing exchange 2000 server as a relay server. Since the upgrade when I create a new account in ADUC I see the exchange email tab populates correctly but nothing shows up under Exchange Advance tab. I also dont see the user name in the GAL. I'm seeing 8270 and 9176 in the event viewier. Does exchange require that I install the system manager on all the DC? Thanks, -Michael ...

Creating MFC child dialogs and windows in DLL.
Hi, I need to write some kind of plug-in, which are implemented as separate dll's. I already wrote a few plugins for this program using MFC and it worked ok, but now I need to create some GUI inside a plugin. I have an interface like that class IModule { public: virtual void ShowConfDialog( HWND hwndParent ) = 0; virtual HWND CreatePanel( HWND hwndParent ) =0; // create child window, position and size will be // controlled by a parent window. } But when creating a child windows in MFC I nee...

SQL script to create views
I think I saw a script somewhere on CustomerSource that would crete views with Table Display Names - would anybody know where to find it? Thanks, Mario Do a search for SDK and GenView (or Gen View, and it's part of the SDK). I believe that's what it's called. It's not so much a script as it is a utility. Clint "Mario" <anonymous@discussions.microsoft.com> wrote in message news:2a5ee01c465b4$e345d620$a301280a@phx.gbl... > I think I saw a script somewhere on CustomerSource that > would crete views with Table Display Names - would anybody > know wh...

Using Web Services To Add Leads to Marketing List
Is it possible to use web services to add leads/contacts to marketing list? I have a sales contact form that creates a lead, and I want to give those leads the option to signup for a mailing list we have. Does anyone know if this is possible? If so, know any examples? Thanks, Tareef Hi Tareef, The messages to handle list membership are AddMemberList and RemoveMemberList. They are described in the SDK documentation along with some sample code. -- Michael H�hne, Microsoft Dynamics CRM MVP Web: http://www.stunnware.com/crm2 Feed: http://www.stunnware.com/crm2/atom.aspx Custom Lookup D...

AddNew fails
I have the following section of code (and several other similar ones, which all work fine): Set dbs = CurrentDb() Set qdf = dbs.QueryDefs("qryInspAccess_Current") qdf.Parameters("[CardID]") = Me.InspCardID Set rst = qdf.OpenRecordset(, dbOpenForwardOnly) Set rstSub = dbs.OpenRecordset("RWOP_DAT_InspAccess", dbOpenDynaset, dbAppendOnly) Do Until rst.EOF rstSub.AddNew rstSub!AccessID = rst!AccessItemID rstSub!InspectionID = Me.InspID rstSub.Update rst.MoveNext Loop The problem is that the .AddNew statement generates error 3022 (...

Create a leaderboard in excel?
I want to create a leaderborad in Excel, wich displays the current position of a contestent. If his score changes (due to data input) his position at the leaderborad changes. How do i do that? I got a list of names and thier value starting at 0 then each round they will get points. I enter the points after each name and the leaderbord auto. shows positions, else i need to sort after each input to have the board up to date. Suppose the players and scores are in columns A:B Player Score Bill 3 Mike 9 Fred 6 John 5 Add an extra column, which will help us deal with dupli...

Looking for help...I can't send e-mail using CRM web client
I'm having a problem with trying to send e-mails vie the CRM web client. When I try to send the e-mail I get a pop-up with the message in bold "Unexpected Error" "An error has occurred. For more information, contact your system administrator". I've checked the event logs, no errors are showing up in either my CRM server or my exchange server. I'm lost, new to CRM. Any help or ideas is appreciated. Thanks, You could try to add pre-windows2000 account to the administrator group on the exchange server. Some time that helps "Marty" wrote:...

auto copy and paste to another workbook by using specific titles
I am trying to get information from a row that contains a specific title to be transferred to another workbook automatically. I also need to know how to do this with the cells not matching up. Hello: Your question is vague. If you mean that when someone opens the spreadsheet, the contents of a row with a certain title is copied to another spreadsheet, then you can use the Auto_Open() event to search for the row, open the target spreadsheet, insert it, and then close the spreadsheet, saving the contents. Again, I may not be addressing your question, but again, it very gener...

Create new lookup
How do you create a new lookup field? I want to make a new lookup field on the opportunity page to look up contacts only, so I can selecta primary contact. I assume this has something to do with relationships/mapping. Contacts are already mapped to opportunities, and you can select either an account or a contact for the potential customer. However, I want to create another field to be able to select a contact only. Surely this can be done! You are right in saying that lookups are related to relationships. Set up a relationship, and CRM creates a lookup attribute based upon it. The big pr...