| | |
| | | intentionCustomer.Ywjltime = DateTime.Now; |
| | | var Cooper = _context.CooperatecustomCustomers.Count(x => x.RecStatus == "A" && x.Ywjl == intentionCustomer.Ywjl); |
| | | var Inten = _context.IntentionCustomers.Count(x => x.RecStatus == "A" && x.Ywjl == intentionCustomer.Ywjl); |
| | | if(Cooper+ Inten >= 2000) |
| | | if(Cooper+ Inten > 2000) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "该业务经理,客户单位和合作客户合计超过2000!"; |
| | |
| | | |
| | | var entity = _context.IntentionCustomers.Find(id); |
| | | |
| | | if (entity.RecStatus != "A") |
| | | if (entity ==null || entity.RecStatus != "A") |
| | | { |
| | | entity = new IntentionCustomer(); |
| | | } |
| | |
| | | return list; |
| | | } |
| | | |
| | | public ResultEntity saveKhlx(CooperatecustomCustomerDTO cooperatecustomCustomerDTO) |
| | | { |
| | | ResultEntity resultEntity = new ResultEntity(); |
| | | try |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | var updateproject = _context.IntentionCustomers.Find(cooperatecustomCustomerDTO.Id); |
| | | |
| | | |
| | | updateproject.Khlx = cooperatecustomCustomerDTO.Khlx; |
| | | |
| | | updateproject.Modifier = cooperatecustomCustomerDTO.Modifier; |
| | | updateproject.Modifytime = cooperatecustomCustomerDTO.Modifytime; |
| | | |
| | | |
| | | _context.SaveChanges(); |
| | | |
| | | |
| | | resultEntity.ReturnID = cooperatecustomCustomerDTO.Id; |
| | | resultEntity.Result = true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | resultEntity.Result = false; |
| | | resultEntity.Message = "保存失败,请联系管理员"; |
| | | |
| | | } |
| | | return resultEntity; |
| | | } |
| | | |
| | | } |
| | | } |