Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DD_Bitacora dD_Bitacora = db.DD_Bitacora.Find(id);

            db.DD_Bitacora.Remove(dD_Bitacora);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,USERNAME,EVENTO,DATE")] DD_Bitacora dD_Bitacora)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dD_Bitacora).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dD_Bitacora));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ID,USERNAME,EVENTO,DATE")] DD_Bitacora dD_Bitacora)
        {
            if (ModelState.IsValid)
            {
                db.DD_Bitacora.Add(dD_Bitacora);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dD_Bitacora));
        }
        public void add(string username)
        {
            var result = new DD_Bitacora()
            {
                USERNAME = User.Identity.Name,
                EVENTO   = User.Identity.Name + " Inserto en la tablaBeneficiario a " + username,
                DATE     = DateTime.Now
            };

            db.DD_Bitacora.Add(result);
        }
Example #5
0
        // GET: DD_Bitacora/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DD_Bitacora dD_Bitacora = db.DD_Bitacora.Find(id);

            if (dD_Bitacora == null)
            {
                return(HttpNotFound());
            }
            return(View(dD_Bitacora));
        }