private void RetrieveAllSuppliers()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey))
     {
         SupplierFacade facade = new SupplierFacade(uow);
         CurrentInstances = facade.RetrieveAllSupplier(new SupplierInfoConverter(CurrentUserContext.CurrentLanguage.Id));
     }
 }
 public IEnumerable <SupplierInfoDto> RetrieveAllSupplier()
 {
     using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey))
     {
         SupplierFacade facade    = new SupplierFacade(uow);
         var            instances = facade.RetrieveAllSupplier(new SupplierInfoConverter());
         return(instances);
     }
 }
Beispiel #3
0
        public IEnumerable <SupplierInfoDto> RetrieveAllSupplier()
        {
            object languageId = WebContext.Current.ApplicationOption.DefaultLanguageId;

            using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey))
            {
                SupplierFacade facade    = new SupplierFacade(uow);
                var            instances = facade.RetrieveAllSupplier(new SupplierInfoConverter(languageId));
                return(instances);
            }
        }
Beispiel #4
0
 private void RetrieveInstances(SupplierFacade facade)
 {
     if (CurrentUserContext.IsAdmin || CurrentUserContext.IsEmployee)
     {
         CurrentInstances = facade.RetrieveAllSupplier(new SupplierConverter());
     }
     else if (CurrentUserContext.IsSupplier)
     {
         List <SupplierDto> instances = new List <SupplierDto>();
         SupplierDto        instance  = facade.RetrieveOrNewSupplier(CurrentUserContext.User.MatchId, new SupplierConverter());
         instances.Add(instance);
         CurrentInstances = instances;
     }
 }