public async Task <IActionResult> CreatWholePrice(string Value, int productId) { var list = JsonConvert.DeserializeObject <List <CreatWholePrice> >(Value); var request = new CreatWholePriceViewModel() { ProductId = productId, ListCreat = list }; var creat = await _productConnectAPI.CreatWholePrice(request); if (creat == true) { var annount = new AnnouncementViewModel() { UserName = User.Identity.Name, DeCripstion = "Create Successfull Whole Price ", Content = "Creat Role", DateCreated = DateTime.Now, }; await _hubContext.Clients.All.SendAsync("ReceiveMessage", annount); } return(Json(new { status = true, })); }
public async Task <IActionResult> CreatWholePrice(string Value, int productId) { var list = JsonConvert.DeserializeObject <List <CreatWholePrice> >(Value); var request = new CreatWholePriceViewModel() { ProductId = productId, ListCreat = list }; var creat = await _productConnectAPI.CreatWholePrice(request); return(Json(new { status = true, })); }