Beispiel #1
0
        public JsonResult DeleteMarker(int ObjectId)
        {
            int deleteCount;

            try
            {
                Db_objects deleted = repo.GetObjectById(ObjectId);
                deleteCount = repo.DeleteObjectById(ObjectId);
                if (deleteCount > 0)
                {
                    loger.LogToFile(Utilite.CreateDefaultLogMessage(User.Identity.Name, "delete", new JavaScriptSerializer().Serialize(deleted)));
                }
            }
            catch (Exception ex)
            {
                loger.LogToFile(Utilite.CreateDefaultLogMessage(User.Identity.Name, "error", ex.Message + " " + ex.StackTrace));
                deleteCount = -1;
            }
            return(Json(deleteCount));
        }