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