コード例 #1
0
ファイル: ProcessController.cs プロジェクト: tayduivn/ERP-1
        public ViewResult Index(string txtSearch)
        {
            IQueryable <ProcessViewModel> q = processRepository.GetAllProcess()
                                              .Select(item => new ProcessViewModel
            {
                Id            = item.Id,
                CreatedUserId = item.CreatedUserId,
                //CreatedUserName = item.CreatedUserName,
                CreatedDate    = item.CreatedDate,
                ModifiedUserId = item.ModifiedUserId,
                //ModifiedUserName = item.ModifiedUserName,
                ModifiedDate = item.ModifiedDate,
                Name         = item.Name,
            }).OrderByDescending(m => m.ModifiedDate);

            ViewBag.SuccessMessage = TempData["SuccessMessage"];
            ViewBag.FailedMessage  = TempData["FailedMessage"];
            ViewBag.AlertMessage   = TempData["AlertMessage"];
            return(View(q));
        }