public async Task <ActionResult> Edit([Bind(Include = "Id,Name")] AspNetRole aspNetRole) { if (ModelState.IsValid) { db.Entry(aspNetRole).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(aspNetRole)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name,Description,InLabWorkingDays,Price,Notes,IsAvailable,IsDigital,PriceEach")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(product)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name,Address,City,State,PostalCode,Phone,IsAvailable,licenseNumber")] Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(client)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,IdOrder,Teeth,BuccalMargin,LingualMargin,BuccalTissue,Compression,AbutmentsParallel,Note,IdProduct,Contact,Oclussion,Material,Shade,DesignRequirements,ModelServices,ArticulatorType,ModelImplantConnection")] DetailOrder detailOrder) { if (ModelState.IsValid) { db.Entry(detailOrder).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.IdOrder = new SelectList(db.Orders, "ID", "Name", detailOrder.IdOrder); return(View(detailOrder)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,Name,Price,DateDelivery,Location,Score,DateCreation,IdClient,PatientName,PatientLastName,Coupon,Gender,Age")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.IdClient = new SelectList(db.Clients, "ID", "Name", order.IdClient); return(View(order)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Email,EmailConfirmed,PasswordHash,SecurityStamp,PhoneNumber,PhoneNumberConfirmed,TwoFactorEnabled,LockoutEndDateUtc,LockoutEnabled,AccessFailedCount,UserName,idClient")] AspNetUser aspNetUser) { if (ModelState.IsValid) { db.Entry(aspNetUser).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.idClient = new SelectList(db.Clients, "ID", "Name", aspNetUser.idClient); return(View(aspNetUser)); }
public async Task <ActionResult> Edit([Bind(Include = "UserId,RoleId")] AspNetUserRole aspNetUserRole) { if (ModelState.IsValid) { db.Entry(aspNetUserRole).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.UserId = new SelectList(db.AspNetUsers, "Id", "Email", aspNetUserRole.UserId); return(View(aspNetUserRole)); }