public void AddNormalizationInfoService(NormalAddViewModel normalAddViewModel)
        {
            var xiaocommunityName = normalAddViewModel.XiaoCommunityName.Split(',');
            var xiaocommunitycode = normalAddViewModel.XiaoCommunityNameeCode.Split(',');

            for (int i = 0; i < xiaocommunityName.Length; i++)
            {
                var addmodel = _IMapper.Map <NormalAddViewModel, Normalization_Info>(normalAddViewModel);
                addmodel.XiaoCommunityName      = xiaocommunityName[i];
                addmodel.XiaoCommunityNameeCode = xiaocommunitycode[i];
                _INormalizationInfoRepository.Add(addmodel);
            }
            _INormalizationInfoRepository.SaveChanges();
        }
Exemple #2
0
 public ActionResult NormalLizationAdd(NormalAddViewModel normalAddViewModel)
 {
     normalizationInfoService.AddNormalizationInfoService(normalAddViewModel);
     return(null);
 }