public async Task <InterestRegistrationBasicCreated> CreateInterestReg(InterestRegModel model) { var newToken = await _token.GetNewToken(); var client = new Client(newToken); try { var createInterestReg = await client.InterestRegistration.PostBasic(new PostInterestRegistrationBasic { CompanyName = model.CompanyName, CourseTemplateId = model.CourseTemplateId, Email = model.Email, FirstName = model.FirstName, LastName = model.LastName, Mobile = model.Mobile, Notes = model.Notes, NumberOfParticipants = model.PartNr }); return(createInterestReg); } catch (Exception e) { return(null); } }
public async Task <JsonResult> CreateInterestReg(InterestRegModel model) { var interestReg = await _courseTemplateService.CreateInterestReg(model); if (interestReg == null) { return(Json(new { Success = false })); } return(Json(new { Success = true, Message = _localizer["InterestRegistrationCreated"].ToString() })); }