public ActionResult AddProductInventory(Productinventory productinventory) { Client = WebApiHelper.Initial(); HttpResponseMessage _requestMessage = Client.PostAsJsonAsync(GlobalConst.Api.ProductApi + "AddProductInventroy\\productinventory\\", productinventory).Result; if (_requestMessage.IsSuccessStatusCode) { productinventory.ProductInventoryID = _requestMessage.Content.ReadAsAsync <int>().Result; productinventory.Message = GlobalConst.Message.AddSucessfully; } return(Json(productinventory)); }
public void Addproductinventory() { Productinventory productinventory = new Productinventory { SKU = "77777777", IsManageStock = false, StockStatusID = 1, MeasurementUnitID = 5, ProductIID = 47 }; var _id = _productRepository.AddProductinventory(productinventory); Assert.True(_id > 0, "failed"); }
public void Updateproductinventory() { Productinventory productinventory = new Productinventory { ProductInventoryID = 2, SKU = "00000000000", IsManageStock = false, StockStatusID = 2, MeasurementUnitID = 6, ProductIID = 50 }; var id = _productRepository.UpdateProductinventory(productinventory); Assert.True(id > 0, "failed"); }
public int UpdateProductinventory(Productinventory productinventory) { return(_productInventoryRespository.Update(productinventory)); }
public int AddProductinventory(Productinventory productinventory) { return(_productInventoryRespository.Add(productinventory).ProductInventoryID); }
public IActionResult GetProductinventoryByID(int id) { Productinventory productinventory = _mapper.Map <Productinventory>(productRepository.GetProductinventoryByID(id)); return(productinventory == null?NotFound(productinventory) : (IActionResult)Ok(productinventory)); }
public ActionResult UpdateProductinventory(Productinventory productinventory) { int productInventoryyID = productRepository.UpdateProductinventory(_mapper.Map <OnlineStore.Core.Data.Model.Productinventory>(productinventory)); return(productInventoryyID == 0 ? NotFound(productInventoryyID) : (ActionResult)Ok(productInventoryyID)); }