Exemplo n.º 1
0
 // QxJzxt/OrgCRUD/PositionTypeEdit
 public ActionResult PositionTypeEdit(string position_type_id)
 {
     if (position_type_id.HasValue())
     {
         InitForm("编辑职位");
         var position_type = _position_type.Find(position_type_id);
         return(View(PositionTypeEdit_M.ToViewModel(position_type)));
     }
     else
     {
         return(Alert("参数请求错误"));
     }
 }
Exemplo n.º 2
0
 public ActionResult PositionTypeEdit(PositionTypeEdit_M model)
 {
     try
     {
         var result = _position_type.Update(model.ToModel());
         return(result ? RedirectToAction("PositionType", "Org",
                                          new { area = "QxJzxt" }) : Alert("编辑失败"));
     }
     catch (FormValitationException ex)
     {
         FormValitation = ex;
         InitForm("编辑职位");
         var position_type = _position_type.Find(model.position_type_id);
         return(View(PositionTypeEdit_M.ToViewModel(position_type)));
     }
 }