public string LoadAdvisor(string advisorFriendlyName, string advisorVersion = "1") { AdvisorRequest advRequest = new AdvisorRequest(); advRequest.FriendlyName = advisorFriendlyName; advRequest.VersionNumber = int.Parse(advisorVersion); return(AdvStdService.LoadAdvisor(advRequest).SessionId); }
public IActionResult EditProfile([FromBody] AdvisorRequest advisorRequest) { if (!ModelState.IsValid) { return(StatusCode(400, "Invaild Adivor")); } var account = _mapper.Map <Account>(advisorRequest); _accountService.Update(account); return(StatusCode(200, new { message = "Update Success" })); }
protected async Task <IActionResult> EditAdvisorAsync(int id, AdvisorRequest advisorRequest) { if (advisorRequest.ChangedPicture && RequestHasFile()) { var fileExtension = GetValidPictureExtension(); using (var stream = Request.Form.Files[0].OpenReadStream()) return(Ok(await AdvisorBusiness.EditAdvisorAsync(id, advisorRequest.Name, advisorRequest.Description, true, stream, fileExtension))); } else { return(Ok(await AdvisorBusiness.EditAdvisorAsync(id, advisorRequest.Name, advisorRequest.Description, advisorRequest.ChangedPicture, null, null))); } }
protected virtual IActionResult Advisor(AdvisorRequest advisorRequest) { if (advisorRequest == null) { return(BadRequest()); } Auctus.DomainObjects.Advisor.Advisor advisor; try { advisor = AdvisorServices.CreateAdvisor(GetUser(), advisorRequest.Name, advisorRequest.Description); } catch (ArgumentException ex) { return(BadRequest(new { error = ex.Message })); } return(Ok(new { id = advisor.Id })); }
public new async Task <IActionResult> EditAdvisorAsync(int id, [FromForm] AdvisorRequest advisorRequest) { return(await base.EditAdvisorAsync(id, advisorRequest)); }
public new IActionResult Advisor([FromBody] AdvisorRequest advisorRequest) { return(base.Advisor(advisorRequest)); }
public Task <AdvisorResponse> LoadAdvisorAsync(AdvisorRequest request) { throw new NotImplementedException(); }
public AdvisorResponse LoadAdvisor(AdvisorRequest request) { throw new NotImplementedException(); }