Esempio n. 1
0
 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());
            }
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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"));
 }
Esempio n. 6
0
 public void UpdateControl(clsAllInstrument prInstrument)
 {
     txbCondition.Text  = "Condition: " + prInstrument.Condition;
     txbReturnDate.Text = "Return Date:" + prInstrument.DateOfReturn;
 }
Esempio n. 7
0
 private void dispatchInstrumentContent(clsAllInstrument prInstrument)
 {
     _InstrumentsContent[prInstrument.Type].DynamicInvoke(prInstrument);
     SetDetails(prInstrument);
 }
Esempio n. 8
0
 private void RunUsed(clsAllInstrument prInstrument)
 {
     ctcInstrumentSpecs.Content = new ucUsedInstrument();
 }
Esempio n. 9
0
 private void RunNew(clsAllInstrument prInstrument)
 {
     ctcInstrumentSpecs.Content = new ucNewInstrument();
 }
Esempio n. 10
0
 private void updatePage(clsAllInstrument prInstrument)
 {
 }
Esempio n. 11
0
 public void UpdateControl(clsAllInstrument prInstrument)
 {
     txbWarrantyPeriod.Text = "Warranty Period: " + prInstrument.WarrantyPeriod;
     txbImportDate.Text     = "Import Date: " + prInstrument.ImportDate;
 }
Esempio n. 12
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     _Instrument = e.Parameter as clsAllInstrument;
     SetDetails(_Instrument);
 }