public JsonResult CreateCustomer(CustomerListModel model) { var result = new ResponseResult(); if (model != null) { try { model.ApiKey = Constants.ENCRYPT_KEY; model.ApiSecret = model.CustomerCode.EncryptDES(); _customerService.CreateCustomer(model.ToEntity <Customer>()); //同步到lis 客户 if (model.Status != 1) { Customer getCustomer = _customerService.GetCustomerByAccountId(model.AccountID); UpdateCustomerInfoToLis(getCustomer.CustomerCode); } result.Result = true; result.Message = "Success"; } catch (Exception ex) { Log.Exception(ex); result.Result = false; result.Message = ex.Message; } } return(Json(result, JsonRequestBehavior.AllowGet)); }
public CustomerEditViewModel() { CustomerTypeList = new List <SelectListItem>(); PaymentTypeList = new List <SelectListItem>(); CustomerModel = new CustomerListModel(); CustomerStatus = new List <SelectListItem>(); CustomerManagerList = new List <SelectListItem>(); }