public void Should_Execute_ContactMagnifier() { // arrange var param = new VisitsDto(); // act _commissionAgentInfoViewModel.ContactMagnifierCommand.Execute(param); // assert Assert.NotNull(_commissionAgentInfoViewModel.DataObject); Assert.NotNull(_commissionAgentInfoViewModel.DataObject.ContactsDto); Assert.GreaterOrEqual(_commissionAgentInfoViewModel.DataObject.ContactsDto.Count(), 0); }
internal override async Task SetVisitReseller(ResellerDto p, VisitsDto b) { IList <VisitsDto> visitList = new List <VisitsDto>(); var ev = CreateGridEvent <ResellerDto, VisitsDto>(p, b, visitList, new DelegateCommand <object>((_branchesDto) => { _showExecuted = true; })); await Task.Delay(1); EventDictionary = ev; }
internal override async Task SetClientData(ClientSummaryExtended p, VisitsDto b) { IList <VisitsDto> visitList = new List <VisitsDto>(); var ev = CreateGridEvent <ClientSummaryExtended, VisitsDto>(p, b, visitList, new DelegateCommand <object>((_branchesDto) => { _showExecuted = true; })); await Task.Delay(1); EventDictionary = ev; }
public void Should_Execute_CommandSeller() { var param = new VisitsDto(); bool raisedOnceChange = false; // arrange // var param _commissionAgentInfoViewModel.ResellerMagnifierCommand.Execute(param); _commissionAgentInfoViewModel.PropertyChanged += delegate(object sender, System.ComponentModel.PropertyChangedEventArgs e) { raisedOnceChange = true; }; Assert.NotNull(_commissionAgentInfoViewModel.DataObject); Assert.IsTrue(raisedOnceChange); Assert.NotNull(_commissionAgentInfoViewModel.DataObject.ProvinceDto); Assert.GreaterOrEqual(_commissionAgentInfoViewModel.DataObject.ProvinceDto.Count(), 0); }
internal override async Task SetVisitContacts(ContactsDto p, VisitsDto visitsDto) { //set the id to the current visit. visitsDto.ClientId = PrimaryKeyValue; var currentObject = DataObject as ISupplierData; var ev = CreateGridEvent <ContactsDto, VisitsDto>(p, visitsDto, currentObject.VisitsDto, this.ContactMagnifierCommand); var newList = new List <VisitsDto>(); newList.Add(visitsDto); var exitDto = currentObject.VisitsDto; var mergedList = exitDto.Union <VisitsDto>(newList); currentObject.VisitsDto = mergedList; ev["DataObject"] = currentObject; // Notify the toolbar. await GridChangedNotification <VisitsDto, VISITAS_PROV>(ev, _onVisitPrimaryKey, DataSubSystem.SupplierSubsystem).ConfigureAwait(false); }
internal override Task SetVisitReseller(ResellerDto param, VisitsDto b) { throw new NotImplementedException(); }
internal override Task SetVisitContacts(ContactsDto p, VisitsDto visitsDto) { throw new NotImplementedException(); }
internal override Task SetClientData(ClientSummaryExtended p, VisitsDto b) { throw new NotImplementedException(); }
private void _onVisitPrimaryKey(ref VisitsDto visitsDto) { visitsDto.KeyId = PrimaryKey; }
private void CommissionAgentInfoViewModel__onVisitPrimaryKey(ref VisitsDto primaryKey) { primaryKey.Code = PrimaryKeyValue; primaryKey.KeyId = PrimaryKeyValue; }