コード例 #1
0
        public object FazerChamada(int[] idAlunos, int idEvento)
        {
            Usuario user = GetSessionUser();

            bool flag = eventoRepository.AdicionaPresenca(idAlunos, idEvento, user.IdUsuario);

            if (flag)
            {
                return(Json(new { Status = true, Type = "success", Message = "Chamada concluída!", ReturnUrl = Url.Action("Index") }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { Status = false, Type = "error", Message = "Houve um erro, tente novamente mais tarde!" }, JsonRequestBehavior.AllowGet));
        }