public ActionResult AddKoment(string Komenatar, int? aid) { User user = Autorizacija.Autorizacija.GetCurrentUser(this.HttpContext); if (!aid.HasValue && string.IsNullOrEmpty(Komenatar)) return RedirectToAction("Index", "Wellcome"); int ArticlesID = aid.Value; try { Comment c = new Comment(); c.CreatorName = user.FirstName + " " + user.LastName; c.CreatorUserAgent = this.Request.UserAgent; c.CreatorIP = this.Request.GetIpAdresa(); c.GUID = Guid.NewGuid(); c.IsActive = true; c.IsSpam = false; c.CreatorEmail = user.Email; c.Created = DateTime.Now; c.CreatedByUserID = user.UserID; c.Body = Komenatar; c.ArticleID = ArticlesID; using (DBBL Baza = new DBBL()) { Baza.AddKomentar(c); } } catch (Exception) { } return RedirectToRoute("GetWikiRoute", new { id = ArticlesID }); }