Beispiel #1
0
        public JsonResult UpdateMarker(Db_objects marker)
        {
            int updateCount;

            try
            {
                Db_objects old = repo.GetObjectById(marker.ObjectId);
                updateCount = repo.UpdateObject(marker);
                if (updateCount > 0)
                {
                    loger.LogToFile(Utilite.CreateDefaultLogMessage(User.Identity.Name, "update", "old values: " + new JavaScriptSerializer().Serialize(old) + "; new values: " + new JavaScriptSerializer().Serialize(marker)));
                }
            }
            catch (Exception ex)
            {
                loger.LogToFile(Utilite.CreateDefaultLogMessage(User.Identity.Name, "error", ex.Message + " " + ex.StackTrace));
                updateCount = -1;
            }
            return(Json(updateCount));
        }