Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DbDataPoint dbDataPoint = db.dbDataPoints.Find(id);

            db.dbDataPoints.Remove(dbDataPoint);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,x,y")] DbDataPoint dbDataPoint)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dbDataPoint).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dbDataPoint));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,x,y")] DbDataPoint dbDataPoint)
        {
            if (ModelState.IsValid)
            {
                db.dbDataPoints.Add(dbDataPoint);
                db.SaveChanges();
                InformationRequestHub.NotifyInformationRequestToClient();
                return(RedirectToAction("Index"));
            }

            return(View(dbDataPoint));
        }
Ejemplo n.º 4
0
        // GET: DbDataPoints/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DbDataPoint dbDataPoint = db.dbDataPoints.Find(id);

            if (dbDataPoint == null)
            {
                return(HttpNotFound());
            }
            return(View(dbDataPoint));
        }
Ejemplo n.º 5
0
        public static void NotifyUpdatedInformationRequestToClient(DbDataPoint request)
        {
            IHubContext context = GlobalHost.ConnectionManager.GetHubContext <InformationRequestHub>();

            context.Clients.All.updatedModifyInformationRequestClients(request);
        }