private async void button3_Click(object sender, RibbonControlEventArgs e) { var order = new WebAPI.Controllers.Order() { Payload = ConvertWebModel() }; Globals.ThisAddIn.TheWindowsFormsSynchronizationContext.Send(SendOrPostCallback, await order.Create(WebAPI.Models.OrderMode.AsSoonAsPossible)); }
private async void booking_Click(object sender, RibbonControlEventArgs e) { Debug.WriteLine("booking_Click: {0}", Thread.CurrentThread.ManagedThreadId); var order = new WebAPI.Controllers.Order() { Payload = ConvertWebModel() }; Globals.ThisAddIn.TheWindowsFormsSynchronizationContext.Send(SendOrPostCallback, await order.Create(WebAPI.Models.OrderMode.AtTonight)); }