コード例 #1
0
 public ActionResult Edit([Bind(Include = "pro_id,pro_name,pro_status")] projecttbl projecttbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(projecttbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(projecttbl));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "dep_id,dep_name")] departmenttbl departmenttbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(departmenttbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(departmenttbl));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "q_id,question")] questiontbl questiontbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(questiontbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(questiontbl));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "user_id,user_name,user_mail,user_Pass,Dep_id")] UserTbl userTbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userTbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Dep_id = new SelectList(db.departmenttbls, "dep_id", "dep_name", userTbl.Dep_id);
     return(View(userTbl));
 }
コード例 #5
0
 public ActionResult Edit([Bind(Include = "team_id,dep_id,pro_id,user_id,role_id")] teamtbl teamtbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(teamtbl).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.pro_id  = new SelectList(db.projecttbls, "pro_id", "pro_name", teamtbl.pro_id);
     ViewBag.role_id = new SelectList(db.roletbls, "role_id", "role_name", teamtbl.role_id);
     ViewBag.user_id = new SelectList(db.UserTbls, "user_id", "user_name", teamtbl.user_id);
     ViewBag.dep_id  = new SelectList(db.departmenttbls, "dep_id", "dep_name", teamtbl.dep_id);
     return(View(teamtbl));
 }