Ejemplo n.º 1
0
        public ActionResult PositionEdit(string id)
        {
            InitForm("编辑职位");
            var position = _position.Find(id);

            if (position != null)
            {
                return(View(Position_M.ToViewModel(_position_type.ToSelectItems(), id, position.name, position.descripe, position.note, position.position_type_id)));
            }
            else
            {
                return(Alert("操作失败"));
            }
        }
Ejemplo n.º 2
0
 public ActionResult PositionEdit(Position_M model)
 {
     if (ModelState.IsValid)
     {
         _position.Update(model.ToModel());
         return(RedirectToAction("Position", "Org"));
     }
     else
     {
         InitForm("编辑职位");
         model.typeItem = _position_type.ToSelectItems();
         return(View(model));
     }
 }
Ejemplo n.º 3
0
 public ActionResult PositionAdd()
 {
     InitForm("添加职位");
     return(View(Position_M.ToViewModel(_position_type.ToSelectItems())));
 }