public ActionResult Edit([Bind(Include = "FormId,Name,Description,Date")] Form form)
 {
     if (ModelState.IsValid)
     {
         db.Entry(form).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(form));
 }
Пример #2
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Phone,Email,Gender,Password,Country,Terms")] FormModel formModel)
        {
            if (ModelState.IsValid)
            {
                db.Entry(formModel).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(formModel));
        }
Пример #3
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Email,Age,Gender,Standard,Division,Image,birthdate,AcadmicStartDate,AcadmicEndDate,Hobby,OtherActivity")] AllForm allForm)
        {
            if (ModelState.IsValid)
            {
                db.Entry(allForm).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(allForm));
        }