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
一个销售线索不直接链接到联系人或客户。它能被转换成一个客户,联系人或之后的销售机会。我就抓住事实,存在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
一个销售机会是更有可能的业务。它关系到一个客户(你想要销售给谁)和产品(你想要销售什么)。简单的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/
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/