コード例 #1
0
        public async Task <PartialViewResult> CreateOrEditModal(int?id)
        {
            var output = new PerformacneIndicatorDto();

            if (id != null)
            {
                try
                {
                    output =
                        _staffPerformance.GetKeyResultAreaAttribute(new GetKeyResultAreaAttributeInput
                    {
                        AttributeId = id.Value
                    });
                }
                catch (Exception exception)
                {
                    //ignored
                }
            }
            var viewModel = new CreateOrEditKeyResultAreaAttributeModel(output, id == null || id == 0);

            return(PartialView(viewModel));
        }
コード例 #2
0
 public CreateOrEditKeyResultAreaAttributeModel(PerformacneIndicatorDto input, bool isNew)
 {
     IsEditMode = !isNew;
     Attribute  = input;
 }