示例#1
0
        public async Task <ActionResult> InsertInStorageTask(Guid id)
        {
            var inStorageTaskService = new InStorageTaskService();
            var data = await inStorageTaskService.GetOneMaterialById(id);

            //加载数据
            List <SelectListItem> selectList = new List <SelectListItem>();
            var list = await new InStorageTaskService().GetAllProvider();

            foreach (var item in list)
            {
                selectList.Add(new SelectListItem {
                    Text = item.Name, Value = item.Id.ToString()
                });
            }
            ViewBag.ProviderList = selectList;
            return(View(new InStorageTaskCreateViewModel()
            {
                SysBatch = data.SysBatch,
                Organization = data.Organization
            }));
        }
示例#2
0
        public async Task <ActionResult> CreateInStorageReceive(Guid id)
        {
            var inStorageTaskService = new InStorageTaskService();
            var data = await inStorageTaskService.GetOneMaterialById(id);

            //加载数据
            List <SelectListItem> selectList = new List <SelectListItem>();
            var list = await new InStorageTaskService().GetAllProvider();

            foreach (var item in list)
            {
                selectList.Add(new SelectListItem {
                    Text = item.Name, Value = item.Id.ToString()
                });
            }
            ViewBag.ProviderList = selectList;
            return(View(new InStorageReceiveDto()
            {
                Batch = data.SysBatch,
                ProviderId = data.ProviderId,
                MaterialId = data.MaterialId,
            }));
        }