Ejemplo n.º 1
0
        public async Task InsertProductDataAsync(MiniComponentNestedDTO data)
        {
            var proj_id       = _operator?.Property?.Last_Interview_Project;
            var miniComponent = new mini_component()
            {
                Id                  = IdHelper.GetId(),
                Project_Id          = proj_id,
                Parent_Component_Id = data.Parent_Component_Id,
                Sys_Component_Id    = data.Sys_Component_Id,
                Description         = data.Tittle,
                Sort                = data.Sort,
                CreateTime          = DateTime.Now,
                CreatorId           = _operator?.UserId
            };
            await Db.InsertAsync <mini_component>(miniComponent);

            data.Component_Id = miniComponent.Id;
            await InsertAsync(_mapper.Map <mini_component_item>(data));
        }
Ejemplo n.º 2
0
 public async Task UpdateProductDataAsync(MiniComponentNestedDTO data)
 {
     data.Image = data.Image.Replace(ConfigHelper.GetValue("FastDFS:FileRootUrl"), "");
     await UpdateAsync(_mapper.Map <mini_component_item>(data));
 }