public ActionResult Edit(int id) { if (id == -1) { X.Msg.Alert(MsgInfo.TI_SHI, MsgInfo.PLEASE_SELECT_ROW_TO_EDIT).Show(); return(this.Direct()); } return(new PartialViewResult { ViewName = "Edit", Model = _service.GetRoleById(id) }); }