public ViewResult ManageProducts(ProductViewModel productModel)
        {
            var products = _repositoryServices.GetProductsList();

            ViewBag.ProductIdsList = GetProductList();

            if (productModel.Select != null)
            {
                if (productModel.ProductId < 1)
                {
                    ModelState.AddModelError("ProductId", "Product Id Required");
                }
                if (ModelState.IsValid)
                {
                    ModelState.Clear();
                    var prod = _repositoryServices.GetProductById(productModel.ProductId);
                    productModel = Mapper.Map(prod, typeof(SHOP_PRODS), typeof(ProductViewModel)) as ProductViewModel;
                    productModel.DocumentType = prod.IsPaidDocument ? 0 : prod.IsPaidVideo ? 1 : -1;
                    return(View("ManageProducts", productModel));
                }

                return(View("ManageProducts", productModel));
            }

            if (ModelState.IsValid)
            {
                var shopProd = new SHOP_PRODS
                {
                    prodName   = productModel.ProductName,
                    prodDesc   = productModel.ProductDescription,
                    prodPrice  = productModel.ProductPrice,
                    prodId     = productModel.ProductId,
                    DocumentId = productModel.DocumentId
                };

                if (productModel.Delete != null)
                {
                    _repositoryServices.DeleteProduct(shopProd);
                    return(View("SuccessfullCreation"));
                }
                if (shopProd != null && productModel.DocumentType != -1)
                {
                    shopProd.IsPaidDocument = productModel.DocumentType == 0;
                    shopProd.IsPaidVideo    = productModel.DocumentType == 1;
                }
                _repositoryServices.SaveOrUpdate(shopProd);
                return(View("SuccessfullCreation"));
            }
            return(View("ManageProducts", productModel));
        }