示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }
示例#6
0
        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));
        }