コード例 #1
0
 public OrderService(RequestContext c)
 {
     context         = c;
     Orders          = OrderRepository.InstantiateForDatabase(c);
     Taxes           = TaxRepository.InstantiateForDatabase(c);
     TaxSchedules    = TaxScheduleRepository.InstantiateForDatabase(c);
     ShippingZones   = ZoneRepository.InstantiateForDatabase(c);
     Transactions    = OrderTransactionRepository.InstantiateForDatabase(c);
     ShippingMethods = ShippingMethodRepository.InstantiateForDatabase(c);
 }
コード例 #2
0
 public ExcursionController()
 {
     this.zoneRepository           = new ZoneRepository(new ExcursionContext());
     this.excursionRepository      = new ExcursionRepository(new ExcursionContext());
     this.userRepository           = new UserRepository(new ExcursionContext());
     this.periodeRepository        = new PeriodeRepository(new ExcursionContext());
     this.prixRepository           = new PrixRepository(new ExcursionContext());
     this.excursionThemeRepository = new ExcursionThemeRepository(new ExcursionContext());
     this.themeRepository          = new ThemeRepository(new ExcursionContext());
 }
コード例 #3
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
        static public Zone GetZoneBypliote(Pilote pilote)
        {
            Zone zonetemp = null;

            using (ZoneRepository zonerepo = new ZoneRepository())
            {
                zonetemp = zonerepo.GetSingleByPilote(pilote);
            }

            return(zonetemp);
        }
コード例 #4
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
        static public Zone GetZone(int zoneid)
        {
            Zone zonetemp = null;

            using (ZoneRepository zonerepo = new ZoneRepository())
            {
                zonetemp = zonerepo.GetSingle(zoneid);
            }

            return(zonetemp);
        }
コード例 #5
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
        static public Zone GetZoneByName(string zonename)
        {
            Zone zonetemp = null;

            using (ZoneRepository zonerepo = new ZoneRepository())
            {
                zonetemp = zonerepo.GetSingleByName(zonename);
            }

            return(zonetemp);
        }
コード例 #6
0
 public static OrderService InstantiateForDatabase(RequestContext c)
 {
     return(new OrderService(c,
                             OrderRepository.InstantiateForDatabase(c),
                             TaxRepository.InstantiateForDatabase(c),
                             TaxScheduleRepository.InstantiateForDatabase(c),
                             ZoneRepository.InstantiateForDatabase(c),
                             OrderTransactionRepository.InstantiateForDatabase(c),
                             ShippingMethodRepository.InstantiateForDatabase(c),
                             Accounts.StoreSettingsRepository.InstantiateForDatabase(c)));
 }
コード例 #7
0
ファイル: OrderService.cs プロジェクト: wncoder/core
 public OrderService(HccRequestContext c,
                     OrderRepository orders,
                     TaxRepository taxes, TaxScheduleRepository taxSchedules,
                     ZoneRepository shippingZones,
                     OrderTransactionRepository transactions,
                     ShippingMethodRepository shippingMethods,
                     StoreSettingsRepository settings,
                     RMARepository returnsRepo)
     : this(c)
 {
 }
コード例 #8
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
        static public Zone GetZonedetached(int zoneid)
        {
            Zone zonetemp = null;

            using (ZoneRepository zonerepo = new ZoneRepository())
            {
                zonetemp = zonerepo.GetSingle(zoneid);
                zonerepo.context.Entry(zonetemp).State = EntityState.Detached;
            }

            return(zonetemp);
        }
コード例 #9
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
 static public void addzone(Zone zone)
 {
     using (ZoneRepository zonerepo = new ZoneRepository())
     {
         zonerepo.context.Entry(zone.PiloteZoneObli).State = EntityState.Unchanged;
         if (zone.PiloteZoneOpti != null)
         {
             zonerepo.context.Entry(zone.PiloteZoneOpti).State = EntityState.Unchanged;
         }
         zonerepo.Add(zone);
         zonerepo.Save();
     }
 }
コード例 #10
0
ファイル: ZoneController.cs プロジェクト: prakashgbpecmca/FR8
        public List <FrayteZone> GetZoneList(int OperationZoneId, string LogisticType, string CourierCompany, string RateType, string ModuleType)
        {
            List <FrayteZone> list = new List <FrayteZone>();

            if (!string.IsNullOrEmpty(LogisticType) && !string.IsNullOrEmpty(RateType))
            {
                list = new ZoneRepository().GetZoneDetail(OperationZoneId, LogisticType, CourierCompany, RateType, ModuleType);
            }
            else
            {
                list = new ZoneRepository().GetZoneDetail(OperationZoneId, CourierCompany, ModuleType);
            }
            return(list);
        }
コード例 #11
0
ファイル: ServiceZone.cs プロジェクト: hassench/FiveStars
        static public List <Zone> GetAllZones()
        {
            List <Zone> zonetemp = null;

            using (ZoneRepository zonerepo = new ZoneRepository())
            {
                zonetemp = (List <Zone>)zonerepo.GetAll();
                foreach (Zone zone in zonetemp)
                {
                    zonerepo.context.Entry(zone).State = EntityState.Detached;
                }
            }

            return(zonetemp);
        }
コード例 #12
0
 public OrderService(RequestContext c, 
                     OrderRepository orders,
                     TaxRepository taxes, TaxScheduleRepository taxSchedules, 
                     ZoneRepository shippingZones,
                     OrderTransactionRepository transactions,
                     ShippingMethodRepository shippingMethods,
                     Accounts.StoreSettingsRepository settings)
 {
     context = c;
     Orders = orders;
     Taxes = taxes;
     TaxSchedules = taxSchedules;
     ShippingZones = shippingZones;
     Transactions = transactions;
     ShippingMethods = shippingMethods;
     this.storeSettings = settings;
 }
コード例 #13
0
 public OrderService(RequestContext c,
                     OrderRepository orders,
                     TaxRepository taxes, TaxScheduleRepository taxSchedules,
                     ZoneRepository shippingZones,
                     OrderTransactionRepository transactions,
                     ShippingMethodRepository shippingMethods,
                     Accounts.StoreSettingsRepository settings)
 {
     context            = c;
     Orders             = orders;
     Taxes              = taxes;
     TaxSchedules       = taxSchedules;
     ShippingZones      = shippingZones;
     Transactions       = transactions;
     ShippingMethods    = shippingMethods;
     this.storeSettings = settings;
 }
コード例 #14
0
 public static BossesZoneModel ToModel(this BossesZoneEntity BZE)
 {
     if (BZE != null)
     {
         BossRepository  repoBoss = new BossRepository();
         ZoneRepository  repoZone = new ZoneRepository();
         BossesZoneModel BZM      = new BossesZoneModel();
         BZM.Boss   = repoBoss.GetOne(BZE.BossId).MapTo <BossModel>();
         BZM.Zone   = repoZone.GetOne(BZE.ZoneId).MapTo <ZoneModel>();
         BZM.Active = BZE.Active;
         BZM.Id     = BZE.Id;
         return(BZM);
     }
     else
     {
         return(null);
     }
 }
コード例 #15
0
 public static TeamModel ToModel(this TeamEntity TE)
 {
     if (TE != null)
     {
         ZoneRepository repoZ = new ZoneRepository();
         UserRepository repoU = new UserRepository();
         CharactersConfigurationRepository repoCC = new CharactersConfigurationRepository();
         TeamModel TM = new TeamModel();
         TM.Id = TE.Id;
         TM.CharactersConfiguration = repoCC.GetOne(TE.CharactersConfigurationId).ToModel();
         TM.TeamName = TE.TeamName;
         TM.Zone     = repoZ.GetOne(TE.ZoneId).MapTo <ZoneModel>();
         TM.User     = repoU.GetOne(TE.UserId).MapTo <UserModel>();
         TM.Active   = TE.Active;
         return(TM);
     }
     else
     {
         return(null);
     }
 }
コード例 #16
0
 public ZoneManager(UnitOfWorkManager unitOfWorkManager)
 {
     ZoneRepository = new ZoneRepository(unitOfWorkManager.UnitOfWork);
 }
コード例 #17
0
 public ZoneController()
 {
     this.zoneRepository   = new ZoneRepository(new ExcursionContext());
     this.centreRepository = new CentreRepository(new ExcursionContext());
 }
コード例 #18
0
 public RegionController()
 {
     this.regionRepository = new RegionRepository(new ExcursionContext());
     this.zoneRepository   = new ZoneRepository(new ExcursionContext());
 }
コード例 #19
0
ファイル: ZoneController.cs プロジェクト: prakashgbpecmca/FR8
        public List <FrayteZone> ZoneListByOperationZone(int OperationZoneId)
        {
            var list = new ZoneRepository().GetZoneList(OperationZoneId);

            return(list);
        }
コード例 #20
0
ファイル: ZoneController.cs プロジェクト: prakashgbpecmca/FR8
        public List <FrayteZone> ZoneList()
        {
            var list = new ZoneRepository().GetZoneList();

            return(list);
        }
コード例 #21
0
 public PrixController()
 {
     this.prixRepository     = new PrixRepository(new ExcursionContext());
     this.zonePrixRepository = new ZonePrixRepository(new ExcursionContext());
     this.zoneRepository     = new ZoneRepository(new ExcursionContext());
 }
コード例 #22
0
ファイル: ZoneController.cs プロジェクト: passzola/OTRL
 public ZoneController(ZoneRepository rep, IHostingEnvironment host)
 {
     zRepository = rep;
     this.host   = host;
 }
コード例 #23
0
 public ZoneService(ZoneRepository ZoneRepository)
 {
     _ZoneRepositorý = ZoneRepository;
 }