示例#1
0
文件: ORPTeam.cs 项目: MyRSG/COAT
 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();
 }
示例#2
0
文件: IsoAdmin.cs 项目: MyRSG/COAT
 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();
 }
示例#3
0
文件: BaseUnit.cs 项目: MyRSG/COAT
        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);
        }
示例#4
0
 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();
 }
示例#5
0
文件: BaseUnit.cs 项目: MyRSG/COAT
        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;
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }
示例#8
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);
        }
示例#9
0
文件: ORPTeam.cs 项目: MyRSG/COAT
 protected override void SendNotifcationMail(IDeal deal, BaseApprArgs args)
 {
 }
示例#10
0
 protected override void ApproveDeal(IDeal deal, BaseApprArgs args)
 {
     deal.Switch(WorkFlowStep.Approve);
     deal.Save();
 }
示例#11
0
文件: SalesTeam.cs 项目: MyRSG/COAT
 protected override void ApproveDeal(IDeal deal, BaseApprArgs args)
 {
     deal.Switch(deal.Size > DirectorSize ? WorkFlowStep.ChannelDirector : WorkFlowStep.Approve);
     deal.Save();
 }
示例#12
0
文件: BaseUnit.cs 项目: MyRSG/COAT
 protected abstract void SendNotifcationMail(IDeal deal, BaseApprArgs args);
示例#13
0
文件: BaseUnit.cs 项目: MyRSG/COAT
 protected abstract void ApproveDeal(IDeal deal, BaseApprArgs args);
示例#14
0
文件: BaseUnit.cs 项目: MyRSG/COAT
 protected virtual void AdditionOpeation(IDeal deal, IApproval approval, BaseApprArgs args)
 {
 }
示例#15
0
文件: BaseUnit.cs 项目: MyRSG/COAT
 public virtual IApproval Decline(IDeal deal, BaseApprArgs args)
 {
     deal.Switch(WorkFlowStep.Decline);
     deal.Save();
     return CreateApproval(deal.Id, args.ActionUser, ApprovalAction.Decline, args.Comment);
 }