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/

     

  • 相关阅读:
    shell读取或者修改ini文件
    Linux--查询文件的第几行到第几行命令
    python读写修改配置文件(ini)
    Django REST framework 的TokenAuth认证及外键Serializer基本实现
    vue2.0+webpack+vuerouter+vuex+axios构建项目基础
    Zabbix 监控Windows磁盘IO
    磁盘 I/O 性能监控指标和调优方法
    linux查看与修改交换内存配置(解决zabbix-agent启动报错)
    js中的Map对象的简单示例
    Idea 怎么远程debug
  • 原文地址:https://www.cnblogs.com/Tonyyang/p/1943650.html
Copyright © 2011-2022 走看看