예제 #1
0
        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,
            }));
        }
예제 #2
0
        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,
            }));
        }