Пример #1
0
 private void editProduct(clsAllProduct prProduct)
 {
     if (prProduct != null)
     {
         Frame.Navigate(typeof(pgProduct), prProduct);
     }
 }
Пример #2
0
 private void updatePage(clsAllProduct prProduct)
 {
     _Product      = prProduct;
     txtName.Text  = _Product.ProductName;
     txtDate.Text  = _Product.Date.ToString("d");
     txtPrice.Text = _Product.Price.ToString();
     (ctcProductSpecs.Content as IProductControl).UpdateControl(prProduct);
 }
Пример #3
0
        internal static async Task <string> DeleteProductAsync(clsAllProduct prProduct)
        {
            using (HttpClient lcHttpClient = new HttpClient())
            {
                HttpResponseMessage lcRespMessage = await lcHttpClient.DeleteAsync($"http://localhost:60064/api/product/DeleteProduct?ProductName={prProduct.ProductName}&PlaceName={prProduct.PlaceName}");

                return(await lcRespMessage.Content.ReadAsStringAsync());
            }
        }
Пример #4
0
 public void UpdateControl(clsAllProduct prProduct)
 {
     txtPrice.Text  = prProduct.Price.ToString();
     txtAmount.Text = prProduct.Amount;
 }
Пример #5
0
 public void PushData(clsAllProduct prProduct)
 {
     prProduct.Price    = decimal.Parse(txtPrice.Text);
     prProduct.Amount   = txtAmount.Text;
     prProduct.Category = "3";
 }
Пример #6
0
 private void dispatchWorkContent(clsAllProduct prProduct)
 {
     _ProductContent[prProduct.Category].DynamicInvoke(prProduct);
     updatePage(prProduct);
 }
Пример #7
0
 private void RunVegetable(clsAllProduct prProduct)
 {
     ctcProductSpecs.Content = new ucVegetable();
 }
Пример #8
0
 private void RunMeat(clsAllProduct prProduct)
 {
     ctcProductSpecs.Content = new ucMeat();
 }
Пример #9
0
 private void RunFruit(clsAllProduct prProduct)
 {
     ctcProductSpecs.Content = new ucFruit();
 }
Пример #10
0
 public void UpdateControl(clsAllProduct prProduct)
 {
     txtPrice.Text     = prProduct.Price.ToString();
     txtFreshness.Text = prProduct.Freshness;
 }
Пример #11
0
 public void PushData(clsAllProduct prProduct)
 {
     prProduct.Price     = decimal.Parse(txtPrice.Text);
     prProduct.Freshness = txtFreshness.Text;
     prProduct.Category  = "2";
 }
Пример #12
0
 public void UpdateControl(clsAllProduct prProduct)
 {
     txtPrice.Text   = prProduct.Price.ToString();
     txtQuality.Text = prProduct.Quality;
 }
Пример #13
0
 public void PushData(clsAllProduct prProduct)
 {
     prProduct.Price    = decimal.Parse(txtPrice.Text);
     prProduct.Quality  = txtQuality.Text;
     prProduct.Category = "1";
 }
Пример #14
0
 internal static async Task <string> InsertProductAsync(clsAllProduct prProduct)
 {
     return(await InsertOrUpdateAsync(prProduct, "http://localhost:60064/api/product/PostProduct", "POST"));
 }
Пример #15
0
 internal static async Task <string> UpdateProductAsync(clsAllProduct prProduct)
 {
     //throw new NotImplementedException();
     return(await InsertOrUpdateAsync(prProduct, "http://localhost:60064/api/product/PutProduct", "PUT"));
 }