private void SetDetails(clsAllInstrument prInstrument) { txbInstrumentName.Text = "Instrument Name: " + prInstrument.InstrumentName; txbPrice.Text = "Price $: " + Convert.ToString(prInstrument.InstrumentPrice); txbType.Text = "Type: " + prInstrument.Type; txbQuantity.Text = "Quantity:" + Convert.ToString(prInstrument.Quantity); }
internal async static Task <string> DeleteInstrumentAsync(clsAllInstrument clsAllInstrument) { using (HttpClient lcHttpClient = new HttpClient()) { HttpResponseMessage lcRespMessage = await lcHttpClient.DeleteAsync ($"http://localhost:60064/api/shop/DeleteInstrument?prInstrumentID={clsAllInstrument.InstrumentID}"); return(await lcRespMessage.Content.ReadAsStringAsync()); } }
private void SetDetails(clsAllInstrument prInstrument) { _Instrument = prInstrument; txbInstrumentName.Text = "Instrument Name: " + prInstrument.InstrumentName; txbBrand.Text = "Instrument Brand: " + prInstrument.Brand; txbDescription.Text = "Instrument Description: " + prInstrument.Description; txbType.Text = "Instrument Type: " + prInstrument.Type; txbPrice.Text = "Instrument Price: " + Convert.ToString(prInstrument.InstrumentPrice); txbQuantity.Text = "Items in Stock: " + Convert.ToString(prInstrument.Quantity); (ctcInstrumentSpecs.Content as IInstrumentControl).UpdateControl(prInstrument); }
private void PushData(clsAllInstrument prInstrument) { try { _Order.InstrumentID = prInstrument.InstrumentID; _Order.OrderDate = (Convert.ToString(DateTime.Today)).Substring(0, 10); _Order.Quantity = Convert.ToInt16(txtOrderQuantity.Text); _Order.OrderPrice = (_Order.Quantity * prInstrument.InstrumentPrice); _Order.CustomerCity = txtCustomerCity.Text; _Order.CustomerName = txtCustomerName.Text; } catch (Exception ex) { txbMessage.Text = ex.Message; return; } }
internal async static Task <string> UpdateInstrumentAsync(clsAllInstrument prInstrument) { return(await InsertOrUpdateAsync(prInstrument, "http://localhost:60064/api/shop/PutInstrument", "PUT")); }
public void UpdateControl(clsAllInstrument prInstrument) { txbCondition.Text = "Condition: " + prInstrument.Condition; txbReturnDate.Text = "Return Date:" + prInstrument.DateOfReturn; }
private void dispatchInstrumentContent(clsAllInstrument prInstrument) { _InstrumentsContent[prInstrument.Type].DynamicInvoke(prInstrument); SetDetails(prInstrument); }
private void RunUsed(clsAllInstrument prInstrument) { ctcInstrumentSpecs.Content = new ucUsedInstrument(); }
private void RunNew(clsAllInstrument prInstrument) { ctcInstrumentSpecs.Content = new ucNewInstrument(); }
private void updatePage(clsAllInstrument prInstrument) { }
public void UpdateControl(clsAllInstrument prInstrument) { txbWarrantyPeriod.Text = "Warranty Period: " + prInstrument.WarrantyPeriod; txbImportDate.Text = "Import Date: " + prInstrument.ImportDate; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); _Instrument = e.Parameter as clsAllInstrument; SetDetails(_Instrument); }