public ActionResult Edit([Bind(Include = "Id,firstname,address,email,phone,S_S_N,role,password")] member member) { if (ModelState.IsValid) { db.Entry(member).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(member)); }
public ActionResult Edit([Bind(Include = "Id,catname,description")] category category) { if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "Id,isbn,title,price,author,category_Id")] book book) { if (ModelState.IsValid) { db.Entry(book).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.category_Id = new SelectList(db.categories, "Id", "catname", book.category_Id); return(View(book)); }
public ActionResult Edit([Bind(Include = "Id,Status,Description,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] TaskStatu taskStatu) { if (ModelState.IsValid) { db.Entry(taskStatu).State = EntityState.Modified; UpdateAuditFields(taskStatu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(taskStatu)); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,ContactNo,Email,Skills,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] Employee employee) { if (ModelState.IsValid) { db.Entry(employee).State = EntityState.Modified; UpdateAuditFields(employee); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(employee)); }
public ActionResult Edit([Bind(Include = "Id,Name,StartDate,EndDate,ClientName,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] Project project) { if (ModelState.IsValid) { db.Entry(project).State = EntityState.Modified; UpdateAuditFields(project); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(project)); }
public ActionResult Edit([Bind(Include = "Id,starttime,endtime,memberId,book_Id")] lending lending) { if (ModelState.IsValid) { db.Entry(lending).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.book_Id = new SelectList(db.books, "Id", "isbn", lending.book_Id); ViewBag.memberId = new SelectList(db.members, "Id", "firstname", lending.memberId); return(View(lending)); }
public ActionResult Edit([Bind(Include = "Id,Story,Projectid,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] UserStory userStory) { if (ModelState.IsValid) { db.Entry(userStory).State = EntityState.Modified; UpdateAuditFields(userStory); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Projectid = new SelectList(db.Projects, "Id", "Name", userStory.Projectid); return(View(userStory)); }
public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,ProjectTaskid,Comments,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] ManagerComment managerComment) { if (ModelState.IsValid) { db.Entry(managerComment).State = EntityState.Modified; UpdateAuditFields(managerComment); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ProjectTaskid = new SelectList(db.ProjectTasks, "Id", "InsBy", managerComment.ProjectTaskid); return(View(managerComment)); }
public ActionResult Edit([Bind(Include = "Id,Employeeid,TaskStartDate,TaskEndDate,TaskStatusid,UserStoryid,IsDeleted,InsAt,InsBy,UpdAt,UpdBy")] ProjectTask projectTask) { if (ModelState.IsValid) { db.Entry(projectTask).State = EntityState.Modified; UpdateAuditFields(projectTask); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Employeeid = new SelectList(db.Employees, "Id", "FirstName", projectTask.Employeeid); ViewBag.TaskStatusid = new SelectList(db.TaskStatus, "Id", "Status", projectTask.TaskStatusid); ViewBag.UserStoryid = new SelectList(db.UserStories, "Id", "Story", projectTask.UserStoryid); return(View(projectTask)); }