public PromotionAutocompleteController(IRepo<cm.Promotion> repo, IUserService userService, IRepo<cm.Product> repoProduct, IRepo<cm.ProductCategory> repoProductCategory)
 {
     this.repo = repo;
     this.userService = userService;
     this.repoProduct = repoProduct;
     this.repoProductCategory = repoProductCategory;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            try
            {

                // DI
                IKernel _kernal = new StandardKernel();
                _kernal.Bind<INLogger>().To<NLogger>().InSingletonScope();
                _kernal.Bind<IRepo>().To<Repo>().InSingletonScope();
                _kernal.Bind<IOutputHelper>().To<OutputHelper>().InSingletonScope();
                _logger = _kernal.Get<NLogger>();
                _repo = _kernal.Get<Repo>();
                _output = _kernal.Get<OutputHelper>();

                //ValidateRunLengths();
                var duplicates = ValidateIRIAVG();

                var export = new ExcelExport().AddSheet("Duplicates", duplicates.ToArray());
                export.ExportTo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), System.Configuration.ConfigurationManager.AppSettings["excel:exportFileName"].ToString()));
            }
            catch (Exception ex)
            {
                _output.Write(string.Format("Error: {0}", ex.Message), true);
            }
            Console.WriteLine("Done. Press any key to exist.");
            Console.ReadKey();
        }
 public DashBoardBusiness(IRepo inRepo)
 {
     this._repo = inRepo;
     _listOfOrder = new List<OrderDto>();
     _listOfOrder = _repo.ListAllOrders();
     _dto = new DashBoardDto();
 }
Exemplo n.º 4
0
 public FarmerRepo(IConnectionFactory connFactory, IRepo<FarmerVersion> farmerVersionRepo, IRepo<LandOwner> landOwnerRepo, IRepo<Organization> organizationRepo, IRepo<Farmer> farmerRepo)
     : base(connFactory)
 {
     this.farmerVersionRepo = farmerVersionRepo;
     this.farmerRepo = farmerRepo;
     this.organizationRepo = organizationRepo;
     this.landOwnerRepo = landOwnerRepo;
 }
        public override void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);
            Issue = new IssueViewModel(parameters[Constants.IssueParameterName] as IIssue);
            _repo = parameters[Constants.RepoParameterName] as IRepo;

            Title = string.Format(LogWork.IssueTitle, Issue.Number);
        }
        public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            _repo = parameters[Constants.RepoParameterName] as IRepo;
            Title = _repo.Name;

            await LoadIssuesAsync(Loader);
        }
Exemplo n.º 7
0
        public LocaleContext(IRepo<Language> langRepo, IRepo<Currency> currRepo) {
            _langRepo = langRepo;
            _currRepo = currRepo;

            string localeCode = Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;

            _lzLanguage = new Lazy<Language>(() => GetLanguage(localeCode));
            _lzCurrency = new Lazy<Currency>(() => GetCurrency(localeCode));
        }
Exemplo n.º 8
0
 public BrigitaProducts(
             IRepo<Product> repo, 
             ICategories cats, 
             ILocalizer<Product> localizer) 
 {
     _repo = repo;
     _cats = cats;
     _localizer = localizer;
 }
Exemplo n.º 9
0
 public DossierController(IBuilder<Dossier, DossierCreateInput> v, IDossierService dossierService, ISystemStateServcie systemStateServcie, IRepo<DossierInfo> dossierInfoRepo, IRepo<FieldValueInfo> fieldValueInfoRepo, IRepo<IndicatorValueInfo> indicatorValueInfoRepo, IRepo<CoefficientValueInfo> coefficientValueInfoRepo)
 {
     this.v = v;
     this.dossierService = dossierService;
     this.systemStateServcie = systemStateServcie;
     this.dossierInfoRepo = dossierInfoRepo;
     this.fieldValueInfoRepo = fieldValueInfoRepo;
     this.indicatorValueInfoRepo = indicatorValueInfoRepo;
     this.coefficientValueInfoRepo = coefficientValueInfoRepo;
 }
Exemplo n.º 10
0
        public HomeModel(IRepo repo)
        {
            //   catalogs = repo.GetCatalogAndProducts().ToList();
            using (var c = new Context())
            {
                catalogs = c.Catalogs.ToList();
                products = c.Products.ToList();

            }
        }
        public override async void OnNavigatedTo(NavigationParameters parameters)
        {
            base.OnNavigatedTo(parameters);

            _issue = parameters[Constants.IssueParameterName] as IIssue;
            _repo = parameters[Constants.RepoParameterName] as IRepo;

            Title = string.Format(Resources.Strings.WorkLogs.IssueTitle, _issue?.Number);

            await LoadWorkLogsAsync(Loader);
        }
Exemplo n.º 12
0
        public static IRepo GetRepo()
        {
            if (_repo == null)
            {
                string repomode = ConfigurationManager.AppSettings["repomode"];

                if (repomode == "T")
                    _repo = new TestOrderRepo();

                else if (repomode == "P")
                    _repo = new ProdOrderRepo();
            }
            return _repo;
        }
Exemplo n.º 13
0
        public IndexModule(IRepo repo, IAppSettings appSettings)
        {
            this.repo = repo;

            Get["/"] = parameters =>
            {
                //The first request to the app will initiate MyRepo.cs and get an appSetting defined in its ctor
                return View["index"];
            };

            Get["/anotherrequest"] = parameters =>
                {
                    //This should open then close a dbconnection from the singleton dbconnectionfactory, subsequent requests will get the value from dictionary cache
                    int fsd = appSettings.GetSetting<int>("DaysUntilExpiry");

                    return View["index"];
                };
        }
Exemplo n.º 14
0
 public ArmourController(IRepo <ArmourStatsModel> repository)
 {
     _repo = repository;
 }
 public MediaLinkVideoIdAjaxDropdownController(IRepo<MediaDocument> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 16
0
 public AppLogoIdAjaxDropdownController(IRepo <MediaDocument> repo)
 {
     this.repo = repo;
 }
 public ImageMessageController(IMapper mapper, IRepo <ImageMessage> repo)
 {
     _mapper = mapper;
     _repo   = repo;
 }
Exemplo n.º 18
0
 public MealService(IRepo <Meal> repo, IFileManagerService fileManagerService) : base(repo)
 {
     this.fileManagerService = fileManagerService;
 }
Exemplo n.º 19
0
 public EmployeeCRUD(IRepo <Employee> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 20
0
 public FrequencyGridController(IRepo <Frequency> repo)
 {
     this.repo = repo;
 }
 public ImpManager(IRepo repo)
 {
     this.repo = repo;
 }
Exemplo n.º 22
0
 public AppButtonFontSizeAjaxDropdownController(IRepo <FontSize> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 23
0
 public KvpConsumer(IRepo repo)
 {
     _repo = repo;
 }
Exemplo n.º 24
0
 public AgreementService(IRepo <Agreement> repo, IFpiRepo fpiRepo, IUniRepo u)
     : base(repo)
 {
     this.fpiRepo = fpiRepo;
     this.u       = u;
 }
Exemplo n.º 25
0
 public Accounting(IRepo <Budget> budgetRepo)
 {
     _budgetRepo = budgetRepo;
 }
Exemplo n.º 26
0
 public GeneralService(IRepo <GeneralEntity> repo)
     : base(repo)
 {
 }
 public MealsAjaxListController(IRepo<Meal> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 28
0
 public EmployeeController(IRepo <Employee> repo, ILogger <EmployeeController> logger)
 {
     _logger = logger;
     _repo   = repo;
 }
 public DinnerAutocompleteController(IRepo<Dinner> r)
 {
     this.r = r;
 }
 public BetDetailService(IRepo <BetDetail> repo)
     : base(repo)
 {
 }
Exemplo n.º 31
0
 public PhoneController(IRepo <Phone> phoneRepo)
 {
     Repository = phoneRepo;
 }
 public EmployeeManagement(IRepo <Employee> repo)
 {
     _repo = repo;
 }
Exemplo n.º 33
0
 // Default constructor
 public HomeController(IRepo <ShowModel> showContext, IRepo <ShowSeason> showSeasonContext)
 {
     this.context      = showContext;
     showseasonContext = showSeasonContext;
 }
 public UsersAjaxListController(IRepo<User> repo)
 {
     this.repo = repo;
 }
 public BetDetailService(IRepo <BetDetail> repo, ISysUserBalanceDetailService sysUserBalanceDetailService)
     : base(repo)
 {
     mSysUserBalanceDetailService = sysUserBalanceDetailService;
 }
 public FeedbackAjaxListController(IRepo<Feedback> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 37
0
        public ScoreCardService(IRepo <ScoreCard> scoreCardRepo, IRepo <ScorableCriterion> scorableCriterionRepo, IRepo <Contestant> contestantRepo)
        {
            if (scoreCardRepo == null)
            {
                throw new ApplicationException("A ScoreCardService cannot be constructed without a ScoreCardRepo.");
            }
            if (scorableCriterionRepo == null)
            {
                throw new ApplicationException("A ScoreCardService cannot be constructed without a ScorableCriterionRepo.");
            }
            if (contestantRepo == null)
            {
                throw new ApplicationException("A ScoreCardService cannot be constructed without a ContestantRepo.");
            }

            ScoreCardRepo         = scoreCardRepo;
            ScorableCriterionRepo = scorableCriterionRepo;
            ContestantRepo        = contestantRepo;
        }
 public CountriesAjaxListController(IRepo<Country> repo)
 {
     this.repo = repo;
 }
 public HobbyGuidLookupController(IRepo<Hobby> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 40
0
 public PicSource(IPictureService pics, IRepo<Picture> picRepo) {
     _pics = pics;
     _picRepo = picRepo;
 }
Exemplo n.º 41
0
 public VendorIdAjaxDropdownController(IRepo <Vendor> r)
 {
     this.r = r;
 }
 public FeedbackAjaxListController(IRepo <Feedback> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 43
0
 public CountryIdLookupController(IRepo<Country> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 44
0
 public BasketService(IRepo <Product> productContext, IRepo <Basket> basketContext)
 {
     this.basketContext  = basketContext;
     this.productContext = productContext;
 }
 public DinnersAjaxListController(IRepo<Dinner> repo)
 {
     this.repo = repo;
 }
 public CustomerMessageController(IRepo <CustomerMessage> cRepo)
 {
     _cRepo = cRepo;
 }
 public ChefsAjaxListController(IRepo<Chef> repo)
 {
     this.repo = repo;
 }
 public BaseListViewModel(IRepo <TModel> repo) : base()
 {
     Repo = repo;
 }
 public LookupDemoController(IRepo<Hobby> hobbyRepo, IRepo<Person> personRepo)
 {
     this.hobbyRepo = hobbyRepo;
     this.personRepo = personRepo;
 }
 public BaseListViewModel(IMessenger messenger, IRepo <TModel> repo) : base(messenger)
 {
     Repo = repo;
 }
Exemplo n.º 51
0
 public OrganizationFormIdAjaxDropdownController(IRepo<OrganizationForm> r)
 {
     this.r = r;
 }
 public BaseListViewModel(INavigationService navigation, IRepo <TModel> repo) : base(navigation)
 {
     Repo = repo;
 }
 public AppMainTitleFontSizeAjaxDropdownController(IRepo<FontSize> repo)
 {
     this.repo = repo;
 }
 public BaseListViewModel(IMessenger messenger, INavigationService navigation, IRepo <TModel> repo) : base(messenger, navigation)
 {
     Repo = repo;
 }
 public RolesMultiLookupController(IRepo<Role> repo)
 {
     this.repo = repo;
 }
Exemplo n.º 56
0
 public ApplicantController(IRepo <Applicant> repo)
 {
     _repo = repo;
 }
 public CategoryIdAjaxDropdownController(IRepo<Category> r)
 {
     this.r = r;
 }
Exemplo n.º 58
0
 public CountryIdLookupController(IRepo <Country> r)
 {
     this.r = r;
 }
 public TabFontSizeAjaxDropdownController(IRepo<FontSize> repo)
 {
     this.repo = repo;
 }
 public PlayTypeRadioService(IRepo <PlayTypeRadio> repo)
     : base(repo)
 {
 }