Exemplo n.º 1
0
        public ActionResult List()
        {
            var files = CompanyFileService.GetAll().Where(f => f.UserID == User.UserID ||
                                                          f.CompanyID == User.CompanyID)
                        .OrderByDescending(x => x.Id)
                        .ToList();

            return(BaseView(Views.CompanyFile.List, new CompanyFileListVM {
                Files = files, User = User
            }));
        }
Exemplo n.º 2
0
        public ActionResult Files(int id)
        {
            var files = CompanyFileService.GetAll(x => x.CompanyID == id).ToList();
            var name  = CompanyService.GetValues(id, x => x.CompanyName);
            var model = new OrgFileListVM {
                CompanyFiles = files,
                CompanyName  = name
            };

            return(BaseViewWithModel(new OrgFileListView(), model));
        }