Esempio n. 1
0
        public ViewResult Index(string txtSearch)
        {
            IQueryable <TaxViewModel> q = TaxRepository.GetvwAllTax()
                                          .Select(item => new TaxViewModel
            {
                Id            = item.Id,
                CreatedUserId = item.CreatedUserId,
                //CreatedUserName = item.CreatedUserName,
                CreatedDate    = item.CreatedDate,
                ModifiedUserId = item.ModifiedUserId,
                //ModifiedUserName = item.ModifiedUserName,
                ModifiedDate        = item.ModifiedDate,
                Name                = item.Name,
                TaxIncomePersonId   = item.TaxIncomePersonId,
                Month               = item.Month,
                Year                = item.Year,
                SalaryTableId       = item.SalaryTableId,
                SalaryTableName     = item.SalaryTableName,
                TaxIncomePersonName = item.TaxIncomePersonName
            }).OrderByDescending(m => m.Year).ThenBy(n => n.Month);

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