public override void Add(FormData item)
 {
     base.Add(item);
     if (item.Datas != null)
     {
         foreach (var data in item.Datas)
         {
             data.FormDataId = item.ID;
             _formDataItemService.Add(data);
         }
     }
 }
Example #2
0
        public override ServiceResult <FormData> Add(FormData item)
        {
            var result = base.Add(item);

            if (result.HasViolation)
            {
                return(result);
            }
            if (item.Datas != null)
            {
                foreach (var data in item.Datas)
                {
                    data.FormDataId = item.ID;
                    _formDataItemService.Add(data);
                }
            }
            return(result);
        }