zoukankan      html  css  js  c++  java
  • XAF XCRM销售线索和销售机会<DC翻译博客八>

    XCRM: Leads and opportunities(XCRM销售线索和销售机会)

    A Lead is not directly linked to a Contact or Account. It can be converted into an Account, Contact or Opportunity later. I’ll just capture the fact that the Lead class exists and may have some basic info:
    一个销售线索不直接链接到联系人或客户。它能被转换成一个客户,联系人或之后的销售机会。我就抓住事实,存在Lead类,有一些基础信息:

    [Test]

    public void LeadsRelationships() {

        RegisterDC<ILead>();

        Generate();

        ILead romanFromDx = ObjectSpace.CreateObject<ILead>();

        romanFromDx.FirstName = "Roman";

        romanFromDx.LastName = "Eremin";

        romanFromDx.CompanyName = "DevExpress";

    }

    [DomainComponent]

    public interface ILead {

        string FirstName { get; set; }

        string LastName { get; set; }

        string CompanyName { get; set; }

    }

    At this point, I’m not sure that the ILead should be inherited from the IPerson. So, I've just added the FirstName and LastName properties, and made a note to resolve this problem later.
    至此,我不确定Ilead应当继承自Iperson.因此,我刚好加入了FirstName LastName 属性,做一个备注稍后解决这个问题。

    An Opportunity is a more probable possibility for business. It is related to an Account (who you want to sell to) and Product (what you want to sell). Simple CRM systems do not track products and prices, so I will leave them out in our CRM app. Here is the test for Opportunities:
    一个销售机会是更有可能的业务。它关系到一个客户(你想要销售给谁)和产品(你想要销售什么)。简单的CRM系统不跟踪产品和价格,因此在我的CRM应用程序中我将分离他们。这是一个销售机会的测试:

    [Test]

    public void OpportunityAccountRelationships() {

        RegisterDC<IContact>();

        RegisterDC<IAccount>();

        RegisterDC<IOpportunity>();

        Generate();

        IAccount dx = ObjectSpace.CreateObject<IAccount>();

        dx.Name = "DevExpress";

        IOpportunity sellComponents = ObjectSpace.CreateObject<IOpportunity>();

        sellComponents.Name = "Sell some third-party components to DX";

        sellComponents.Account = dx;

        Assert.IsTrue(Enumerator.Exists<IOpportunity>(dx.Opportunities, sellComponents));

    }

    To make this test pass I need the following:
    要使测试通过我需下面内容:

    [DomainComponent]

    public interface IOpportunity {

        string Name { get; set; }

        IAccount Account { get; set; }

    }

    [DomainComponent]

    public interface IAccount {

       

        IList<IOpportunity> Opportunities { get; }

    }

     

    欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/

     

  • 相关阅读:
    P3916 图的遍历
    P1656 炸铁路
    P6722 「MCOI-01」Village 村庄
    P1341 无序字母对
    P1072 [NOIP2009 提高组] Hankson 的趣味题
    10大主流自动化测试工具介绍
    Altium Designer中off grid pin问题的解决方法
    Easylogging++的使用及扩展
    博客园粒子特效稳定版
    C#中使用jieba.NET、WordCloudSharp制作词云图
  • 原文地址:https://www.cnblogs.com/Tonyyang/p/1943650.html
Copyright © 2011-2022 走看看