Ejemplo n.º 1
0
        private BaseCongViecViewModel InitModel()
        {
            var model = new BaseCongViecViewModel
            {
                UsersInfos =
                    UsersRepository.GetUsersByCoQuanId(TechOfficeConfig.IDENTITY_PHONGNOIVU).Select(x => x.ToDataInfo()),
                LinhVucCongViecInfos   = LinhVucCongViecRepository.GetAll().Select(x => x.ToDataInfo()),
                TrangThaiCongViecInfos = TrangThaiCongViecRepository.GetAll().Select(x => x.ToDataInfo())
            };

            return(model);
        }
Ejemplo n.º 2
0
        public ActionResult StatisticAndSearch()
        {
            //var items = HoSoCongViecRepository.Statistic();
            //get list users belong phongnoivu
            var users =
                UserRepository.GetUsersByCoQuanId(TechOfficeConfig.IDENTITY_PHONGNOIVU).Select(x => x.ToDataInfo());
            var linhVucs           = LinhVucCongViecRepository.GetAll().Select(x => x.ToDataInfo());
            var coquan             = CoQuanRepository.GetAll().Select(x => x.ToDataInfo());
            var trangThaiCongViecs = TrangThaiCongViecRepository.GetAll().Select(x => x.ToDataInfo());

            var model = new InitValueStatictisSearchViewModel
            {
                From                   = DateTime.Now.AddMonths(-1),
                To                     = DateTime.Now,
                UserInfoNoiVu          = users,
                LinhVucCongViecInfos   = linhVucs,
                CoQuanInfos            = coquan,
                TrangThaiCongViecInfos = trangThaiCongViecs
            };

            return(View(model));
        }