Пример #1
0
        public ActionResult GetMarker(int MarkerId)
        {
            try
            {
                Marker marker = repo.GetMarkerById(MarkerId);
                if (marker != null)
                {
                    return(Json(marker, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(HttpNotFound());
                }
            }
            catch (Exception ex)
            {
                LogMessage message = new LogMessage()
                {
                    Id          = -1,
                    MessageDate = DateTime.Now,
                    UserName    = User.Identity.Name,
                    MessageType = "error",
                    MessageText = ex.Message + ex.StackTrace
                };

                loger.LogToFile(message);
                loger.LogToDatabase(message);
                return(HttpNotFound());
            }
        }
Пример #2
0
        public ActionResult History(int id)
        {
            Marker obj = repo_.GetMarkerById(id);

            if (obj == null)
            {
                return(HttpNotFound());
            }
            return(View(obj));
        }