public void UpdateMission(BranchInfoDto input) { var task = _userRepository.GetAll().Where(t => t.Id == input.Id); var result = Mapper.Map <BranchInfo>(task); if (task != null) { _userRepository.Update(result); } }
public void CreateMission(BranchInfoDto input) { var task = Mapper.Map <BranchInfo>(input); task.Id = null; //自增列 if (task != null) { _userRepository.Insert(task); } }
public int?CreateMissionQ(BranchInfoDto input) { var task = Mapper.Map <BranchInfo>(input); task.Id = null; //自增列 // var sdd = ShortSnowflake.Instance().GetId(); if (task != null) { var result = _userRepository.Insert(task); CurrentUnitOfWork.SaveChanges(); return(task.Id); } else { return(0); } }
private void AssignBranchInfoValues(BranchInfoDto source, BranchInfo destination) { destination.Address = source.Address; destination.CompanyCode = source.CompanyCode; destination.CompanyName = source.CompanyName; destination.Email = source.Email; destination.Fax = source.Fax; destination.Info1 = source.Info1; destination.Info2 = source.Info2; destination.Info3 = source.Info3; destination.Info4 = source.Info4; destination.Info5 = source.Info5; destination.Info6 = source.Info6; destination.Info7 = source.Info7; destination.Info8 = source.Info8; destination.Info9 = source.Info9; destination.Info10 = source.Info10; destination.Phone = source.Phone; destination.TaxCode = source.TaxCode; }