protected override void ApproveDeal(IDeal deal, BaseApprArgs args) { var orpArgs = (ORPTeamApprArgs)args; deal.ORPType = orpArgs.ORPType; deal.Switch(deal.ORPType == ORPType.SMB ? WorkFlowStep.ISOAdmin : WorkFlowStep.SalesOperation); deal.Save(); }
protected override void ApproveDeal(IDeal deal, BaseApprArgs args) { var isoArgs = (IsoAdminApprArgs)args; deal.Industry2 = isoArgs.Industry2; deal.Province2 = isoArgs.Province2; deal.Switch(WorkFlowStep.InsideSales); deal.Save(); }
public virtual IApproval AssignWrong(IDeal deal, BaseApprArgs args) { IApproval lastAppr = WorkFlowManager.WorkFlowFactory.GetLastApproval(deal); deal.Switch(lastAppr.Step); deal.Save(); return CreateApproval(deal.Id, args.ActionUser, ApprovalAction.AssignWrong, args.Comment); }
protected override void ApproveDeal(IDeal deal, BaseApprArgs args) { var soArgs = (SalesOperationApprArgs)args; deal.Industry2 = soArgs.Industry2; deal.Province2 = soArgs.Province2; deal.CurrentStep = WorkFlowStep.ChannelManager; deal.Save(); }
public virtual IApproval Approve(IDeal deal, BaseApprArgs args) { ApproveDeal(deal, args); var rslt = CreateApproval(deal.Id, args.ActionUser, ApprovalAction.Approve, args.Comment); AdditionOpeation(deal, rslt, args); SendNotifcationMail(deal, args); return rslt; }
public void TestDeclineDeal() { var d = CreateDeal(); var args = new BaseApprArgs { Comment = Comment }; var approval = Unit.Decline(d, args); AssertDeclineApproval(d, approval); Assert.AreEqual(WorkFlowStep.Decline, d.CurrentStep); }
public void TestAssignWrongDeal() { var d = CreateDeal(); var args = new BaseApprArgs { Comment = Comment }; var approval = Unit.AssignWrong(d, args); AssertAssignWrongApproval(d, approval); Assert.AreEqual(WorkFlowStep.SalesTeam, d.CurrentStep); }
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); }
protected override void SendNotifcationMail(IDeal deal, BaseApprArgs args) { }
protected override void ApproveDeal(IDeal deal, BaseApprArgs args) { deal.Switch(WorkFlowStep.Approve); deal.Save(); }
protected override void ApproveDeal(IDeal deal, BaseApprArgs args) { deal.Switch(deal.Size > DirectorSize ? WorkFlowStep.ChannelDirector : WorkFlowStep.Approve); deal.Save(); }
protected abstract void SendNotifcationMail(IDeal deal, BaseApprArgs args);
protected abstract void ApproveDeal(IDeal deal, BaseApprArgs args);
protected virtual void AdditionOpeation(IDeal deal, IApproval approval, BaseApprArgs args) { }
public virtual IApproval Decline(IDeal deal, BaseApprArgs args) { deal.Switch(WorkFlowStep.Decline); deal.Save(); return CreateApproval(deal.Id, args.ActionUser, ApprovalAction.Decline, args.Comment); }