//retrieves and addes the product list to _DeviceType
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            try
            {
                base.OnNavigatedTo(e);
                if (e.Parameter != null)
                {
                    string lcDeviceTypeName = e.Parameter.ToString();
                    _DeviceType = await ServiceClient.GetDeviceTypeAsync(lcDeviceTypeName);

                    UpdateDisplay();
                }
                else // no parameter -> new artist!
                {
                    _DeviceType = new clsDeviceType();
                }
            }
            catch
            {
                txbMessage.Text = "Unable to populate page";
            }
        }
示例#2
0
 //----------------------------------------------------------------------------------------------------------------
 //-------------------------------------Update Device Type---------------------------------------------------------
 internal async static Task <string> UpdateDeviceTypeAsync(clsDeviceType prdeviceType)
 {
     return(await InsertOrUpdateAsync(prdeviceType, "http://localhost:60064/api/tech/PutDeviceType", "PUT"));
 }