我根本无法使它工作,我想知道我是在浪费时间,还是我只是愚蠢!
对不起我没有我现在的确切错误.但我只是想知道它是否有效!
编辑:接受克里斯霍姆斯的回应,但如果有人想出更好的方法,总是准备好重构!谢谢!
使用MVP做一些winforms将实体传递给另一个视图的最佳方法是什么.
假设我有一个CustomerSearchView/Presenter,在doubleClick我想显示CustomerEditView/Presenter.我不希望我的视图知道模型,所以我不能创建一个ICustomer参数的ctor .
我的反应是,
CustomerSearchView创建一个新的CustomerEditView,创建它自己的演示者.然后我CustomerSearchView会做类似的事情:
var customerEditView = new CustomerEditView();
customerEditView.Presenter.Customer = this.Presenter.SelectedCustomer;
Run Code Online (Sandbox Code Playgroud)
其他可能的方法是一个CustomerDTO类,并使其CustomerEditView接受其中一个CustomerDTO,但我认为这是一项很简单的工作.
对不起基本的问题,但我发现的所有例子都没有达到这一点,这是一个棕色的项目,到目前为止使用的方法让我很头疼......
我无法在网上找到有关它的更多信息.是否有人使用eConnect和Dynamics Web服务与Great Plains进行交互(读/写).我正在寻找两种方法的利弊.
该产品将在各种站点上安装和配置,因此易于配置非常重要.我经常讨厌搞乱IIS.
应该能够针对GP 9和10.
谢谢
我通常格式化我的项目目录,如JP Boodhoo.包含解决方案文件的主目录,然后是所有第三方库的lib文件夹,src目录,不能部署的第三方工具库.... 有关详细信息,请查看此处
我在我的项目中设置了所有所需文件夹的引用路径,但如果开发人员检查了主干,则必须设置所有引用路径.有没有办法简化这个?
我是否使用Visual Studio 2008.
谢谢.
我有一点问题,我不明白为什么,这很容易解决,但我仍然想了解.
我有以下课程:
public class AccountStatement : IAccountStatement
{
public IList<IAccountStatementCharge> StatementCharges { get; set; }
public AccountStatement()
{
new AccountStatement(new Period(new NullDate().DateTime,newNullDate().DateTime), 0);
}
public AccountStatement(IPeriod period, int accountID)
{
StatementCharges = new List<IAccountStatementCharge>();
StartDate = new Date(period.PeriodStartDate);
EndDate = new Date(period.PeriodEndDate);
AccountID = accountID;
}
public void AddStatementCharge(IAccountStatementCharge charge)
{
StatementCharges.Add(charge);
}
Run Code Online (Sandbox Code Playgroud)
}
(注意startdate,enddate,accountID是自动属性...)
如果我这样使用它:
var accountStatement = new AccountStatement{
StartDate = new Date(2007, 1, 1),
EndDate = new Date(2007, 1, 31),
StartingBalance = 125.05m
};
Run Code Online (Sandbox Code Playgroud)
当我尝试使用方法"AddStatementCharge:我最终得到一个"null"StatementCharges列表...在一步一步我清楚地看到我的列表得到一个值,但一旦我退出de instantiation行,我的列表变为"null"
c# ×2
.net-3.5 ×1
cocoa ×1
dynamics-gp ×1
econnect ×1
iphone ×1
mocking ×1
mvp ×1
objective-c ×1
unit-testing ×1
web-services ×1
winforms ×1