예제 #1
0
        public ActionResult StartPoint(int id)
        {
            var model = new MonitorMapStartPointModel {
                Map = _dao.GetMonitorMap(id),
                Pin = _dao.GetMonitorContent(0)
            };

            return(View(model));
        }
예제 #2
0
        public ActionResult SaveMonitorPointPosition(int id, int left, int top, int typeId)
        {
            int          result = 0;
            string       error  = string.Empty;
            MonitorPoint point  = null;

            try {
                var monitorContent = dao.GetMonitorContent(typeId);
                point  = new MonitorPoint(id, left, top, typeId, monitorContent);
                result = dao.SaveMonitorPointPosition(point);
            }
            catch (Exception ex) {
                error = ex.Message;
            }
            return(Json(new
            {
                success = string.IsNullOrEmpty(error),
                entity = point,
                title = point == null ? "" : point.ToString(),
                message = error
            }, JsonRequestBehavior.AllowGet));
        }