コード例 #1
0
 public CheckInRoom()
 {
     dbInfo          = BLL.ServiceModules.IoC.Get <IDbInfo>();
     dbCrud          = BLL.ServiceModules.IoC.Get <IDbCrud>();
     completeCheckIn = IoC.Get <ICompleteCheckIn>();
     Clear();
 }
コード例 #2
0
 public MainWindow(IDbCrud crudDb)
 {
     dbOperations = crudDb;
     loadData();
     InitializeComponent();
     g.ItemsSource = allClients;
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: Aynasa/MongoDbBankTest
 public Form1(IDbCrud crudDb, IVkladService vkladservice, IReportService reportservice)
 {
     service            = vkladservice;
     this.reportservice = reportservice;
     dbOperations       = crudDb;
     InitializeComponent();
     loadData();
 }
コード例 #4
0
        public MainWindow()
        {
            var kernel = new StandardKernel(new NinjectRegistrations(), new ServiceModule("123567891011001112"));

            crudServ = kernel.Get <IDbCrud>();
            outServ  = kernel.Get <IOutService>();
            InitializeComponent();
            refresh();
        }
コード例 #5
0
        static void Main()
        {
            var        kernel   = new StandardKernel(new NinjectRegistrations(), new ServiceModule("HotelMod"));
            IDbCrud    crudServ = kernel.Get <IDbCrud>();
            App        app      = new App();
            MainWindow window   = new MainWindow(crudServ);

            app.Run(window);
        }
コード例 #6
0
 public CompleteCheckIn()
 {
     checkInService = BLL.ServiceModules.IoC.Get <ICheckInService>();
     dbInfo         = BLL.ServiceModules.IoC.Get <IDbInfo>();
     dbCrud         = BLL.ServiceModules.IoC.Get <IDbCrud>();
     checkIn        = new CheckInModel();
     guests         = new List <GuestModel>();
     services       = new List <ServiceData>();
     guestDocuments = new List <GuestDocuments>();
 }
コード例 #7
0
        public MainWindow()
        {
            InitializeComponent();

            string connection = ConfigurationManager.ConnectionStrings["EventFinderContext"].ConnectionString;
            var    kernel     = new StandardKernel(new LoginModule(), new ServiceModule(connection), new NinjectRegistrations());

            IDbCrud           crudServ      = kernel.Get <IDbCrud>();
            IReportRepository reportService = kernel.Get <IReportRepository>();

            DataContext = new ApplicationViewModel(crudServ, reportService);
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: Aynasa/MongoDbBankTest
        static void Main()
        {
            // внедрение зависимостей
            var kernel = new StandardKernel(new NinjectRegistrations(), new ServiceModule("dbConnection"));

            IDbCrud        crudServ   = kernel.Get <IDbCrud>();
            IVkladService  vkladServ  = kernel.Get <IVkladService>();
            IReportService reportServ = kernel.Get <IReportService>();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1(crudServ, vkladServ, reportServ));
        }
コード例 #9
0
 public EventViewModel(EventModel ev, IDbCrud tm, IMainViewModel mvm)
 {
     CurrentEvent          = ev;
     CurrentEvent.Sessions = CurrentEvent.Sessions.Where(i => i.IsDone == false).OrderBy(i => i.Date).ToList();
     this.tm      = tm;
     this.mvm     = mvm;
     loggedUserId = mvm.GetLoggedUserId();
     IsLogged     = loggedUserId == -1 ? false : true;
     if (IsLogged)
     {
         CheckFavoriteSessions();
     }
 }
コード例 #10
0
        public ApplicationViewModel(IDbCrud crudServ, IReportRepository report)
        {
            tm = crudServ;
            InitDateFilterContent();
            Cities               = new ObservableCollection <CityModel>(tm.GetCities());
            Categories           = new ObservableCollection <CategoryModel>(tm.GetCategories());
            Types                = new ObservableCollection <TypeModel>(tm.GetTypes());
            OverviewViewModel    = new OverviewViewModel(crudServ, this);
            CurrentPageViewModel = OverviewViewModel;
            InitContent();

            DisplayFilters(true);
        }
コード例 #11
0
 public ReportViewModel(IDbCrud tm, int loggedUserId)
 {
     this.tm       = tm;
     LoggedUserId  = loggedUserId;
     SelectedMonth = 0;
 }
コード例 #12
0
 public LoginViewModel(ILoginWindow window, IDbCrud tm)
 {
     this.tm     = tm;
     this.window = window;
 }
コード例 #13
0
 public CheckInService()
 {
     db   = IoC.Get <IDbManager>();
     crud = IoC.Get <IDbCrud>();
 }
コード例 #14
0
ファイル: Login.xaml.cs プロジェクト: cinemyp/EventFinderApp
        public Login(IDbCrud db)
        {
            InitializeComponent();

            DataContext = new LoginViewModel(this, db);
        }
コード例 #15
0
 public FavouriteViewModel(IDbCrud tm, IMainViewModel pm, int userId)
 {
     this.tm = tm;
     this.pm = pm;
     Events  = new ObservableCollection <EventModel>(tm.GetUserSessions(userId).Where(i => i.CurrentSession.IsDone == false).OrderBy(i => i.CurrentSession.Date).ToList());
 }
コード例 #16
0
 public OverviewViewModel(IDbCrud tm, IMainViewModel mvm)
 {
     this.tm = tm;
     //Events = new ObservableCollection<EventModel>(tm.GetEvents());
     this.mvm = mvm;
 }
コード例 #17
0
 public CalendarController()
 {
     dbCRUD = new CalendarDb();
 }