예제 #1
0
 public ActionResult Edit([Bind(Include = "Id,CreateTime,Name,UpdateTime")] WorkUnit workUnit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workUnit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(workUnit));
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "Id,ContractName,CreateTime,FullName,MobilePhone,Name,TelPhone,UpdateTime")] WorkTeam workTeam)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workTeam).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(workTeam));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "Id,CreateTime,Name,Position,ProjectId,Remark,UpdateTime")] WorkArea workArea)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workArea).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ProjectId = new SelectList(db.Projects, "Id", "Decription", workArea.ProjectId);
     return(View(workArea));
 }
예제 #4
0
 public ActionResult Edit([Bind(Include = "Id,CreateTime,Description,Name,ParentId,UpdateTime")] WorkType workType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ParentId = new SelectList(db.WorkTypes, "Id", "Description", workType.ParentId);
     return(View(workType));
 }
 public ActionResult Edit([Bind(Include = "Id,CreateTime,UpdateTime,WorkTypeId,WorkUnitId")] WorkTypeUnit workTypeUnit)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workTypeUnit).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.WorkTypeId = new SelectList(db.WorkTypes, "Id", "Name", workTypeUnit.WorkTypeId);
     ViewBag.WorkUnitId = new SelectList(db.WorkUnits, "Id", "Name", workTypeUnit.WorkUnitId);
     return(View(workTypeUnit));
 }
 public ActionResult Edit([Bind(Include = "Id,CreateTime,Name,ParentId,Remark,UpdateTime,WorkAreaId,WorkTypeId")] WorkItem workItem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workItem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ParentId   = new SelectList(db.WorkItems, "Id", "Name", workItem.ParentId);
     ViewBag.WorkAreaId = new SelectList(db.WorkAreas, "Id", "Name", workItem.WorkAreaId);
     ViewBag.WorkTypeId = new SelectList(db.WorkTypes, "Id", "Name", workItem.WorkTypeId);
     return(View(workItem));
 }
 public ActionResult Edit([Bind(Include = "Id,CurrentDate,WorkItemId,WorkTeamId,WorkPrice,WorkUnitId,WorkQuantity,MixingStationId,OperatorId,Remark,CreateTime,UpdateTime")] WorkItemProgress workItemProgress)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workItemProgress).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MixingStationId = new SelectList(db.ConcreteMixingStations, "Id", "Name", workItemProgress.MixingStationId);
     ViewBag.OperatorId      = new SelectList(db.Users, "Id", "Name", workItemProgress.OperatorId);
     ViewBag.WorkItemId      = new SelectList(db.WorkItems, "Id", "Name", workItemProgress.WorkItemId);
     ViewBag.WorkTeamId      = new SelectList(db.WorkTeams, "Id", "Name", workItemProgress.WorkTeamId);
     ViewBag.WorkUnitId      = new SelectList(db.WorkUnits, "Id", "Name", workItemProgress.WorkUnitId);
     return(View(workItemProgress));
 }