public ActionResult Add(long?id) { var service = _iCustomerService; Entities.CustomerServiceInfo customerServiceInfo; if (id.HasValue && id > 0) { customerServiceInfo = service.GetCustomerService(CurrentSellerManager.ShopId, id.Value); } else { customerServiceInfo = new Entities.CustomerServiceInfo(); } var customerServiceModels = new CustomerServiceModel() { Id = customerServiceInfo.Id, Account = customerServiceInfo.AccountCode, Name = customerServiceInfo.Name, Tool = customerServiceInfo.Tool, Type = customerServiceInfo.Type }; return(View(customerServiceModels)); }
public JsonResult Add(CustomerServiceModel customerServiceModel) { var service = _iCustomerService; Entities.CustomerServiceInfo customerServiceInfo = new Entities.CustomerServiceInfo() { Id = customerServiceModel.Id, Type = customerServiceModel.Type.GetValueOrDefault(Entities.CustomerServiceInfo.ServiceType.PreSale), Tool = customerServiceModel.Tool, Name = customerServiceModel.Name, AccountCode = customerServiceModel.Account, ShopId = CurrentSellerManager.ShopId, TerminalType = Mall.Entities.CustomerServiceInfo.ServiceTerminalType.PC, ServerStatus = Mall.Entities.CustomerServiceInfo.ServiceStatusType.Open }; if (customerServiceInfo.Id > 0) { service.UpdateCustomerService(customerServiceInfo); } else { service.AddCustomerService(customerServiceInfo); } return(Json(new { success = true })); }
public ActionResult addMobile() { var service = _iCustomerService; Entities.CustomerServiceInfo customerServiceInfo; customerServiceInfo = service.GetCustomerServiceForMobile(CurrentSellerManager.ShopId); if (customerServiceInfo == null) { customerServiceInfo = new Entities.CustomerServiceInfo(); } var customerServiceModels = new CustomerServiceModel() { Id = customerServiceInfo.Id, Account = customerServiceInfo.AccountCode, Name = customerServiceInfo.Name, Tool = customerServiceInfo.Tool, Type = customerServiceInfo.Type }; return(View(customerServiceModels)); }