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