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
2065 Views

Similar Articles

[PageSpeed] 53

Reply:

Similar Artilces:

Need help in accessing a sharepoint site that I created with the AllTemplates.exe
SBS2008 with WSS 3.0 I downloaded the AllTemplates.exe from Microsoft and installed the Helpdesk template. I can acess the Helpdesk site from SBS2008 and add things to it but I can't access it from a workstation. Can anyone help me out? Thanks You mean you can only access the site from the Server in local , right? maybe we need more information such as error message. how about doing "ping" or "tracert" result. can you access a normal web site (not sharepoint site) from the workstation ? do you get an authentication window ? "john doe" wr...

using if function..please help
i am trying to use the if function in the following manner. A B apple red apple red grapes purple grapes yellow star n/a if(B1:B5="n/a",0,countif(A1:A5, "star") I want to use this formula not only for 'star' but also for 'apple' and grapes' and many more such fruits which might have n/a later. But, everytime I use this formula it returns a 1..should it not return a 0 for when the value in B is n/a? Please help.. Thank you Are you trying to say that if any c...

Where to use static constructor and static class
dear friends Can you tell me in which scenario we have to use static class and static constructor? Thanks in advance Ashok kumar wrote: > dear friends > Can you tell me in which scenario we have to use static class and > static constructor? Use a static class when you want to implement functionality that does not require per-instance state (i.e. all consumers of the class can share the state). Use a static constructor when you need to initialize state in a class that is shared by all consumers of the class. Pete ...

Could You Use $10,000 in the Next 30 Days.....Risk Free?
Could you use $10,000 in 30 days Risk-Free? Introducing a revolutionary new downline building system!! Free to join! Build your downline and be in MASSIVE PROFIT BEFORE you spend one single penny! You could be making over $10,000 just 30 days from now! And it's totally Risk-Free!! If you're tired of wasting money trying to make money then you will LOVE this system!! It eliminates every problem in building a downline as it's totally automated and duplicatable by everyone! This is as easy as breathing! So don't waste a second!... You could be just 30 days from Financial Freed...

XSD/XML -> RDB in .Net
Hello all! Are there available samples or code which can create "create table" SQL statements using provided XSD and/or XML? Is it possible to get create table statements from DataSets / DataTables in ..Net? Any ideas how to approach this? ...

Creating a Campaign Response via Follow-up
When you create a new Task/Phone Call or other activity via the Follow-up tab, the new Activity is associated with the entity you are looking at. (so following up a Contact with a Phone Call will create a Phone Call which is associated with the Contact) This is not the case for the Campaign Response activity - when you create a Campaign Response via the Follow-up tab, the Customer field (ie regarding) is left blank and hence not associated with anyone. Presumably this is a bug - anyone know if there is a hotfix for this? Kind Regards, Paul. ...

GALMOD32.exe not working #2
Hello. When the users of the domain run GALMOD32.exe it acts like it saves the settings but when I look at the gal those settings don't stick. I have done the following site suggestions about adding "self" to delegate control, but still no luck. Anyone have any suggestions on how I can get users to update the gal themselves and have it actually stick. http://mcpmag.com/columns/article.asp?EditorialsID=873 Thanks, -comb In article <MPG.1ef200b44f090d1b989684@news.newsreader.com>, whore@whore.com says... > Hello. > > When the users of the domain run GALM...

Creating a summary sheet
I have a spreadsheet that is about 200 rows down and 60 columns accross. I want to create a second summary tab that will pull over only certain columns from the "detail" sheet. As I update the detail sheet I want to also update the summary sheet - so far no problem, but if I add a new row in the detai sheet - how can I also add the same row in the summary sheet and only bring over columns I want on the summary sheet (the columns are not next to each other) Paste link does not insert the row in the summary sheet unless I drag the formulas - which I do not want to do. Is th...

Discount using two different items?
Hello, I have two different items one sellf for $11.99 and the other for $3.99 is there any way to set it up so that if a customer buys the item for $11.99 that they can get the $3.99 item for $2.99 -- Thank You,; Vince Did you try to setup Mix and Match discount? Jamil. "Vince" wrote: > Hello, I have two different items one sellf for $11.99 and the other for > $3.99 is there any way to set it up so that if a customer buys the item for > $11.99 that they can get the $3.99 item for $2.99 > -- > Thank You,; > Vince ...

Can I use VBA to add cells (over blanks) then do multiplication
I have a Word table in which the last column contains numbers (3 and 4) and some bank cells and I want it add them and put the total into the second last row (7 in this case). The last row contains a multiplier (3) which when applied to the total results in 21. Below is the table. | | | 3 | | | | | | | | 4 | | | | 7 | | | 3 |21| How can I achieve this in VBA (under Word 2003 and 2007) remembering that the user can add rows to the table and the last column can contain blank cells. Thanks in advance for any assistance, Peter Evans Sub ScratchMaco(...

replace invalid xml characters
I know that System.Security.SecurityElement.Escape() will replace invalid xml chars with valid equivalent ... But is there another method to accomplish same that is "closer to home" ? * John A Grandy wrote: > I know that System.Security.SecurityElement.Escape() will replace invalid > xml chars with valid equivalent ... > > But is there another method to accomplish same that is "closer to home" ? > > I usually use the stream editor "sed" for this type of stuff. John A Grandy wrote: > I know that System.Security.SecurityElement.E...

Using Hyperlinks within Userforms
Hi all, I have a Userform with various command buttons in place. What I'm trying to do is allow users to be able to open various Word documents when they click on these command buttons via the use of hyperlinks embedded within the click event of each command button. So if they click on one of the command buttons it opens one Word document, and if they click another, it opens the second Word document etc. etc. It would be ideal to have the Userform to always remain displayed, so the documents open in the background, and the Userform always has the focus... then once the desired documents...

Doing a VLOOKUP (probably using the INDEX and MATCH function), with both vertical and horizontal values in play.
I am trying to create a function that will pull in data from a 2nd spreadsheet. Typically, I use the index and match function to do so. However, in this case, I am trying to do a lookup based on a value above (i.e., horizontal) and a value to the right (i.e., vertical) of the cell in which the formula will be placed. Additionally, the sheet from which I am pulling is similarly laid out. To Provide an example. Lookup Table Months (horizontal) Jan Feb Mar Apr Etc Names(vertical) Jeff Eric 5 Steve ...

Should be able to create recurring service activities
It would be nice to be able to create recurring service activities and appointments. We use the shared service calendar and other members of my team cannot see when i am carrying out the month end routine each month unless i manually create an appointment for it. It would be most helpful if you could create a recurring appointment or service activity within crm to save time each time you have the same activity. ---------------- 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&q...

Using a spread sheet for e-mail addresses
I have a large number of e-mail addresses in a spread sheet column. Is there a way to copy the e-mail addresses into the To box (bcc) of an outgoing e-mail without first installing them in my contacts folder? Thanks, Len Urban Save the column as a text file, open the file in Word or your favorite text editor, replace all the line endings with semicolons, and paste it all into the BCC field. -Peter "Len Urban" <lturban@verizon.net> wrote in message news:hgVph.373$9B6.212@trnddc07... >I have a large number of e-mail addresses in a spread sheet column. Is >ther...

reconcile Inventory with General Ledger when using Average Perpetu
The customer wants to have the ability to reconcile their inventory balances with the general ledger accounts when Average costing is being used. ---------------- 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/dgbrowser...

Read partial xml into dataset
Hello I need some help to read only partial nodes of a xml and store it as a dataset. In my example below, I need only the values within the nodes <WorkFlowStepHistory> in a dataset. I'm sure it is pretty simple, but since I'm new to xml not sure how it is done. Say my xml string has nodes like <RequestSpecificData> <OtherNodes> ------- </OtherNodes> <WorkFlowStepHistory> <WorkFlowStatus>FormSubmitted</WorkFlowStatus> <WorkFlowStatusDateTime>12/17/2007</ WorkFlowStatusDateTime> ...

Using the combo box from the forms toobar
When using the combo box from the forms toolbar I get text that is a specified size. I can increase the size of the drop down arrow and box but I can't change the text size. How do I change the text size? Hi R, > When using the combo box from the forms toolbar I get text that is a specified size. I can increase the size of the drop down arrow and box but I can't change the text size. How do I change the text size? You can't. The combo box from the forms toolbar is a fixed font. If you need a different font, you'll have to use the combobox from the control toolbox. Re...

how to create emails with sound when opening
how to create emails with sound when opening Buster <Buster@discussions.microsoft.com> wrote: > how to create emails with sound when opening http://www.howto-outlook.com/Howto/addingsound.htm -- Brian Tillman ...

create customize trendlines
How do you create customize trendlines (w/o doing any additional spreadsheet calculations)? For example, Excel gives you the option of plotting y=m(lnx)+b. I might like to plot y=m(logx)+b instead. Does anyone know any easy way to do this using the trendline option (I've seen graphing programs where you can edit existing curve fits or creat new ones.)? Thanks! ...

Excel.exe
I have Office 2000 Pro and Windows 2000. When I click Excel on the toolbar I get this message: Excel.exe ha generated errors and will be closed by Windows. You will need t restart. When I open in the SafeMode from Run the program opens immediately. Why or what is causing the .exe errors? Thanks Helpji -- helpji ----------------------------------------------------------------------- helpjim's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3097 View this thread: http://www.excelforum.com/showthread.php?threadid=50648 excel is a disease; run away while you st...

What event to use in a field property on a from
In my form Souls field Age I want to have this field calculate the current age of the soul from the field DOB that is also in the form. DOB is a formated date and AGE is formated General Number 0 decimals. What is the best event to use when adding or updateing the record. The DOB may be blank in some instances and then be updated at some later time. Thank You in advance for all the help. I am using Ver 2007 You should not be storing the Age in a table. Instead, you should calculate it in a query, and use the query wherever you would otherwise have used the table. To compute Age, g...

Using Access to create an appointment and add attendees
Hi i am using Access to create an appointment in outlook. I have the code for creating the appointment but i am struggling to add attendees. This is what i have so far; DoCmd.RunCommand acCmdSaveRecord Dim objOutlook As Outlook.Application Dim objAppt As Outlook.AppointmentItem Dim objRecurPattern As Outlook.RecurrencePattern Set objOutlook = CreateObject("Outlook.Application") Set objAppt = objOutlook.CreateItem(olAppointmentItem) With objAppt .Start = Est_Finish_Date .Subject = Component ...

Frequently used formulas
Is there a way to access frequently used formulas easily? I have a report where I need to import the data and then type in the same formula each time in order to create analyzable results. Is there a quicker way? Thanks I'm not sure this will work well for you, but it might be worth a try. Why not create a workbook with just the formulas in place, but without the data? Then you'd open that workbook, import the data into it and save it out with a new name? If that's not good for you, perhaps simply copying the formulas into a notepad (.txt) file and saving it s...

Using Outlook/Exchange Server as a central dispatch manager?
I'll try to be detailed, but brief. Running Exchange 2K with mixed Outlook clients throughout office. We're a service company and we have a mailbox called "dispatch". When a service call comes in, we create a new task in the Dispatch mailbox, add the detail and then "assign" it to someone. They accept and update until the call is complete (every time a change is made it synchs with dispatch's task). When the call is complete/closed, the task in central dispatch is closed and then processed We want to enhance some of this -- are there any features in Exchan...