Example #1
0
        public JsonResult GetEventPersonStatus(int eventId)
        {
            var eventPersonStatus = EventCommand.GetEventPersonStatus(eventId);

            var pieModels = new List <PieModel>();

            pieModels.Add(new PieModel()
            {
                Value     = eventPersonStatus.Ok,
                Label     = Translations.IAmOk,
                Color     = "#5cb85c",
                Highlight = "#4cae4c",
            });

            pieModels.Add(new PieModel()
            {
                Value     = eventPersonStatus.NotOk,
                Label     = Translations.IAmNotOk,
                Color     = "#F7464A",
                Highlight = "#FF5A5E",
            });
            pieModels.Add(new PieModel()
            {
                Value     = eventPersonStatus.WithoutAnswer,
                Label     = Translations.WithoutAnswer,
                Color     = "#1989c0",
                Highlight = "#007cba",
            });
            return(Json(JsReturnHelper.Return(pieModels)));
        }