| | |
| | | { |
| | | switch (customer.Type) |
| | | { |
| | | //反禁用 |
| | | case "0": |
| | | if (UpdateCustomerStatus(db, entity.Id, "A")) |
| | | return 1; |
| | | break; |
| | | //禁用 |
| | | case "1": |
| | | if (UpdateCustomerStatus(db, entity.Id, "B")) |
| | | return 1; |
| | | break; |
| | | //反审核 |
| | | case "3": |
| | | if (DeleteCustomer(db, entity.Id)) |
| | | return 1; |
| | | break; |
| | | //审核 |
| | | case "2": |
| | | case "4": |
| | | if (InsertOrUpdate(db, entity)) |
| | | return 1; |
| | | break; |
| | |
| | | throw new NotImplementedException("删除失败"); |
| | | break; |
| | | case "2": |
| | | case "4": |
| | | |
| | | if (!InsertOrUpdateBatch(db, customerGroup.Value)) |
| | | throw new NotImplementedException("同步失败"); |
| | | break; |
| | |
| | | CreateDate = DateTime.Now, |
| | | CreateOrg = Convert.ToDecimal(customer.FCreateOrgId), |
| | | UseOrg = Convert.ToDecimal(customer.FUseOrgId), |
| | | CustType = customer.CustType, |
| | | CustGroup = customer.CustGroup, |
| | | Type= customer.Type, |
| | | Company = "1000", |
| | | Factory = "1000" |
| | | }; |