// // GET: /ProjectStructure/Create public ActionResult Create() { ProjectStructure model =new ProjectStructure(); model.ActionOperationType = EActionOperationType.Create; this.LoadCreateViewBag(); return View("Create",model); }
public ActionResult Edit(ProjectStructure model) { model.ActionOperationType = EActionOperationType.Edit; if (ModelState.IsValid) { ProjectStructureService service = new ProjectStructureService(); service.Update(model); return RedirectToAction("Index"); } this.LoadEditViewBag(model); return View("Create",model); }
private void LoadEditViewBag(ProjectStructure model) { OrgChartService orgchartService = new OrgChartService(); ViewBag.OrgChartId = new SelectList(orgchartService.Query(p => p.IsActive=="1"), "Id", "Name",model.OrgChartId); }