Ejemplo n.º 1
0
        public async Task <IActionResult> CreatProduct(CreatProduct request)
        {
            var creat = await _productConnectAPI.CreatProduct(request);

            return(Json(new
            {
                status = true
            }));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> CreatProduct(CreatProduct request)
        {
            var creat = await _productConnectAPI.CreatProduct(request);

            if (creat == true)
            {
                var annount = new AnnouncementViewModel()
                {
                    UserName    = User.Identity.Name,
                    DeCripstion = "Create Product successfull ",
                    Content     = "Creat Product",
                    DateCreated = DateTime.Now,
                };
                await _hubContext.Clients.All.SendAsync("ReceiveMessage", annount);
            }
            return(Json(new
            {
                status = true
            }));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Creat(CreatProduct request)
        {
            var create = await _productConnectAPI.CreatProduct(request);

            return(RedirectToAction("Index", "Home"));
        }