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); }
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); }