Esempio n. 1
0
        public ActionResult SaveMonitorPointPosition(int id, int left, int top, int typeId, int originalId)
        {
            MonitorPoint point = null;
            string       error = string.Empty;

            try {
                point = dao.SaveMonitorPointPosition(id, left, top, typeId, originalId);
            }
            catch (Exception ex) {
                error = ex.Message;
            }
            return(Json(new
            {
                success = string.IsNullOrEmpty(error),
                entity = point,
                title = point == null ? "" : point.ToString(),
                message = error
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public ActionResult SaveMonitorPoint(MonitorPoint point)
        {
            int    result = 0;
            string error  = string.Empty;

            try {
                result = dao.SaveMonitorPoint(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));
        }
Esempio n. 3
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));
        }