Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "Id,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName")] AspNetUser aspNetUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aspNetUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(aspNetUser));
 }
 public ActionResult Edit([Bind(Include = "Id,CategoryName,IsDelete,CreatedOn,CreatedBy")] Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy = new SelectList(db.AspNetUsers, "Id", "Email", category.CreatedBy);
     return(View(category));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Name,Contact,Address,EmailId,IsDelete,CreatedBy,CreatedOn,ContactPerson,ContactPersonDesignation")] Supplier supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy = new SelectList(db.AspNetUsers, "Id", "Email", supplier.CreatedBy);
     return(View(supplier));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "Id,StockName,StockDescription,CreatedBy,CreatedOn,IsDelete,SupplierId")] Stock stock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stock).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy  = new SelectList(db.AspNetUsers, "Id", "Email", stock.CreatedBy);
     ViewBag.SupplierId = new SelectList(db.Suppliers, "Id", "Name", stock.SupplierId);
     return(View(stock));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "Id,ProductName,CategoryId,CreatedOn,CreatedBy,IsDelete,BarCode,Quantity,StockNo,ProductDescription")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CreatedBy  = new SelectList(db.AspNetUsers, "Id", "Email", product.CreatedBy);
     ViewBag.CategoryId = new SelectList(db.Categories, "Id", "CategoryName", product.CategoryId);
     return(View(product));
 }
Exemplo n.º 6
0
 public ActionResult Edit([Bind(Include = "Id,StockId,ProductId,QuantityAdded")] StockDetail stockDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stockDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProductId = new SelectList(db.Products, "Id", "ProductDescription", stockDetail.ProductId);
     ViewBag.StockId   = new SelectList(db.Stocks, "Id", "StockName", stockDetail.StockId);
     return(View(stockDetail));
 }