Example #1
0
 // QxJzxt/OrgCRUD/EditOrgLevel  编辑
 public ActionResult EditOrgLevel(string orgnization_level_id)
 {
     if (orgnization_level_id.HasValue())
     {
         InitForm("编辑组织机构级别");
         var data = _organization_level.Find(orgnization_level_id);
         return(View(EditOrgLevel_M.ToViewModel(data)));
     }
     else
     {
         return(Alert("参数请求错误"));
     }
 }
Example #2
0
 public ActionResult EditOrgLevel(EditOrgLevel_M model)
 {
     try
     {
         var result = _organization_level.Update(model.ToModel());
         return(result
             ? RedirectToAction("OrgLevel", "Org",
                                new { area = "QxJzxt" })
             : Alert("更新失败"));
     }
     catch (FormValitationException ex)
     {
         FormValitation = ex;
         InitForm("编辑组织机构级别");
         var data = _organization_level.Find(model.organization_level_id);
         return(View(EditOrgLevel_M.ToViewModel(data)));
     }
 }