Exemplo n.º 1
0
        public ActionResult InitViewDetailProduct(int?customerId, string product, string productGroup, string subscriptionCode)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("InitViewDetailProduct").ToInputLogString());

            try
            {
                _customerFacade = new CustomerFacade();
                ExistingProductViewModel    productVM    = new ExistingProductViewModel();
                ExistingProductSearchFilter searchFilter =
                    new ExistingProductSearchFilter
                {
                    CustomerId       = customerId,
                    ProductType      = product,
                    ProductGroup     = productGroup,
                    SubscriptionCode = subscriptionCode
                };

                productVM.DetailProduct = _customerFacade.GetExistingProductDetail(searchFilter);

                return(PartialView("~/Views/ExistingProduct/_DetailProduct.cshtml", productVM));
            }
            catch (Exception ex)
            {
                Logger.Error("Exception occur:\n", ex);
                Logger.Info(_logMsg.Clear().SetPrefixMsg("InitViewDetailProduct").Add("Error Message", ex.Message).ToFailLogString());
                return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(),
                                                 this.ControllerContext.RouteData.Values["action"].ToString())));
            }
        }