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

            db.tbCapitals.Remove(tbCapitals);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "CapitalId,UserId,MethodId,FullAmount,Amount,CurrencyId,Date,Type,DateBegin,DateEnd")] tbCapitals tbCapitals)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbCapitals).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.UserId = new SelectList(db.tbUsers, "UserId", "FirstName", tbCapitals.UserId);
     return(View(tbCapitals));
 }
Ejemplo n.º 3
0
        // GET: Capitals/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbCapitals tbCapitals = db.tbCapitals.Find(id);

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

            if (tbCapitals == null)
            {
                return(HttpNotFound());
            }
            ViewBag.UserId = new SelectList(db.tbUsers, "UserId", "FirstName", tbCapitals.UserId);
            return(View(tbCapitals));
        }