| | |
| | | { |
| | | DTO.Id = Guid.NewGuid().ToString(); |
| | | _context.CustomerGuanlianhuiyuans.Add(DTO); |
| | | |
| | | |
| | | var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); |
| | | if (cooperatecustomCustomer != null) |
| | | { |
| | | cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid; |
| | | } |
| | | var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); |
| | | if (intentionCustomer != null) |
| | | { |
| | | intentionCustomer.HuiyuanId = DTO.Huiyuanid; |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | updateproject.Modifier = DTO.Modifier; |
| | | updateproject.Modifytime = DTO.Modifytime; |
| | | |
| | | var cooperatecustomCustomer = _context.CooperatecustomCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); |
| | | if (cooperatecustomCustomer != null) |
| | | { |
| | | cooperatecustomCustomer.HuiyuanId = DTO.Huiyuanid; |
| | | } |
| | | var intentionCustomer = _context.IntentionCustomers.Where(x => x.RecStatus == "A" && x.Id == DTO.Customerid ).FirstOrDefault(); |
| | | if (intentionCustomer != null) |
| | | { |
| | | intentionCustomer.HuiyuanId = DTO.Huiyuanid; |
| | | } |
| | | |
| | | } |
| | | |
| | | _context.SaveChanges(); |