コード例 #1
0
        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);
        }
コード例 #2
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;
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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);
        }
コード例 #5
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);
        }
コード例 #6
0
 internal override Task SetVisitReseller(ResellerDto param, VisitsDto b)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
 internal override Task SetVisitContacts(ContactsDto p, VisitsDto visitsDto)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
 internal override Task SetClientData(ClientSummaryExtended p, VisitsDto b)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
 private void _onVisitPrimaryKey(ref VisitsDto visitsDto)
 {
     visitsDto.KeyId = PrimaryKey;
 }
コード例 #10
0
 private void CommissionAgentInfoViewModel__onVisitPrimaryKey(ref VisitsDto primaryKey)
 {
     primaryKey.Code  = PrimaryKeyValue;
     primaryKey.KeyId = PrimaryKeyValue;
 }