public NavProduct(Product p) { Count = p.Dostępna_ilość; Description = p.Opis; Name = p.Nazwa; No = p.No; Price = p.Cena; VendorNo = p.Dostawca; }
/// <remarks/> public void UpdateMultipleAsync(Product[] Product_List) { this.UpdateMultipleAsync(Product_List, null); }
/// <remarks/> public void UpdateMultipleAsync(Product[] Product_List, object userState) { if ((this.UpdateMultipleOperationCompleted == null)) { this.UpdateMultipleOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateMultipleOperationCompleted); } this.InvokeAsync("UpdateMultiple", new object[] { Product_List}, this.UpdateMultipleOperationCompleted, userState); }
public void Update(ref Product Product) { object[] results = this.Invoke("Update", new object[] { Product}); Product = ((Product)(results[0])); }
/// <remarks/> public void UpdateAsync(Product Product) { this.UpdateAsync(Product, null); }
/// <remarks/> public void CreateMultipleAsync(Product[] Product_List) { this.CreateMultipleAsync(Product_List, null); }
/// <remarks/> public void CreateAsync(Product Product, object userState) { if ((this.CreateOperationCompleted == null)) { this.CreateOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOperationCompleted); } this.InvokeAsync("Create", new object[] { Product}, this.CreateOperationCompleted, userState); }
/// <remarks/> public void CreateAsync(Product Product) { this.CreateAsync(Product, null); }
public NavProduct AddProduct(NavProduct product) { try { Product p = new Product() { Cena = product.Price, CenaSpecified = true, Dostawca = product.VendorNo, DostawcaSpecified = true, Dostępna_ilość = product.Count, Dostępna_ilośćSpecified = true, Nazwa = product.Name, Opis = product.Description }; _product_service.Create(ref p); return product; } catch { return null; } }
public bool EditProduct(NavProduct product) { try { Product p = new Product() { No = product.No, Cena = product.Price, Dostawca = product.VendorNo, Dostępna_ilość = product.Count, Nazwa = product.Name, Opis = product.Description }; _product_service.Update(ref p); return true; } catch { return false; } }