public string CloseDb(int id)
 {
     try
     {
         MonitorDbService.StopMonitorDatabase(id);
     }
     catch (Exception ex)
     {
         return("exception");
     }
     return("true");
 }
        public JsonResult OpenDb(int id)
        {
            Database obj = db.Databases.Find(id);

            try
            {
                MonitorDbService.StartMonitorDatabase(id);
            }

            catch (Exception ex)
            {
                return(Json(obj, JsonRequestBehavior.AllowGet));
            }
            return(Json(obj, JsonRequestBehavior.AllowGet));
        }