internal void ReceviedRequests() { //Populate the excel data GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ManageRequest"); //Click on ManageRequest Tab GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//div[text()='Manage Requests']", 10000); ManageReqTab.Click(); //Select Recieved Request GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "LinkText", "Received Requests", 10000); ReceivedReqSel.Click(); //Accept or Declane request if (GlobalDefinitions.ExcelLib.ReadData(2, "ReceviedRequest") == "Accept") { GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[1]/td[8]/button[1]", 10000); AcceptRequest.Click(); } else if (GlobalDefinitions.ExcelLib.ReadData(2, "ReceviedRequest") == "Decline") { GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[1]/td[8]/button[2]", 10000); DeclineRequest.Click(); } //Complete request GlobalDefinitions.WaitForElementVisibility(GlobalDefinitions.driver, "XPath", "//*[@id='received-request-section']/div[2]/div[1]/table/tbody/tr[3]/td[8]/button", 10000); CompleteRequest.Click(); Base.test.Log(LogStatus.Info, "Responded to received request successfully"); }
public UserAchievement DeclineUserAchievement(DeclineRequest request) { using (SqlConnection connection = new SqlConnection(_connectionString)) { var queryString = @"Update UserAchievement Set IsPending = 0, IsApproved = 0, DeclineMsg = @DeclineMsg, NotificationPending = 1 Output inserted.* Where UserAchievement.Id = @UserAchievementId"; var userAchievement = connection.QueryFirstOrDefault <UserAchievement>(queryString, request); if (userAchievement != null) { return(userAchievement); } } throw new Exception("Could not update."); }
public async Task <IActionResult> thisAsses([FromBody] DeclineRequest model) { try { PaymentLog getAss = await _context.Payment.Where(x => x.PaymentReference == model.PaymentRefernce).FirstOrDefaultAsync(); if (getAss != null) { // Payment getPaymentLog = await _context.Payment.Where(x => x.AssessmentId == assessmentId.ToString()).FirstOrDefaultAsync(); getAss.StatusId = (int)TransactionStatus.Declined; getAss.Comment = model.Comment; _context.Update(getAss); await _context.SaveChangesAsync(); return(Ok(new { status = HttpStatusCode.OK, Message = "Payment declined", })); } return(NotFound(new { status = HttpStatusCode.NotFound, Message = "Payment not found", data = "Resource not found" })); } catch (Exception ex) { return(BadRequest(new { status = HttpStatusCode.InternalServerError, Message = "An error occured", data = ex })); } }
public Microsoft.XLANGs.Core.StopConditions segment1(Microsoft.XLANGs.Core.StopConditions stopOn) { Microsoft.XLANGs.Core.Envelope __msgEnv__ = null; bool __condition__; Microsoft.XLANGs.Core.Segment __seg__ = _segments[1]; Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[1]; __EAIProcess_root_0 __ctx0__ = (__EAIProcess_root_0)_stateMgrs[0]; __EAIProcess_1 __ctx1__ = (__EAIProcess_1)_stateMgrs[1]; switch (__seg__.Progress) { case 0: __ctx__.PrologueCompleted = true; if ( !PostProgressInc( __seg__, __ctx__, 1 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 1; case 1: if ( !PreProgressInc( __seg__, __ctx__, 2 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[0],__eventData[0],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 2; case 2: if ( !PreProgressInc( __seg__, __ctx__, 3 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[1],__eventData[1],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 3; case 3: if (!ReceivePort.GetMessageId(__ctx0__.__subWrapper0.getSubscription(this), __seg__, __ctx1__, out __msgEnv__)) return Microsoft.XLANGs.Core.StopConditions.Blocked; if (__ctx1__.__RequestMessage != null) __ctx1__.UnrefMessage(__ctx1__.__RequestMessage); __ctx1__.__RequestMessage = new __messagetype_EAISchemas_Request("RequestMessage", __ctx1__); __ctx1__.RefMessage(__ctx1__.__RequestMessage); ReceivePort.ReceiveMessage(0, __msgEnv__, __ctx1__.__RequestMessage, null, (Microsoft.XLANGs.Core.Context)_stateMgrs[1], __seg__); if (ReceivePort != null) { ReceivePort.Close(__ctx1__, __seg__); ReceivePort = null; } if ( !PostProgressInc( __seg__, __ctx__, 4 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 4; case 4: if ( !PreProgressInc( __seg__, __ctx__, 5 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; { Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Receive); __edata.Messages.Add(__ctx1__.__RequestMessage); __edata.PortName = @"ReceivePort"; Tracker.FireEvent(__eventLocations[2],__edata,_stateMgrs[1].TrackDataStream ); } if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 5; case 5: if ( !PreProgressInc( __seg__, __ctx__, 6 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[3],__eventData[2],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 6; case 6: __condition__ = (System.Decimal)__ctx1__.__RequestMessage.GetPropertyValueThrows(typeof(EAISchemas.PropertySchema.GrandTotal)) > 10000; if (!__condition__) { if ( !PostProgressInc( __seg__, __ctx__, 15 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 15; } if ( !PostProgressInc( __seg__, __ctx__, 7 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 7; case 7: if ( !PreProgressInc( __seg__, __ctx__, 8 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[4],__eventData[3],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 8; case 8: { __messagetype_EAISchemas_RequestDecline __RequestDeclineMessage = new __messagetype_EAISchemas_RequestDecline("RequestDeclineMessage", __ctx1__); ApplyTransform(typeof(EAISchemas.MapToReqDecline), new object[] {__RequestDeclineMessage.part}, new object[] {__ctx1__.__RequestMessage.part}); if (__ctx1__.__RequestDeclineMessage != null) __ctx1__.UnrefMessage(__ctx1__.__RequestDeclineMessage); __ctx1__.__RequestDeclineMessage = __RequestDeclineMessage; __ctx1__.RefMessage(__ctx1__.__RequestDeclineMessage); } __ctx1__.__RequestDeclineMessage.ConstructionCompleteEvent(true); if ( !PostProgressInc( __seg__, __ctx__, 9 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 9; case 9: if ( !PreProgressInc( __seg__, __ctx__, 10 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; { Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Construct); __edata.Messages.Add(__ctx1__.__RequestDeclineMessage); __edata.Messages.Add(__ctx1__.__RequestMessage); Tracker.FireEvent(__eventLocations[5],__edata,_stateMgrs[1].TrackDataStream ); } if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 10; case 10: if ( !PreProgressInc( __seg__, __ctx__, 11 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[6],__eventData[4],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 11; case 11: if (!__ctx1__.PrepareToPendingCommit(__seg__)) return Microsoft.XLANGs.Core.StopConditions.Blocked; if ( !PostProgressInc( __seg__, __ctx__, 12 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 12; case 12: if ( !PreProgressInc( __seg__, __ctx__, 13 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Decline.SendMessage(0, __ctx1__.__RequestDeclineMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists ); if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0) return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst; goto case 13; case 13: if ( !PreProgressInc( __seg__, __ctx__, 14 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; { Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Send); __edata.Messages.Add(__ctx1__.__RequestDeclineMessage); __edata.PortName = @"Decline"; Tracker.FireEvent(__eventLocations[7],__edata,_stateMgrs[1].TrackDataStream ); } if (__ctx1__ != null && __ctx1__.__RequestDeclineMessage != null) { __ctx1__.UnrefMessage(__ctx1__.__RequestDeclineMessage); __ctx1__.__RequestDeclineMessage = null; } if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 14; case 14: if ( !PostProgressInc( __seg__, __ctx__, 19 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 19; case 15: if ( !PreProgressInc( __seg__, __ctx__, 16 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[8],__eventData[4],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 16; case 16: if (!__ctx1__.PrepareToPendingCommit(__seg__)) return Microsoft.XLANGs.Core.StopConditions.Blocked; if ( !PostProgressInc( __seg__, __ctx__, 17 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 17; case 17: if ( !PreProgressInc( __seg__, __ctx__, 18 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; SendERPPort.SendMessage(0, __ctx1__.__RequestMessage, null, null, __ctx1__, __seg__ , Microsoft.XLANGs.Core.ActivityFlags.NextActivityPersists ); if ((stopOn & Microsoft.XLANGs.Core.StopConditions.OutgoingRqst) != 0) return Microsoft.XLANGs.Core.StopConditions.OutgoingRqst; goto case 18; case 18: if ( !PreProgressInc( __seg__, __ctx__, 19 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; { Microsoft.XLANGs.RuntimeTypes.EventData __edata = new Microsoft.XLANGs.RuntimeTypes.EventData(Microsoft.XLANGs.RuntimeTypes.Operation.End | Microsoft.XLANGs.RuntimeTypes.Operation.Send); __edata.Messages.Add(__ctx1__.__RequestMessage); __edata.PortName = @"SendERPPort"; Tracker.FireEvent(__eventLocations[9],__edata,_stateMgrs[1].TrackDataStream ); } if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 19; case 19: if ( !PreProgressInc( __seg__, __ctx__, 20 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; if (__ctx1__ != null && __ctx1__.__RequestMessage != null) { __ctx1__.UnrefMessage(__ctx1__.__RequestMessage); __ctx1__.__RequestMessage = null; } if (SendERPPort != null) { SendERPPort.Close(__ctx1__, __seg__); SendERPPort = null; } if (Decline != null) { Decline.Close(__ctx1__, __seg__); Decline = null; } Tracker.FireEvent(__eventLocations[10],__eventData[5],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 20; case 20: if ( !PreProgressInc( __seg__, __ctx__, 21 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; Tracker.FireEvent(__eventLocations[11],__eventData[6],_stateMgrs[1].TrackDataStream ); if (IsDebugged) return Microsoft.XLANGs.Core.StopConditions.InBreakpoint; goto case 21; case 21: if (!__ctx1__.CleanupAndPrepareToCommit(__seg__)) return Microsoft.XLANGs.Core.StopConditions.Blocked; if ( !PostProgressInc( __seg__, __ctx__, 22 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 22; case 22: if ( !PreProgressInc( __seg__, __ctx__, 23 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; __ctx1__.OnCommit(); goto case 23; case 23: __seg__.SegmentDone(); _segments[0].PredecessorDone(this); break; } return Microsoft.XLANGs.Core.StopConditions.Completed; }
public Microsoft.XLANGs.Core.StopConditions segment0(Microsoft.XLANGs.Core.StopConditions stopOn) { Microsoft.XLANGs.Core.Segment __seg__ = _segments[0]; Microsoft.XLANGs.Core.Context __ctx__ = (Microsoft.XLANGs.Core.Context)_stateMgrs[0]; __EAIProcess_root_0 __ctx0__ = (__EAIProcess_root_0)_stateMgrs[0]; __EAIProcess_1 __ctx1__ = (__EAIProcess_1)_stateMgrs[1]; switch (__seg__.Progress) { case 0: ReceivePort = new RequestReceivePort(0, this); Decline = new DeclineRequest(1, this); SendERPPort = new SendERPPortType(2, this); __ctx__.PrologueCompleted = true; __ctx0__.__subWrapper0 = new Microsoft.XLANGs.Core.SubscriptionWrapper(ActivationSubGuids[0], ReceivePort, this); if ( !PostProgressInc( __seg__, __ctx__, 1 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; if ((stopOn & Microsoft.XLANGs.Core.StopConditions.Initialized) != 0) return Microsoft.XLANGs.Core.StopConditions.Initialized; goto case 1; case 1: __ctx1__ = new __EAIProcess_1(this); _stateMgrs[1] = __ctx1__; if ( !PostProgressInc( __seg__, __ctx__, 2 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 2; case 2: __ctx0__.StartContext(__seg__, __ctx1__); if ( !PostProgressInc( __seg__, __ctx__, 3 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; return Microsoft.XLANGs.Core.StopConditions.Blocked; case 3: if (!__ctx0__.CleanupAndPrepareToCommit(__seg__)) return Microsoft.XLANGs.Core.StopConditions.Blocked; if ( !PostProgressInc( __seg__, __ctx__, 4 ) ) return Microsoft.XLANGs.Core.StopConditions.Paused; goto case 4; case 4: __ctx1__.Finally(); ServiceDone(__seg__, (Microsoft.XLANGs.Core.Context)_stateMgrs[0]); __ctx0__.OnCommit(); break; } return Microsoft.XLANGs.Core.StopConditions.Completed; }
public override Microsoft.XLANGs.Core.PortBase Clone() { DeclineRequest p = new DeclineRequest(this); return p; }
public DeclineRequest(DeclineRequest p) : base(p) { }
public ActionResult DeclineUserAchievement(DeclineRequest request) { var userAchievement = _connection.DeclineUserAchievement(request); return(Accepted(userAchievement)); }