Exemple #1
0
 public async Task<ActionResult> Edit(RSStock rSStock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rSStock).State = System.Data.Entity.EntityState.Modified;
         await db.SaveChangesAsync();
         return RedirectToAction("Index");
     }
     return View(rSStock);
 }
Exemple #2
0
        public async Task<ActionResult> Create(RSStock rSStock)
        {
            if (ModelState.IsValid)
            {
                db.Stocks.Add(rSStock);
                await db.SaveChangesAsync();
                return RedirectToAction("Index");
            }

            return View(rSStock);
        }