示例#1
0
 public ActionResult Delete(UserSearchVM searchvm, UserListVM listvm)
 {
     foreach (var id in listvm.Input.SelectedValues)
     {
         UserBD.Delete(id);
     }
     return(List(searchvm, listvm));
 }
示例#2
0
        public ActionResult List(UserSearchVM searchvm, UserListVM listvm)
        {
            Expression <Func <User, bool> > filter = o => o.Corp.Id == GetLoginCorpId();

            if (Util.IsNotNull(searchvm.Input.Dept))
            {
                listvm.DeptId = searchvm.Input.Dept.Id;
                filter        = o => o.Dept.Id == searchvm.Input.Dept.Id;
            }
            listvm.ResultList = UserBD.GetDtoList <UserListVM.ListRow>(listvm.Input.Pager, filter, listvm.Input.OrderExpression);
            return(ForView("List", listvm));
        }