public ActionResult Add(long id)
        {
            ProductDescriptionTemplateInfo template = new ProductDescriptionTemplateInfo();

            if (id > 0)
            {
                template = _iProductDescriptionTemplateService.GetTemplate(id, CurrentSellerManager.ShopId);
            }

            var model = new ProductDescriptionTemplateModel()
            {
                Id                = template.Id,
                Position          = (int)template.Position,
                Name              = template.Name,
                HtmlContent       = template.Content,
                MobileHtmlContent = template.MobileContent
            };

            return(View(model));
        }
        public JsonResult Add(ProductDescriptionTemplateModel model)
        {
            var template = new ProductDescriptionTemplateInfo()
            {
                Id            = model.Id,
                Content       = model.HtmlContent,
                MobileContent = model.MobileHtmlContent,
                Name          = model.Name,
                Position      = (ProductDescriptionTemplateInfo.TemplatePosition)model.Position,
                ShopId        = CurrentSellerManager.ShopId
            };
            var service = _iProductDescriptionTemplateService;

            if (model.Id > 0)
            {
                service.UpdateTemplate(template);
            }
            else
            {
                service.AddTemplate(template);
            }
            return(Json(new { success = true }));
        }