Ejemplo n.º 1
0
        private ThuTucViewModel IniViewModel()
        {
            _listLinhVucThuTuc = LinhVucThuTucRepository.GetAll().OrderByDescending(x => x.Id);
            _listLinhVucThuTuc.ToList().ForEach(x =>
            {
                x.Ten = string.Format("{0}{1}", GetNameMultiple(x), x.Ten);
            });

            var data = new ThuTucViewModel
            {
                CoQuanInfos       = CoQuanRepository.GetAll().Select(x => x.ToDataInfo()),
                LinhVucThuTucInfo = _listLinhVucThuTuc.OrderBy(x => x.Id).Select(x => x.ToDataInfo()),
            };

            return(data);
        }
Ejemplo n.º 2
0
        private InitThuTucViewModel CreateVanBanModel(string thuTucCongViec, int?coQuanId, int?linhVucCongViecId)
        {
            var model = new InitThuTucViewModel
            {
                LinhVucThuTucInfo = LinhVucThuTucRepository.GetAll().Select(x => x.ToDataInfo()),
                CoQuanInfos       = CoQuanRepository.GetAll().Select(x => x.ToDataInfo()),
                ValueSearch       = new ValueSearchViewModel
                {
                    ThuTucCongViec  = thuTucCongViec,
                    CoQuanId        = coQuanId,
                    LinhVucThuTucId = linhVucCongViecId,
                    Page            = 1,
                },
            };

            return(model);
        }