コード例 #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
ファイル: OrdersController.cs プロジェクト: leangele/ddsSite
        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));
        }
コード例 #7
0
        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));
        }