public GetQuotesResults UpdateQuote(GetQuotesInput input) { CreditsHero.Messaging.Dtos.GetQuotesResults results = new CreditsHero.Messaging.Dtos.GetQuotesResults(); return (CreditsHero.Messaging.Dtos.GetQuotesResults)_creditsHeroConnect.CallCreditsHeroService<GetQuotesResults>(results, input, "api/services/app/Quotes/UpdateSubscriberQuote"); }
public async Task<ActionResult> UpdateQuote() { string role = GetUserRole(); Users.User user = await GetUser(); CreditsHero.Subscribers.Dtos.GetSubscribersInput input = await BuildCreditsHeroSubscriberInput(user); CreditsHero.Messaging.Dtos.GetQuotesInput inputQuote = new CreditsHero.Messaging.Dtos.GetQuotesInput() { QuoteId = Int32.Parse(Request.Form.Keys[0].ToString()), QuoteStatus = "Hired", SubscriberRefId = input.SubscribersId.Value, CompanyId = Guid.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["creditsHero:APIKey"]) }; GetQuotesResults results = _memberAppService.UpdateQuote(inputQuote); return Redirect((Url.Action("Index", "Home"))); }
public CreditsHero.Messaging.Dtos.SubscriberQuotesDto GetMemberQuotes(GetSubscribersInput input) { GetQuotesInput inputQuote = new GetQuotesInput() { CompanyId = input.CompanyId.Value, SubscriberRefId = input.SubscribersId.Value, QuoteStatus = "" }; CreditsHero.Messaging.Dtos.SubscriberQuotesDto results = new CreditsHero.Messaging.Dtos.SubscriberQuotesDto(); return (CreditsHero.Messaging.Dtos.SubscriberQuotesDto)_creditsHeroConnect.CallCreditsHeroService<SubscriberQuotesDto>(results, inputQuote, "api/services/app/Quotes/GetSubscriberQuotesByStatus"); }
public async Task<ActionResult> SendQuote() { string role = GetUserRole(); Users.User user = await GetUser(); CreditsHero.Subscribers.Dtos.GetSubscribersInput input = await BuildCreditsHeroSubscriberInput(user); switch (Request.Form["btnAction"]) { case "SendQuote": CreditsHero.Messaging.Dtos.GetQuotesInput inputQuote = new CreditsHero.Messaging.Dtos.GetQuotesInput() { Cost = Decimal.Parse(Request.Form["txtPrice"]), TotalCredits = Decimal.Parse(Request.Form["totalCredits"]), Message = Request.Form["txtMessage"], RequestRefId = Int32.Parse(Request.Form["RequestId"]), SubscriberRefId = input.SubscribersId.Value, CompanyId = Guid.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["creditsHero:APIKey"]) }; GetQuotesResults results = _memberAppService.SendQuote(inputQuote); return Redirect((Url.Action("Index", "Home"))); case "PurchaseCredits": return Redirect((Url.Action("Payment", "Members"))); case "Pass": _memberAppService.UpdateSubscriberRequestState( new CreateSubscriberRequestStateInput() { CompanyId = Guid.Parse(System.Web.Configuration.WebConfigurationManager.AppSettings["creditsHero:APIKey"]), RequestId = Int32.Parse(Request.Form["RequestId"]), SubscribersId = input.SubscribersId.Value, Status = "Pass" }); return Redirect((Url.Action("Index", "Home"))); default: return Redirect((Url.Action("Index", "Home"))); } }