Example #1
0
        public ActionResult CCL2()
        {
            var collectors = CollectorRepository.GetAll();

            collectors.Insert(0, new Domain.Collectors.CollectorInfo {
                CollectorId = 0, Name = "Tất cả"
            });
            ViewBag.Collectors = collectors;
            var channels = ChannelRepository.GetAll();

            channels.Insert(0, new Domain.Channels.ChannelInfo {
                ChannelId = 0, Name = "Tất cả"
            });
            ViewBag.Channels = channels;
            var imports = ImportExcelRepository.GetAll();

            foreach (Domain.ImportExcels.ImportExcelInfo info in imports)
            {
                if (!string.IsNullOrEmpty(info.FilePath))
                {
                    int index = info.FilePath.LastIndexOf("\\");
                    if (index > -1)
                    {
                        info.FilePath = info.FilePath.Substring(index);
                    }
                }
            }
            imports.Insert(0, new Domain.ImportExcels.ImportExcelInfo {
                ImportId = 0, FilePath = "Tất cả"
            });
            ViewBag.ImportExcels = imports;
            return(View());
        }
Example #2
0
 // GET api/<controller>
 public IEnumerable <ImportExcelInfo> Get()
 {
     return(ImportExcelRepository.GetAll());
 }