protected virtual void Approve(IApproval approval) { approval.IsApproved = true; approval.ApproveDate = DateTime.Today; approval.ApprovedUserId = UserID; approval.ApprovedUserIp = GetUserIP(); }
protected void AssertApproval(IDeal d, IApproval approval, int action) { Assert.AreEqual(d.Id, approval.DealId); Assert.AreEqual(CurrentStep, approval.Step); Assert.AreEqual(action, approval.ApprovalAction); Assert.AreEqual(Comment, approval.Comment); }
protected override void AdditionOpeation(IDeal deal, IApproval approval, BaseApprArgs args) { var stArgs = (SalesTeamApprArgs)args; var answer = WorkFlowManager.WorkFlowFactory.CreateAnswer(); answer.DealId = deal.Id; answer.ApprovalId = approval.Id; answer.QuestionId = stArgs.QuestionId; answer.Answer = stArgs.Answer; WorkFlowManager.DataFactory.SaveAnswer(answer); }
public async Task <IActionResult> GetPenilaian(int id) { try { var user = await Request.GetUser(); approval = UserProxy.GetApprovalProxy(user); var penilaian = await approval.GetPenilaian(id); return(Ok(penilaian)); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Reject(int id, List <HasilPemeriksaan> model) { try { var user = await Request.GetUser(); approval = UserProxy.GetApprovalProxy(user); var pengajuan = await approval.Reject(id, model); return(Ok(pengajuan)); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> GetPersetujuan() { try { var user = await Request.GetUser(); approval = UserProxy.GetApprovalProxy(user); var pengajuans = await approval.GetPengajuanNotApprove(); return(Ok(pengajuans)); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }
private void btnSubmit_Click(object sender, RoutedEventArgs e) { eve = new AutoResetEvent(false); //MainWindowActivity activity = new MainWindowActivity(); FlowChartActivityForAmount activity = new FlowChartActivityForAmount(); WorkflowApplication workFlow = new WorkflowApplication(activity) { Aborted = this.OnAborted }; approve = new Approval(); approve.Approve = IsEnable; approve.Reject = IsRej; approve.TaskCompleted = this.TaskComplete; workFlow.Extensions.Add(approve); activity.Amount = Convert.ToInt32(textBox1.Text); workFlow.Run(); eve.WaitOne(); lblApproval.Content = Result; btnApproval.IsEnabled = isApproveButtonEnabled; btnReject.IsEnabled = isRejectButtonEnabled; }
public ApprovalController(IApproval approval) { _Services = approval; }
public IApproval SaveApproval(IApproval approval) { ApprovalList.Add(approval); return approval; }
protected void AssertApproveApproval(IDeal d, IApproval approval) { AssertApproval(d, approval, ApprovalAction.Approve); }
protected virtual void AdditionOpeation(IDeal deal, IApproval approval, BaseApprArgs args) { }
public NewMadarsaController() { _EMO_CoMo_Ctrller = new NewMadarsaOperation(); _EMO_Bs_Ctrller = new NewMadarsaOperationBusiness(); _ApprovalBusiness = new ApprovalBusiness(); }
private void AssertAnswer(IDeal deal, IApproval app, IAnswer answer) { var actureAnswer = WorkFlowManager.WorkFlowFactory.GetAnswer(deal.Id, app.Id); Assert.AreEqual(deal.Id, actureAnswer.DealId); Assert.AreEqual(app.Id, actureAnswer.ApprovalId); Assert.AreEqual(answer.QuestionId, actureAnswer.QuestionId); Assert.AreEqual(answer.Answer, actureAnswer.Answer); }
protected void AssertDeclineApproval(IDeal d, IApproval approval) { AssertApproval(d, approval, ApprovalAction.Decline); }
protected void AssertAssignWrongApproval(IDeal d, IApproval approval) { AssertApproval(d, approval, ApprovalAction.AssignWrong); }
protected virtual async Task ApproveSaveAsync(IApproval approval) { Approve(approval); await DataContext.SaveChangesAsync(this); }
public ApprovalController() { _Approval = new Approval(); _ApprovalBusiness = new ApprovalBusiness(); }