public async Task <IViewComponentResult> InvokeAsync(string componentid)
        {
            var data = await _PM_WorkService.GetAllByComponentId(componentid);

            var users = await _SY_UserService.GetAllByIds(data.Select(n => n.UserId).ToList());

            var custom = new PM_WorkUserModel()
            {
                Data_User = users,
                Data_Work = data
            };

            return(View(custom));
        }
Пример #2
0
        public async Task <IActionResult> WorkModal(AJAXModel_Modal model)
        {
            var data = await _PM_WorkService.GetAllByComponentId(model.idrecord);

            var k = data.Select(n => n.UserId);

            var select = string.Join(',', k);

            var dt = new PM_WorkModal()
            {
                Data        = data,
                Select_User = await Select_User(select),
                Data_Modal  = model
            };

            return(PartialView(dt));
        }