protected virtual void Approve(IApproval approval)
 {
     approval.IsApproved     = true;
     approval.ApproveDate    = DateTime.Today;
     approval.ApprovedUserId = UserID;
     approval.ApprovedUserIp = GetUserIP();
 }
示例#2
0
 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);
 }
示例#3
0
文件: SalesTeam.cs 项目: MyRSG/COAT
        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);
        }
示例#4
0
        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));
            }
        }
示例#5
0
        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));
            }
        }
示例#6
0
        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));
            }
        }
示例#7
0
 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;
 }
示例#8
0
 public ApprovalController(IApproval approval)
 {
     _Services = approval;
 }
示例#9
0
 public IApproval SaveApproval(IApproval approval)
 {
     ApprovalList.Add(approval);
     return approval;
 }
示例#10
0
 protected void AssertApproveApproval(IDeal d, IApproval approval)
 {
     AssertApproval(d, approval, ApprovalAction.Approve);
 }
示例#11
0
文件: BaseUnit.cs 项目: MyRSG/COAT
 protected virtual void AdditionOpeation(IDeal deal, IApproval approval, BaseApprArgs args)
 {
 }
示例#12
0
 public NewMadarsaController()
 {
     _EMO_CoMo_Ctrller = new NewMadarsaOperation();
     _EMO_Bs_Ctrller   = new NewMadarsaOperationBusiness();
     _ApprovalBusiness = new ApprovalBusiness();
 }
示例#13
0
 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);
 }
示例#14
0
 protected void AssertDeclineApproval(IDeal d, IApproval approval)
 {
     AssertApproval(d, approval, ApprovalAction.Decline);
 }
示例#15
0
 protected void AssertAssignWrongApproval(IDeal d, IApproval approval)
 {
     AssertApproval(d, approval, ApprovalAction.AssignWrong);
 }
示例#16
0
 protected virtual async Task ApproveSaveAsync(IApproval approval)
 {
     Approve(approval);
     await DataContext.SaveChangesAsync(this);
 }
 public ApprovalController()
 {
     _Approval         = new Approval();
     _ApprovalBusiness = new ApprovalBusiness();
 }