Silverlight, wcfRIA, how to trap completion of an [Invoke] method in DomainService1.cs

this piece of code:
protected void recalculateMetrics(object sender, RoutedEventArgs e)
int daysToAverageOver = 20; // for a 20 day moving average
context.recalculateMetrics(daysToAverageOver, invokeOperation_ExitHandler, null);
context.deleteOldClosingPrices(invokeOperation_ExitHandler, null);
context.deleteAnyOldStockNames(invokeOperation_ExitHandler, null);
context.updateAllPortfolios(invokeOperation_ExitHandler, null);
context.updateTheCountersInAllPortfolios(nowRefreshScreen_ExitHandler, null);
context.zeroOutAnyUnaverageableStocks(daysToAverageOver, invokeOperation_ExitHandler, null);
context.SubmitChanges();
context.SendEmails();
context.Load<stk_StockNames>(context.getMissingStockNamesQuery(), LoadBehavior.RefreshCurrent, returnSet =>
fires off a whole bunch of [Invoke] methods in DomainService1.cs, which all execute asynchronously.
Once updateAllPorfolios() and updateThe CountersInAllPortfolios () are completed, then the client screen should refresh with the new numbers.  You can see me trapping the completion event of the Invoke operation.  But how do I trap the completion
of the actual async method?  I figure that IAsyncResult is involved.  I have googled around all the forums without being able to see how to do it in this particular case.
Any help appreciated.

I don't really follow your question.
You appear to be supplying callbacks there.
They fire when the process is complete and you get a result back from the server.
If I illustrate this with a piece of my code thus:
private void LoadSites()
siteService.LoadSiteList(LoadSiteListCallback, null);
private void LoadSiteListCallback(ServiceLoadResult<Site> result)
IEnumerable<Site> _sites = result.Entities.OrderBy(x => x.Description);
ObservableCollection<Site> sts = new ObservableCollection<Site>();
foreach (var item in _sites)
sts.Add(item);
Sites = sts;
ADGroupSites = new ObservableCollection<AdminADGroupSiteVM>();
RaisePropertyChanged("Sites");
RaisePropertyChanged("ADGroupSites");
LoadSiteList is called asynchronously.
Processing returns from LoadSites.
When the server returns the data LoadSiteListCallback is invoked and it does stuff with the data.
Please don't forget to upvote posts which you like and mark those which answer your question.
My latest Technet article - Dynamic XAML

Similar Messages

  • How to clear completed reminders in iCal

    Has anyone figured out how to clear completed (checked done) reminders in iCal?

    Joe,
    That clarifies the question for me. Go to iCal>Preferences>Advanced and make your choices:

  • How do I completely wipe out old email account info?

    I periodically have problems with my ATT email account and it quits downloading incoming mail to MacMail. ATT swears it is not their problem even though it isn't happening with any other email account but ATT. I don't have problems sending mail.
    In the past I have fixed it by deleting the old account and going through adding it back as a "new" account to set it up again. In the past the 'Add Account' process would take me through setting up the imap mailbox and server, then go to the smtp setup. I have had to do this numerous times in the past - every few months.
    But this time the first "Add Account" screen already displayed the email address (even though I deleted the account). And as soon as the imap info was entered the "Add Account" process appeared to complete the smtp setup automatically as it displayed the completed screen.
    After that MacMail went through what appeared to be the downloading of emails into my inbox (several thousand of them). The bar in the "Mail Activity" area in the lower left corner continued to move across and the number of emails remaining was displayed.
    In spite of that, the emails never showed up in my inbox. Oddly, the "Notes" from my iPhone (which are sent to my email automatically) were downloaded - just not any of the emails. I can send emails.
    The ATT webmail is still showing all the emails and I can send and receive from webmail. I just can't download into MacMail.
    It appears that somewhere in all the system stuff my Mac is retaining some ATT information and pulling that information instead of starting from scratch and truly setting it up as a new account. Where is all that old infor stored and how do I completely get rid of it?
    Oddly, at the same time I was having the problems with my Mac, my iPhone stopped downloading ATT email as well. I was able to fix that by deleting the account and setting up again.
    Thanks,
    Camille

    All of a sudden now - two whole days later - all the emails have finally appeared. I have no clue what is going on.

  • HT1311 For some unknown reason I have two Apple ID/Accounts in operation which is causing an issue. How do I completely delete one of these Accounts?

    For some unknown reason I have two Apple ITunes/ID Accounts in operation.
    How do I completely delete one of these Accounts?

    I have a similar situation.. in my case, I started using an Apple ID a while back, then when MobileMe was introduced, I got an account there, and somehow that is the account that is mostly used when making updates or purchases.
    Sometimes when making updates, it prompts me for the PW for one account, and sometimes for the other.
    This is a real pain - is there anyway both these accounts can be consolidated into one?  When I asked an Apple rep, I was told 'no', but they have been known to make mistakes when giving advice.  So, is there a way?  Technically, I don't see this as a problem.. but Apple seems to be of the opinion that this would lead to having apps 'shared' amoung users. I think all that would be necessary if for me to provide the necessary proof that both accounts are indeed mine, and not belonging to someone else.
    If not, what about deleting the apps registered to one account, and then re-purchasing them with the other account?  To do this, I would need to identify which apps are registered to which accouts - is this possible? Most of my apps are free, but there are a few I paid for.. not many, so this possible solution might work and not cost too much.  Ideas?

  • HT1918 how can i completely remove a credit card from my account?

    how can i completely remove a credit card from my apple id?

    Hi Craig,
    Thanks for visiting Apple Support Communities.
    Using the steps from the article above (iTunes Store: Changing your payment information), you should be able to select "None" as your payment method. This will remove your credit card from your iTunes Store account (Apple ID).
    Changing your payment information using an iOS device
    Tap Settings on the Home screen.
    Tap iTunes & App Stores.
    Tap your Apple ID. (If you aren't signed in, enter your Apple ID and password and tap Sign In.)
    Tap View Apple ID.
    Enter your Apple ID password.
    In the Edit section, tap Payment Information.
    Update the information that you want to change.
    Note: You can find the payment methods that the iTunes Store accepts in the Payment Type section. If you don't want a payment method on your account, select None in the Payment Type section.
    Best Regards,
    Jeremy

  • HT1473 I recently had to replace my hard drive and lost my iTunes library. Now I cannot transfer the library from my iPod to iTunes on the new hard drive (same computer). How can I complete the transfer?

    I recently had to replace my hard drive and lost my iTunes library.  When I try to transfer the content from my iPod to iTunes on the new hard drive (same computer), it would only let me transfer iTunes store purchases. How can I complete the transfer of all the content on the iPod back onto the computer?

    Recover media from iPod
    See this post for options on moving your iPod data back to your computer.
    tt2

  • My iPad is disabled, but I know the passcode.. When i connect it to iTunes it says it can't access it because it has a passcode. How can i get rid of the passcode without resetting the iPad? And if there is no way to do so, how do I completely reset it?

    My iPad is disabled, but I know the passcode.. When i connect it to iTunes it says it can't access it because it has a passcode. How can i get rid of the passcode without resetting the iPad? And if there is no way to do so, how do I completely reset it?

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.htmlhttp://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tbhttp://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Devicehttp://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htmhttp://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • How do i reset my mac completely? I have parental controls and cant seem to get to time machine cause i bought the computer with parental controls on it and they did not have the password. How do i completely reset my macbook pro?

    how do i reset my mac completely? I have parental controls and cant seem to get to time machine cause i bought the computer with parental controls on it and they did not have the password. How do i completely reset my macbook pro?

    If you have a rescue email address (which is not the same thing as an alternate email address) on your account then the steps on this page will give you a reset link on your account : http://support.apple.com/kb/HT6170
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps on this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5620
    Or, if it's available in your country, you could change to 2-step verification : http://support.apple.com/kb/HT5570

  • Use of BAT file - How do you completely delete 150 phones and their associate DNs?

    How do you completely delete 150 phones and their associate DNs? All the phones are in the same device pool. I prefer BAT way.
    Version of the CUCM: 8.6.2
    Type of phones: 7962 phones - associated with the same device pool.
    Additinal questions: Is there a way to delete elegantly all the phones and their associated DNs when all the phones are associated to the same device pool? I rather not work with specific extensions and MAC addresses.
    Thank you,
    Calin Lupas

    Hi Calin,
    Using BAT this will require 2 - passes. 1 for the phones and 1 for "unassigned DN's". this is nicely shown in the attached doc;
    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/bat/8_0_1/bat-801-cm/t03delph.html#wp1342774
    Of course for the DN's you could delete them via the Route Plan report>Unassigned DN>select all>Delete
    Cheers!
    Rob

  • How do I complete an electronic signature field in an Interactive PDF form (created in Indesign)?

    How do I complete an electronic signature field in an Interactive PDF form (created in Indesign)? This form will serve as an employment application on a website. The goal is to have any person (interested in applying for a job via the Internet) access, complete and electronically sign the form upon submission.

    Hi,
    Via createPDF you would not be able to electronic sign the PDF form, you would either require Adobe Reader or purchase Adobe Acrobat to sign the PDF.
    To download Adobe Reader
    http://get.adobe.com/reader/
    You can purchase Adobe Acrobat
    http://www.adobe.com
    ~Pranav

  • How can I completely wipe the hard drive with out the Mac OS X disc? I don't need any of the info on the computer.

    How can I completely wipe the hard drive with out the Mac OS X disc? I don't need any of the info on the computer.

    You can't unless you have a bootable system on an external drive you can use. Otherwise, you need either the original disc that came with your computer or a retail copy of Snow Leopard DVD. The latter contains 10.6.3, so your model must be capable of booting from that or an earlier version of OS X.
    You can purchase replacement discs from Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Apple - Support - Contact Apple Support.
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.

  • How to activate completion for PHP in TextMate or  BBEDIT?

    Hi, I plan to use TEXTMATE or BBEDIT to program with PHP but I don't know how to install the Bundle or the plug-in for PHP Completion. I downloaded the plug-in PHPCodecompletion.tmbu and zipped it into user/library/application support/textMate/Bundles. I don't know how it works for BBedit.
    The question is: how to activate completion for PHP in TextMate or BBEDIT?
    Thanks for help.
    Kind regards
    Mac Book Pro Core Duo   Mac OS X (10.4.9)  

    I think you can make use of the Badi BADI_EXTEND_IDENTITY, Because this BAdi can be used based on filters and it has the methods which can let us know the before and after values of the  User Indentity from the method
    BADI_IDM_HR_COMMUNICATION       BADI_IDM_HR_COMMUNICATION     Implementation: Enhancement for Identity Management Functions
    And in this implementation try top check the method IF_BADI_EXTEND_IDENTITY~PRE_MODIFY_CHECK_IDENTITY

  • How can I completely delete imessagefrom my Iphone 5?

    how can I completely delete imessagefrom my Iphone 5?

    The Messages app is a built in application. It can't be deleted. You could move it to a folder or to the last home page so that you don't have to look at it.

  • How do I completely crop a PDF so that the cropped data is removed and the file size is reduced?

    How do I completely crop a PDF so that the cropped data is removed and the total file size is reduced?
    When I use the "Crop" function, the cropped data still remains in the file and there is no reduction in file size. I need a way to truly crop a PDF using Acrobat software.

    When you export, try to get the full file path or else you will have to do a lot of manual searching.
    If you downloaded the picture from Messages, the picture is stored in your User Library/Messages. to make your User Library visible, hold down the option key while using the Finder “Go To Folder” command. Enter ~/Library/Messages/Attachments. 
    If you prefer to make your user library permanently visible, use the Terminal command found below.
    http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/
    You might want to bookmark the command. I had to use it again after I installed 10.8.4. I have also been informed that if you drag the user library to Finder it will remain visible.

  • How to retrieve complete report output in HTML format

    Hi,
    I'm looking for how to retrieve complete report output in HTML format.
    I have tried the following and it only give me first page of the report output where in the actual report output should be 5 pages. Is there something I'm missing.
    CallbackOption[] boCallOpt = new CallbackOption[1];
    ImageManagement boImgMan = new ImageManagement();
    boImgMan.setCallbackScript("getImage.jsp");
    boImgMan.setImageManagementHolder("imageName");
    boImgMan.setDocumentReferenceHolder("docRef");
    boCallOpt[0] = boImgMan;
    RetrieveData oRetrieveData = new RetrieveData();
    RetrieveView oRetrieveView = new RetrieveView();
    oRetrieveView.setCallbackOption(boCallOpt);
    oRetrieveData.setRetrieveView(oRetrieveView);
    Action[] oActions;
    oActions = new Action[1];
    oActions[0] = fillPrompts;
    oReportEngine.getDocumentInformation(boDocInfo.getDocumentReference(), null, oActions, null,oRetrieveData);
    Testing this on BOE XI 3.0
    Thanks,

    For Web Intelligence, HTML is an interactive viewing format and not an export format such as PDF.
    Note that the HTML will be embedded with postback URLs to the application for images and drill downs.
    Closest you'd get is to be able to specify HTML output of an entire REPORT rather than REPORT_PAGE in the ViewSupport.setViewMode method.  But this brings back just one report in the document, and will have postback URLs mentioned above.
    Sincerely,
    Ted Ueda

Maybe you are looking for

  • Stock ans sale order stock

    Dear All, What is difference b/w stock and sale order stock.and what is its impact if i use strategy 40.and what is the movement type to transfer stock to sale order stock

  • Scrollbar in normal report

    hi expert . i am doing a report programing but my fields are many so the output header is not comes in a row. so i want to know that there is any possiblety so that i use scrollbar below to the report if there is , plz tell me..

  • Java & ABAP

    Hi, Can anybody tell me the advantages of java over abap and also the differnces between abap and java.

  • Confusion of Interpreters

    Hello, I recently wrote a script for a friend that includes a GREP function. When she ran it she got an error message that ends with: Interpreter: CS2 (4.0) That explains why there is an error because there was no GREP option in the Find/Change dialo

  • I keep getting the message: "cannot find add-on"

    Two months ago I installed (unsuccesfully) the PS add-on "MyColorPicker". Every time I start up the computer I get this message from Adobe Creative Cloud Desktop App. In the Desktop App is shown that I "updated" the Add-on some days ago, but opening