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

Similar Articles

[PageSpeed] 5

Reply:

Similar Artilces:

Using Remote Access within my own house??
I soon will have two XP computers, one in the basement and the main one on the second floor. Would it be possible to use the computer in the basement as the Remote Access user of the computer upstairs. This would avoid downloading files to the basment computer when I would really prefer them to be on the main compuer. It would mean that my outgoing email and news posts would all be in the same computer, the main one. I'm running DSL with a cable connection from the router to the main computer, and a wireless connect to the computer in the basement. I've never used...

how to use Excel 2007 Sensitivity Analysis
could any help provide a sample excel worksheet with sensitivity analysis demo, including use of scenario manager to generate scenario summary. ...

Question re. use of animation rebuild VBA
Hello, I am preparing a interactive ppt for use at a kiosk and would like to utilize the following VBA code into a macro in order to rebuild animation on previously viewed slides: Sub ResetSlide() ' The number after GotoSlide is the slide number. SlideShowWindows(1).View.GotoSlide 1, msoTrue End Sub (Dumb) Q#1: Does the part of the code that says " ' The number after GotoSlide is the slide number." stay in the code or is that just an instruction to the code user? Either way, does the (number) need to be changed for each situation? Q...

New case creation error
Hi I have CRM 3.0 installed in a production server with windows 2003 server sp1, SQL server 2000 sp4 working well for several months but now when I try to create a new case the system display the following: An error has ocurred.For more information, contact your system administrator Thanks a lot. Gilbert ...

Sorting a column by using formula #3
I am trying to use sort function just to delete blank cells in between Sort order doesn't matter actually. Data is coming by the use of simple cell reference of "another sheet -- Prais ----------------------------------------------------------------------- Praise's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1558 View this thread: http://www.excelforum.com/showthread.php?threadid=27144 Hi you may use the following addin to filter out blank cells: http://www.rondebruin.nl/easyfilter.htm -- Regards Frank Kabel Frankfurt, Germany Praise wrote: &g...

use formula on external data range
Hi All, I've got a problem with data I read from a database. I wrote a VBA Sub in Excel 2007 with retrieves data via ActiveSheet.QueryTables.Add() per OLEDB out of a database. This works fine and puts the data in the range beginning on cell "A8" Now my problem: I have a formula '=SUM(A8:A10) in cell "B1". This formula always comes out = 0, although there are values in the cells. But if I edit cell "A8" without changing the value (just the alignment changes) it is recognized and the formula shows = 1 What am I missing here ? Thanks ...

Using Invoice template: overriding formulae
I am having a problem when using the Excel 2000 Invoice template. Sometimes I enter text into the 'Quantity' column. Then Excel is unable to calculate the Total, in the blue shaded area. My question is: How do I override the formula calculation in the shaded area to simply enter the numbers and/or text of my choosing? WTIA Andrew Stucken -- Evil flourishes when good men do nothing. Don'y know how to override the original protectiion. Easiest would be to copy and paste into new sheet and use this to create your own template. Roger "Enigmaman" wrote: > I a...

All PIDS Used but need to re-install on new computer
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Intel We have a student edition with three installs already. However one of the Macs had to have a hard drive replaced due to failure and now we that we have re-installed we find that this PID is on conflict with the other ones. Apparently when I activated this re-install it used the same PID as one of the other installs. Our son (the student) has no idea wher his packaging. Is there a way to resolve this issue. it seems to me like Microsoft's activation is saying we activated too many installs? Rick Nash In article <5...

Creating Barcode Labels in RMS
i have a customer who is creating their own 'in house' Barcodes and then using RMS to print the corresponding label and then scanning item thereafter to sell it. However, it appears that the labels being printed do not Scan as the same number originally created, e.g., Customer created new Item and Manually typed in the number she wanted which was an 8 digit Barcode 20068056 and then added the text and price etc., also setting product as an EAN 8 and then printing off the labels. The label actually scans thereafter as 20068059 not 20068056 as it should be. Can anyone help with t...

Unable to set up on-line account
Missage I get when I try to connect to an on-line bank. I checked my internet connection and it's working. I'm able to open IE browser within Money 2005. Please help. --------------------------- Microsoft Money --------------------------- Money cannot complete a required online call at this time. Please check your Internet connection settings and try again. --------------------------- OK Another reference to M05, what's going on? Bal wrote: > Missage I get when I try to connect to an on-line bank. > I checked my internet connection and it's working. I'...

Creating folders
May i know how to create an archive file folder in outlook folder thanks Go to the Tools menu and select Options, then select the Other tab, znd then select Auto Archive. There are options to set for Auto Archiving and also where the archive file is located. -- Dave Herard MOS Master Instructor Microsoft Certified Trainer www.clicknlearnct.com "Amin" wrote: > May i know how to create an archive file folder in outlook folder thanks ...

using option buttons #2
sorry im a bit of a noob, what do you mean by frame? :confused -- 4nd ----------------------------------------------------------------------- 4ndy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1494 View this thread: http://www.excelforum.com/showthread.php?threadid=26576 When you're designing the userform inside the VBE, you'll see an icon on the toolbox toolbar that looks like an outline of a frame with xyz in the top border. If you let your cursor linger over the icon, you'll see Frame as the tooltip. If you put your optionbuttons within that...

Error in open() function in CDaoDatabase class of MFC-> Unhandled exception in myProject.exe:0xc0000005:Access violation.
Hi! I m working on a database project in which i use CDaoDatabase class of MFC to create the connection with a Access .mdb file by using its open() function. and then use CDaoQueryDef class to save the query in the database. It works well when I run my program first time for a database but if I select the another or same Access .mdb file it give error in its open funcation. the error msg is somthing like this-> Unhandled exception in myProject.exe:0xc0000005:Access violation. Pls help me to solve this problem as early as possible. Are you using the try/catch(CDaoException* e) blocks? If...

Creating Appointments 11-22-06
Hi There I am realtively new to CRM and wonder if anyone can offer me assistance. When I set up an appoinment through CRM, it doesnt ping a reminder in Outlook for me. I would imagine the intergration of Outlook and CRM would do this. Should this work or am I expecting to much, or have I got some configuartion to do? Regards Peter If you have the CRM outlook client, go to the CRM, Options menu. On the synchronization tab, ensure that the following are checked: - Appointments I'm attending - Set this computer to be the Synchronizing client - Synchronize the CRM items in my Outlook ...

Address Book Sharing/Creation
We are attempting to get our Exchange server up and running and I am quite new to the whole Microsoft Mail thing... (long time sendmail/qmail user) We are attempting to share Address Books and enable the default address book on our exchange server. Currently the default AB that comes up is basically the listing of users on the exchange server. I would like to create a couple address books from current information. I have a saved CSV that contains our customer data that I would like to import. I have succesfully done this in my personal Outlook but when I attempt to share the AB other users are...

ADVANCE FILTER SORT WINDOW
Hi! Could anyone please help me? I have this continuous form called "frm_Status01" with a button that has this code "DoCmd.RunCommand acCmdAdvancedFilterSort" to open the advance filter sort window. After I have completed selecting all the fields I wanted, key in all the cretirea, sort, etc then click the apply filter button shown at the advance filter sort window and my "frm_Status01" is already displayed and active. The advance filter sort window didn't close after I applied the filter. Is there any way to close it immediately after I applied the...

create window before calling CDialog::DoModal()?
Is it possible to create the window (hidden?) before calling DoModal(), so that SetForegroundWindow() has something to operate on? CDialog about(IDD_ABOUTBOX); CWnd *pAbout = &about; pAbout->SetForegroundWindow(); // exception The reason is that I want to acquire/release a mutex around the assignment of pAbout, but another thread using pAbout can't do operations like SetForegroundWindow() until I call DoModal(). I can't release the mutex after DoModal() because DoModal() doesn't return until the window goes away, defeating the purpose of pAbout. -frank Frank Cusac...

using office for different login users
Hi I'm new to Mac and would appreciate any help. I have installed office using 1 user a/c and when I login to another user a/c , I could not see the office programs. I found an earlier thread on this and the answer was to install office on the root application folder instead of the user application folder. reason being all programs installed in root application folder wil be available to all users. How do I check where I have installed it ? If i have installed it in the user application folder , do I have to uninstall ? When I install the office, I don't recall the s/w asking me whe...

Milo: Using Fp2003 to allow people to add an Outlook Calendar ite
Have looked around a lot on the net and can't find a clear answer to something I hope is simple. I'm the webmaster (FrontPage 2003) for a small non-profit. They asked if there were any way to put an "Add to my Outlook Calendar" link next to new events we post. I was able to create an .ics (iCalendar) file and add that to the site, but when I link to it, Firefox just opens it as text and IE just puts it in an obscure folder (C:\Documents and Settings\All Users\Documents\iMacros\Downloads) so neither actually added it to Outlook. I'm not loyal to doing t...

Money05-using on laptop/no floppy=no backup?
how can i backup money when it wont let me change the floppy default? it wont even let me backup on current hd. any one know what i can do?TIA bill In microsoft.public.money, BillH wrote: >how can i backup money when it wont let me change the floppy default? it >wont even let me backup on current hd. any one know what i can do?TIA eye wood yous uh USB flash drive. Can you use the floppy otherwise ? ( Really just checking what type of user are you: Admin, guest etc ? as it sounds like you are locked down and can't write) "Cal Learner-- MVP" <via_newsgroup@ple...

View Access 2007 using 2003 version
I know MS has a fix to open Excel, Word, and PP using Office 2003 that was created using the MS Office 2007 product. But do they have something to do the same for Access? I'm betting that a Access 2007 can be saved down to 2003 but I'd rather not do that. On Mon, 18 Feb 2008 12:13:04 -0800, TX - CAP <TXCAP@discussions.microsoft.com> wrote: No. But there is a free runtime version of Access 2007 that may suit your needs. http://www.microsoft.com/downloads/details.aspx?FamilyId=D9AE78D9-9DC6-4B38-9FA6-2C745A175AED&displaylang=en -Tom. >I know MS has a fix to open Ex...

Cannot create new, reply, forward
Hello - I am using Win XP and Outlook 2002 on an Exchange server. We have recently changed domains and since then I can receive mail but my new message, reply and forward commands no longer work. Buttons are there by commands are greyed on teh menus or missing. Have tried uninstalling Office XP (inc registry keys) and reinstalling, then installing SP1 for OffXP but that didn't seem to rectify this. Does anyone know why? I'm going crazy and my systems manager is baffled. All suggestions welcome. Thanks I can't, it won't let me access the Email Accounts settings either...

Trying to use Access 2000 databases in Access 2003
We use two very simple (no macros, etc.) but important databases in our office. One was created in Access 2000, and the other was converted to Access 2000 from an earlier version. When we try to open either file in Access 2003, the program essentially stops responding. We are sometimes able to open the files after restarting Access, enabling the databases under Help/About Access and restarting Access again. We've set the security level to "low" to discontinue the security prompts. Is there any way to convert these two files to the 2003 format? If not, is there some oth...

xml pushing job postings
We have asp.net app that handles our jobs and I am looking for a way to push the jobs to multiple job boards so we don't have to re-type them for each board. I know there is a way as there are different companies out their that do that (push to 25 major boards, such as Monster and Career builder). I know there is an xml setup called Staffing Exchange Protocal that will allow you post resumes and jobs, but nothing on how to use it. I would like to add it to my asp.net app if I could find something on it. Does anyone know how to do this or if there is something out there on it? Thanks, ...

Want to plot a graph using data from 2 different worksheets in sam
workbook. I want to take 2003, 2004 sales and 2005 sales on same graph. Data is in the same file with different worksheet, I cant seem to plot it. I had to copy all the data on same worksheet and then plot it. But there must be a way to do it without this action. cteq1@hotmail.com Try charting one year then: Chart; Source Data; Add to add the rest. "cteq" <cteq@discussions.microsoft.com> wrote in message news:C9FA73D4-E26C-4AE7-B6C6-F3A8E7AEBADA@microsoft.com... > workbook. > > I want to take 2003, 2004 sales and 2005 sales on same graph. Data is in > the &...