public void AddFundingInfo() { int count = fundingInfos.Count + 1; FundingInfoVM fundingInfo = new FundingInfoVM() { Parent = this, OrderNo = EDOUtils.GetMaxOrderNo <FundingInfoVM>(fundingInfos) + 1, OrderPrefix = PREFIX }; fundingInfo.InitTitle(); fundingInfos.Add(fundingInfo); SelectedItem = fundingInfo; Memorize(); }
public FundingInfoFormVM(StudyUnitVM studyUnitVM) : base(studyUnitVM) { fundingInfos = new ObservableCollection<FundingInfoVM>(); int i = 1; foreach (FundingInfo fundingInfoModel in studyUnitVM.FundingInfoModels) { FundingInfoVM fundingInfo = new FundingInfoVM(fundingInfoModel) { Parent = this, OrderNo = i++, OrderPrefix = PREFIX }; fundingInfo.InitTitle(); fundingInfos.Add(fundingInfo); } modelSyncher = new ModelSyncher<FundingInfoVM, FundingInfo>(this, fundingInfos, studyUnitVM.FundingInfoModels); }
private static readonly string PREFIX = Resources.FundMoney; //Amount public FundingInfoFormVM(StudyUnitVM studyUnitVM) : base(studyUnitVM) { fundingInfos = new ObservableCollection <FundingInfoVM>(); int i = 1; foreach (FundingInfo fundingInfoModel in studyUnitVM.FundingInfoModels) { FundingInfoVM fundingInfo = new FundingInfoVM(fundingInfoModel) { Parent = this, OrderNo = i++, OrderPrefix = PREFIX }; fundingInfo.InitTitle(); fundingInfos.Add(fundingInfo); } modelSyncher = new ModelSyncher <FundingInfoVM, FundingInfo>(this, fundingInfos, studyUnitVM.FundingInfoModels); }
public void AddFundingInfo() { int count = fundingInfos.Count + 1; FundingInfoVM fundingInfo = new FundingInfoVM() { Parent = this, OrderNo = EDOUtils.GetMaxOrderNo<FundingInfoVM>(fundingInfos) + 1, OrderPrefix = PREFIX }; fundingInfo.InitTitle(); fundingInfos.Add(fundingInfo); SelectedItem = fundingInfo; Memorize(); }