public IActionResult ForProduct(Guid productId)
 {
     ViewBag.Product    = TypeProductBus.GetByProductIdAsync(productId).Result;
     ViewBag.ColorCodes = TypeProductBus.GetAllColorCodesAsync().Result.ToList();
     ViewBag.Sizes      = TypeProductBus.GetAllSizeCodesAsync().Result.ToList();
     return(View());
 }
 public IActionResult ColorProduct(ColorCodeMv color)
 {
     if (ModelState.IsValid)
     {
         if (TypeProductBus.CreateNewColorProductAsync(color).Result)
         {
             TempData[ConstKey.Success] = "Success!";
         }
         else
         {
             TempData[ConstKey.Error] = "Fail! Try Again.";
         }
         return(RedirectToAction("ColorProduct"));
     }
     ViewBag.Colors = TypeProductBus.GetAllColorCodesAsync().Result.ToList();
     return(View());
 }
 public IActionResult ColorProduct()
 {
     ViewBag.Colors = TypeProductBus.GetAllColorCodesAsync().Result.ToList();
     return(View());
 }