public ActionResult Edit([Bind(Include = "ProductId,ManufacturerId,CategoryId,ProductName,ProductCost,ProductGarantee,ProductOnStock")] Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product)); }
public ActionResult Edit([Bind(Include = "PostId,PostName")] Post post) { if (ModelState.IsValid) { db.Entry(post).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(post)); }
public ActionResult Edit([Bind(Include = "CategoryProductId,CategoryName")] CategoryProduct categoryProduct) { if (ModelState.IsValid) { db.Entry(categoryProduct).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(categoryProduct)); }
public ActionResult Edit([Bind(Include = "UniversityId,UniversityName")] University university) { if (ModelState.IsValid) { db.Entry(university).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(university)); }
public ActionResult Edit([Bind(Include = "WorkerId,WorkerName,WorkerGender,WorkerBirthday,FamilyStatus,WorkerTelephone,WorkerEmail,PassportSeries,PassportNumber,Inn")] Worker worker) { if (ModelState.IsValid) { db.Entry(worker).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(worker)); }
public ActionResult Edit([Bind(Include = "VacationSortId,VacationName")] VacationSort vacationSort) { if (ModelState.IsValid) { db.Entry(vacationSort).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vacationSort)); }
public ActionResult Edit([Bind(Include = "EducationSpecialtyId,EducationSpecialtyName")] EducationSpecialty educationSpecialty) { if (ModelState.IsValid) { db.Entry(educationSpecialty).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(educationSpecialty)); }
public ActionResult Edit([Bind(Include = "WorkerChildId,WorkerId,ChildName,ChildGender,ChildBirthday,StudyPlace")] WorkerChild workerChild) { if (ModelState.IsValid) { db.Entry(workerChild).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.WorkerId = new SelectList(db.Workers, "WorkerId", "WorkerName", workerChild.WorkerId); return(View(workerChild)); }
public ActionResult Edit([Bind(Include = "WorkerPostId,PostId,WorkerId")] WorkerPost workerPost) { if (ModelState.IsValid) { db.Entry(workerPost).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PostId = new SelectList(db.Posts, "PostId", "PostName", workerPost.PostId); ViewBag.WorkerId = new SelectList(db.Workers, "WorkerId", "WorkerName", workerPost.WorkerId); return(View(workerPost)); }
public ActionResult Edit([Bind(Include = "CategoryId,ProductId,CategoryProductId")] Category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CategoryProductId = new SelectList(db.CategoryProducts, "CategoryProductId", "CategoryName", category.CategoryProductId); ViewBag.ProductId = new SelectList(db.Products, "ProductId", "ProductName", category.ProductId); return(View(category)); }
public ActionResult Edit([Bind(Include = "VacationId,WorkerId,VacationStart,VacationEnd,VacationSortId,VacationStatus")] Vacation vacation) { if (ModelState.IsValid) { db.Entry(vacation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.VacationSortId = new SelectList(db.VacationSorts, "VacationSortId", "VacationName", vacation.VacationSortId); ViewBag.WorkerId = new SelectList(db.Workers, "WorkerId", "WorkerName", vacation.WorkerId); return(View(vacation)); }
public ActionResult Edit([Bind(Include = "WorkerPrizeId,WorkerId,PrizeDate,PrizeId,PrizeAmount")] WorkerPrize workerPrize) { if (ModelState.IsValid) { db.Entry(workerPrize).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PrizeId = new SelectList(db.Prizes, "PrizeId", "PrizeName", workerPrize.PrizeId); ViewBag.WorkerId = new SelectList(db.Workers, "WorkerId", "WorkerName", workerPrize.WorkerId); return(View(workerPrize)); }
public ActionResult Edit([Bind(Include = "WriteOffProductId,WriteOffAmount,ProductId,WriteOffDate,CauseId")] WriteOffProduct writeOffProduct) { if (ModelState.IsValid) { db.Entry(writeOffProduct).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CauseId = new SelectList(db.Causes, "CauseId", "CauseName", writeOffProduct.CauseId); ViewBag.ProductId = new SelectList(db.Products, "ProductId", "ProductName", writeOffProduct.ProductId); return(View(writeOffProduct)); }
public ActionResult Edit([Bind(Include = "WorkerEducationId,WorkerId,UniversityId,EducationStart,EducationEnd,EducationSpecialtyId")] WorkerEducation workerEducation) { if (ModelState.IsValid) { db.Entry(workerEducation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EducationSpecialtyId = new SelectList(db.EducationSpecialties, "EducationSpecialtyId", "EducationSpecialtyName", workerEducation.EducationSpecialtyId); ViewBag.UniversityId = new SelectList(db.Universities, "UniversityId", "UniversityName", workerEducation.UniversityId); ViewBag.WorkerId = new SelectList(db.Workers, "WorkerId", "WorkerName", workerEducation.WorkerId); return(View(workerEducation)); }