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

Similar Articles

[PageSpeed] 36

Reply:

Similar Artilces:

.net xml editor doesn't recognize extension correctly
I am trying to use the xml desinger in .net 1.1 to create the follow schema. where USAddress is derived from Address But when I generate the xml file, the .net xml editor says "The active schema does not support the element 'street'" The schema is from a msdn .net example. What I am missing here? Thanks John Here are the xml file and xsd file: Here is the xml file: <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="MySchema" targetNamespace="http://tempuri.org/MySchema.xsd" elementFormDefault="qualified"...

Counting lines when using a filter
After using a filter to view certain rows of a spreadsheet, is there a way to get an accurate count of how many rows are shown by either clicking and dragging the mouse over the selection or clicking on the first row and then shift-click on the last row? Thanks in advance, Hagan How about using SUBTOTAL function -- Don Guillett SalesAid Software donaldb@281.com "hagan" <hagan@discussions.microsoft.com> wrote in message news:F9264E3D-5869-4371-BED7-0DBF18712832@microsoft.com... > After using a filter to view certain rows of a spreadsheet, is there a way to > get an ...

Advance Find in Activities Histories
I asked this a while back but the answer did not work, and perhaps it was that I was not clear in my description of the problem, so I will try again. I have just converted activities from 20,000 clients from Goldmine into CRM 1.2. Most of these contacts/accounts have numerous activities which we have converted to historical activities on the Activities/History Tab. When you open an Account, go to Activities, then the History tab, all the activities display. I can click on the Type title to sort them and use the page -> to move between the pages and pages of activities. In some cas...

Exchange 2003 OWA cannot locate distribution lists using 'find option'
We used Outlook Web Access 2003 on Exchange 2003. Some of our users access a shared mailbox using OWA. There is an absolutely vast contacts folder associated with it, and they need to be able to search through it for addresses. Unfortunately, we have found that if we put in part of the name of the contact in the 'to' field of the email, then it can be resolved. However, if they click on the 'find' button and put part of the name of the DL, OWA cannot find it. They cannot always just type the name in the 'to' field and then click the resolve button as sometimes they do ...

Invoice Creation
Is there a way to send or print an invoice to a customer? You can do some custom programming or create a custom invoice report in Crystal that launches from a custom button on the invoice form. I discussed this in some detail on my blog at http://icu-mscrm.blogspot.com/2004/12/customizing-printed-crm-records.html Good luck. -- Matt Wittemann http://icu-mscrm.blogspot.com "FiMA" wrote: > Is there a way to send or print an invoice to a customer? ...

Using lookup to copy values from a master to client worksheet
If I have a columns of data in a spreadsheet with, say, a name in the fist column, is it possible to create 'client' spreadsheets which contain only rows with a particular name ? So the 'Master' sheet has many rows for each name but the 'client' sheet has only entries for a particular name ? Any help or pointers much appreciated. Thanks Hi I would use 'Data - filter - Advanced Filter' for this -- Regards Frank Kabel Frankfurt, Germany "Malcolm Hind" <m.hindNOSPAM@btinternet.com> schrieb im Newsbeitrag news:Xns9575A1D6B766MalHind@67.98.68....

Advanced Conditional Formatting and Changing Cell Colours
I have three basic (for programmers) conditional formatting problems to solve in Excel for which I require some help. These are the last 3 conditions I need to complete for the worksheet so any help will be really appreciated. They are as follows: 1. If cell Y2 is > 0 and cell Z2 = 0 I need to change the colour of cell Z2 2. If cell Y2 or cell AA2 > 0 and cells V2, W2, or X2 = the value "Z" I need to change the colour of the cell containing "Z" (V2, W2 or X2). If changing the colour of only the single cell containing "Z" cannot be done, I guess changing t...

Using JAWS 11 with Access
I'm having trouble with navigating in forms. When I tab to a combo box the instructions say use the down arrows to make a selection. That just moves me to the next field. If I rest on the combo box it just keeps reading other fields on the page. Can anyone help? -- Charlie I assume these "instructions" are something supplied by JAWS. An Access combobox has to be dropped down before you can use the Down Arrow to move thru the selections. As to the "resting on the combo box...keeps reading other fields on the page" I think that this really ne...

use Matrix in vector
Matrix is a new class in GDI+ without copy ctor.So I can't use it in a vector directly. I make a new class like this : struct MatrixEx : public Matrix { MatrixEx():Matrix(){} MatrixEx(const Matrix& ma){//....} MatrixEx& operator=(const Matrix& ma){//....} } I use it in a class like this: class MyClass { //... std::vector<MatrixEx> m_Matrix; } I use it in a MFC project,and it report : "C2660 'new': function does not take 2 parameters" I don't know why. Who can tell me ? Thanks! ...

Instructions for use need to be clearer.
---------------- 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/office/community/en-us/default.mspx?mid=f4d38d0a-73f5-4cbc-81f9-c6e8b356494d&dg=microsoft.public.outlook "brinasbaby" <brinasbaby@discussions.microsoft.com> wrote in message n...

Create GoTo for Receivings Transaction Inquiry Zoom window?
Do I need to call an OpenWindow procedure to set up a GoTo to the Receivings Transaction Inquiry Zoom window? I tried setting up an Open Form GoTo using the POP Receipt Number and Vendor ID, but nothing happens when I try to drill down. I noticed on another posting that Patrick recommended using an OpenWindow procedure to open a window...can I use that here if the Open Form doesn't work? I tried setting up a procedure like so: OpenWindow of form POP_Inquiry_Receivings_Entry with a parameter of the POP Receipt Number, but I get the message 'Unknown Identifier 'OpenWindow...

XML Forum
Throne Software has opened up an XML forum at: http://www.thronesoftware.com/forum/ Join us! ...

How do I get automatic sequential numbering when using an invoice.
Mary, have a look here, http://www.mcgimpsey.com/excel/udfs/sequentialnums.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "MaryL" <MaryL@discussions.microsoft.com> wrote in message news:A9A96ABB-8284-46B6-8C6C-9FE2FFAA9C41@microsoft.com... > ...

How to create DSN Less connection on pass through query?
I have DSN Less connection code as follows for linked tables which the code is on the switchboard form: Private Sub Form_Open(Cancel As Integer) ' Minimize the database window and initialize the form. ' Move to the switchboard page that is marked as the default. Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' " Me.FilterOn = True Dim ServerName As String Dim UserName As String Dim Password As String ServerName = "CPSHOUDB15" UserName = "********" Password = "********" 'Attach the linked database table...

How do you use database
It is the first time i have ever used database and i donot now how to use it. The other problem i face is that i don't know what is for!!! so please can someone help I would recommend that you go to http://office.microsoft.com/en-us/training/FX100565001033.aspx and go thru the training tutorials. It will explain what a database is, etc. Using Microsoft Access will be a challenge for you if you don't have the basic understanding of what a database is. Definition of Database: A collection of related data. Access is a "relational" database. -- cw "Tink the Stink...

How to express Between Queries in advanced find
Hi, I need to express queries such as: <entity>.<startDate> <= Today && <entity>.<endDate> >= Today Any ideas? Regards -- Dimitris ------=_NextPart_0001_087C1335 Content-Type: text/plain Content-Transfer-Encoding: 7bit <DFoukas@discussions.microsoft.com> wrote: > I need to express queries such as: > > <entity>.<startDate> <= Today && > <entity>.<endDate> >= Today Queries in Advanced Find are, by default, AND queries unless you change it to OR. So you'd just do this by putting in ...

Creating a new object
Hello all! Our company is new using CRM customizations. We want to create a custom object (like Account, Product, Opportunity, Lead, etc...). However, we can find no documentation on how to do so. Is it possible to do this, and if so, how would we go about doing it? Also, CRM is being weird as far as the isv.config is concerned. It doesn't seem to be accessing it when it is turned to "On" from the web.config. It was working yesterday before we left, but now it's not working. Any suggestions? Maybe is there somewhere that a path is defined for the isv? Any help would ...

Failed to logon using AUTH.
I currently have an EX2k SP3 server running on a W2k DC/GC SP4 server. I recently installed EX2K3 on a W2K3 Enterprise member server, which will become our new Exchange server, into our single forest domain. I created four test users with mailboxes on the W2K/EX2k server, upon completion of this; I performed a mailbox move, of one of the test users, on the EX2K3 server successfully. The move process was fairly quick and after a refresh within Enterprise Manager the Mailboxes were shown in the ÔÇťAdministrative Group/First Storage Group/Mailboxes" container within the EX2K3 Server. I verifie...

Use of Gnumeric With Excel?
Has anyone installed Gnumeric with Excel? If so, what was your experience? Did it significantly improve statistical calculations, etc.? Thanks, W. D. Allen ballensr@adelphia.net end W. D. Allen - What do you mean by "Gnumeric with Excel"? It is my understanding that Gnumeric is spreadsheet _replacement_ for Excel. So it is not something you use _with_ Excel. For a comparison of Gnumeric with mostly pre-2003 Excel, see Fixing Statistical Errors in Spreadsheet Software: The Cases of Gnumeric and Excel at http://www.csdassn.org/software_reports/gnumeric.pdf For more E...

Topics in XML
Hi, I am a .NET Software Developer but I really have a hard time in understanding XML and its use in my applications so if anyone can tell me what are the important topics in .NET related to XML and any online material or books I can find. Thanks in advance. Check this: http://www.topxml.com/system_xml/default.asp Intermediate wrote: > Hi, > > I am a .NET Software Developer but I really have a hard time > in understanding XML and its use in my applications so > if anyone can tell me what are the important topics in .NET > related to XML and any online material or boo...

Create New Style in MS Word 2007
Hi I am trying to create a new style in MS Word 2007 that should go after "Heading 3". I am can't use Heading 4 since it is not numbered. So my document has levels 1 1.1 1.1.1 1.1.1.1 << This is the new style I am trying to create. But unfortunately I am not able to find a way to number it and use the "Continue Number from previous list". Also how to add levels to the style. Is there any way to copy Heading 3 and start from there? Thanks in advance. -- kuul13 ------------------------------------------------------------------------ k...

Using POP for incoming, SMTP for outgoing
In Outlook Express, I could set up an account that used my company's POP3 mail server for incoming and my ISP's SMTP mail server for outgoing mail. I have set all the same types of settings in Outlook 2002 (I've downloaded & installed all the lastest patches, fixes, etc.). It won't let me send. I can receive, but it won't send Any ideas or further resources are appreciated. joezeppy wrote: > In Outlook Express, I could set up an account that used my company's > POP3 mail server for incoming and my ISP's SMTP mail server for > outgoing mail. I h...

Advanced Optimization Options
are 'Advanced Optimization' Options Inherited? like I have a app in which I have set these options and in it I am using 3rd party control of which I don't have source code nor do i know if they are using any of these options. so if I set some advanced optimization options will those also apply to that control? "Abhishek" <user@server.com> wrote in message news:i5j779$n6h$1@speranza.aioe.org... > are 'Advanced Optimization' Options Inherited? No. "Abhishek" <user@server.com> wrote > are 'Advanced O...

Use Radiostream in WMP Playlist in Mediacenter in Win7
Hi In WMP I have some Radiostreams grouped in a playlist that I can easily listen to in WMP. How can I access these from Mediacenter? Thanks Franz MC has support Live365.com and XM Radio built in, but you might want to look at MC Shoutcast plugin as well. http://www.hack7mc.com/2009/01/bringing-shoutcast-radio-to-media.html -- James Wolf [MS-MVP] Orlando, FL "Franz Leu" <mclionremoveforspam@freesurf.ch> wrote in message news:OHrgAZqnKHA.5552@TK2MSFTNGP05.phx.gbl... > Hi > > In WMP I have some Radiostreams grouped in a playlist that I can ...

CRM should let me decouple conditional statements in Advanced Find
We have set up a number of saved searches in CRM 3.0 that users would like to use Save As to create a copy and then add search terms to. Unfortunately, CRM 3.0 does not allow you to decouple conditional statements once the search has been saved. In order to add an AND condition, this feature is required. -- Thanks, Justin ---------------- 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...