Exemple #1
0
        public JsonResult HistoryTB(string id)
        {
            try
            {
                if (!id.Equals("0"))
                {
                    var _model = from x in _taskCampaignBusiness.GetHistory(Guid.Parse(id))
                                 select new { date = x.DateModification, status = x.StatusTask.Name, user = x.Users.Email, comment = x.CommentTaskNoImplemented };
                    if (_model != null)
                    {
                        var _data = _model.OrderByDescending(x => x.date).ToList();
                        return(Json(_data));
                    }
                    else
                    {
                        return(Json(null));
                    }
                }
                return(Json(null));
            }


            catch (Exception e)
            {
                return(Json("0"));
            }
        }