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