public async Task <IActionResult> PutConfirmationResponse(int id, ConfirmationResponse confirmationResponse) { if (id != confirmationResponse.Id) { return(BadRequest()); } _context.Entry(confirmationResponse).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConfirmationResponseExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> Edit(int id, [Bind("Id,TransactionType,TransID,TransTime,TransAmount,BusinessShortCode,BillRefNumber,InvoiceNumber,OrgAccountBalance,ThirdPartyTransID,MSISDN,FirstName,MiddleName,LastName")] ConfirmationResponse confirmationResponse) { if (id != confirmationResponse.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(confirmationResponse); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ConfirmationResponseExists(confirmationResponse.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(confirmationResponse)); }
public static ConfirmationResponse read(BinaryReader binaryReader) { ConfirmationResponse newObj = new ConfirmationResponse(); newObj.i_confirmType = binaryReader.ReadUInt32(); newObj.i_context = binaryReader.ReadUInt32(); newObj.i_bAccepted = binaryReader.ReadUInt32(); return(newObj); }
private static NaesbEvent GetQrNaesbEvent(FileInfo file) { //get confirmation response from naesb file ConfirmationResponse cr = Container.Resolve <IConfirmationResponseEventGet>().Invoke(file); //get the naesb event var naesbEvent = Container.Resolve <INaesbEventGet>().Invoke("QR", cr.PartyIndentificaton.PipelineEntity, cr.PartyIndentificaton.UtilityEntity, cr.Cycle); return(naesbEvent); }
private static string FormatNaesbQuickResponseFileName(ConfirmationResponse cr) { string fileName = cr.GasDay.ToString("yyyyMMdd") + "_" + cr.Cycle + "_" + "QR_" + cr.PartyIndentificaton.PipelineEntity + "_" + cr.PartyIndentificaton.UtilityEntity + ".crqr"; return(fileName); }
public async Task <IActionResult> Create([Bind("Id,TransactionType,TransID,TransTime,TransAmount,BusinessShortCode,BillRefNumber,InvoiceNumber,OrgAccountBalance,ThirdPartyTransID,MSISDN,FirstName,MiddleName,LastName")] ConfirmationResponse confirmationResponse) { if (ModelState.IsValid) { _context.Add(confirmationResponse); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(confirmationResponse)); }
public HttpResponseMessage Post(ConfirmationResponse value) { int id = _container.Resolve <IConfirmationResponseEventCreate>().Invoke(value); if (id > 0) { return(Request.CreateResponse(HttpStatusCode.Created, id)); } return(Request.CreateResponse(HttpStatusCode.NotFound)); }
public static ConfirmationResponse Response() { Console.WriteLine(Constant.Confirmation); ConfirmationResponse option = (ConfirmationResponse)Helper.ValidInteger(); switch (option) { case ConfirmationResponse.Yes: case ConfirmationResponse.No: return(option); default: Console.WriteLine(Constant.InValidInput); option = Confirmation(); return(option); } }
public static async Task <HttpResponseMessage> ReceiveApprovalResponse([HttpTrigger(AuthorizationLevel.Function, methods: "get", Route = "verify")] HttpRequestMessage req, [OrchestrationClient] DurableOrchestrationClient orchestrationClient, ILogger log) { log.LogInformation($"Received an E-Mail Confirmation"); string instanceId = req.RequestUri.ParseQueryString().GetValues("corelationId")[0]; string confirmationCode = req.RequestUri.ParseQueryString().GetValues("confirmationCode")[0]; string action = req.RequestUri.ParseQueryString().GetValues("action")[0]; log.LogInformation($"InstanceId: {instanceId}, Confirmation Code: {confirmationCode}, Action: {action}"); var status = await orchestrationClient.GetStatusAsync(instanceId); log.LogInformation($"Orchestration status: {status}"); if (status != null && (status.RuntimeStatus == OrchestrationRuntimeStatus.Running || status.RuntimeStatus == OrchestrationRuntimeStatus.Pending)) { bool isApproved = false; string message = "The request has been cancelled."; if (action.ToLower() == "confirm") { isApproved = true; message = "Thanks for confirming your email!"; } var request = new ConfirmationResponse() { Approved = isApproved, ConfirmationCode = confirmationCode }; await orchestrationClient.RaiseEventAsync(instanceId, "ReceiveApprovalResponse", request); return(new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(message) }); } else { return(new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("Whoops! Something went wrong!") }); } }
public static ConfirmationResponse Response() { Console.WriteLine(Constant.Another); ConfirmationResponse option = (ConfirmationResponse)Helper.ValidInteger(); switch (option) { case ConfirmationResponse.Yes: return(ConfirmationResponse.Yes); case ConfirmationResponse.No: return(ConfirmationResponse.No); default: Console.WriteLine(Constant.InvalidValue); option = Confirmation(); return(option); } }
public virtual string Present(ConfirmationResponse response) { PresentMessage(MessageType.Success, response.Message); return(response.Id.ToPresentationIdentity()); }
public async Task <ActionResult <ConfirmationResponse> > PostConfirmationResponse(ConfirmationResponse confirmationResponse) { _context.ConfirmationResponses.Add(confirmationResponse); await _context.SaveChangesAsync(); return(CreatedAtAction("GetConfirmationResponse", new { id = confirmationResponse.Id }, confirmationResponse)); }
public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) { bool handled = true; PacketOpcode opcode = Util.readOpcode(messageDataReader); switch (opcode) { case PacketOpcode.Evt_Character__TeleToPKLArena_ID: case PacketOpcode.Evt_Character__TeleToPKArena_ID: case PacketOpcode.Evt_Character__TeleToLifestone_ID: case PacketOpcode.Evt_Character__LoginCompleteNotification_ID: case PacketOpcode.Evt_Character__RequestPing_ID: case PacketOpcode.Evt_Character__ReturnPing_ID: case PacketOpcode.Evt_Character__ClearPlayerConsentList_ID: case PacketOpcode.Evt_Character__DisplayPlayerConsentList_ID: case PacketOpcode.Evt_Character__Suicide_ID: case PacketOpcode.Evt_Character__TeleToMarketplace_ID: case PacketOpcode.Evt_Character__EnterPKLite_ID: case PacketOpcode.Evt_Character__EnterGame_ServerReady_ID: { EmptyMessage message = new EmptyMessage(opcode); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__PlayerOptionChangedEvent_ID: { PlayerOptionChangedEvent message = PlayerOptionChangedEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__StartBarber_ID: { StartBarber message = StartBarber.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__AbuseLogRequest_ID: { AbuseLogRequest message = AbuseLogRequest.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__AddShortCut_ID: { AddShortCut message = AddShortCut.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__RemoveShortCut_ID: { RemoveShortCut message = RemoveShortCut.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__CharacterOptionsEvent_ID: { CharacterOptionsEvent message = CharacterOptionsEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__QueryAge_ID: { QueryAge message = QueryAge.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__QueryAgeResponse_ID: { QueryAgeResponse message = QueryAgeResponse.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__QueryBirth_ID: { QueryBirth message = QueryBirth.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__AddSpellFavorite_ID: { AddSpellFavorite message = AddSpellFavorite.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__RemoveSpellFavorite_ID: { RemoveSpellFavorite message = RemoveSpellFavorite.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__RemoveFromPlayerConsentList_ID: { RemoveFromPlayerConsentList message = RemoveFromPlayerConsentList.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__AddPlayerPermission_ID: { AddPlayerPermission message = AddPlayerPermission.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__RemovePlayerPermission_ID: { RemovePlayerPermission message = RemovePlayerPermission.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__SetDesiredComponentLevel_ID: { SetDesiredComponentLevel message = SetDesiredComponentLevel.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__ConfirmationRequest_ID: { ConfirmationRequest message = ConfirmationRequest.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__ConfirmationResponse_ID: { ConfirmationResponse message = ConfirmationResponse.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__ConfirmationDone_ID: { ConfirmationDone message = ConfirmationDone.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } case PacketOpcode.Evt_Character__SpellbookFilterEvent_ID: { SpellbookFilterEvent message = SpellbookFilterEvent.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } // TODO: Missing Evt_Character__Rename_ID case PacketOpcode.Evt_Character__FinishBarber_ID: { FinishBarber message = FinishBarber.read(messageDataReader); message.contributeToTreeView(outputTreeView); break; } default: { handled = false; break; } } return(handled); }