Esempio n. 1
0
        public JsonResult UpdateCategory(ContextCategoryView model)
        {
            if (ModelState.IsValid)
            {
                var newId = this.tradingContentService.AddOrUpdateContextCategory(model);
                return(Json(new { id = newId, name = model.Name }, JsonRequestBehavior.DenyGet));
            }

            return(null);
        }
Esempio n. 2
0
        public string AddOrUpdateContextCategory(ContextCategoryView model)
        {
            var newId =
                tradingRepository.AddOrUpdateContextCategory(
                    new ContextCategory
            {
                Id           = model.Id,
                TournamentId = model.TournamentId,
                Name         = model.Name,
                CreatedOn    = model.CreatedOn,
                EndedOn      = model.EndedOn
            });

            return(newId);
        }