public JsonResult SaveNotice(Notice notice) { Activity a = new Activity { Title = notice.Title, Description = notice.Description, Date = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss") }; Notice n = new Notice() { StartDateNotice = notice.StartDateNotice, EndDateNotice = notice.EndDateNotice, }; NoticeHelper nh = new NoticeHelper(); if ((nh.CreateActivity(a, n)) == 1) { model = (SessionModel)this.Session["SessionData"]; LogManager.Configuration.Variables["userid"] = model.UserID; LogManager.Configuration.Variables["username"] = model.UserName; logger.Info("Notice created VTIntranet for username: "******"Noticia creada correctamente" })); } else { logger.Error("Error al intentar al crear una noticia en la db. " + Environment.NewLine + DateTime.Now); return(Json(new { success = false, msg = "Hubo un error al crear la noticia" })); } }