示例#1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            FViewDataContext = ViewDataContext.Instance;
            CollectionViewSource tblProductOfferVS = ((CollectionViewSource)(this.FindResource("tblProductOfferVS")));

            tblProductOfferVS.Source = FViewDataContext.DictProductOffers;

            CollectionViewSource tblOperationOfferVS = ((CollectionViewSource)(this.FindResource("tblOperationOfferVS")));

            tblOperationOfferVS.Source = FViewDataContext.DictOperationOffers;


            CollectionViewSource MonitorTextSource     = ((CollectionViewSource)(this.FindResource("MonitorTextSource")));
            CollectionViewSource PriceDependenceSource = ((CollectionViewSource)(this.FindResource("PriceDependenceSource")));
            CollectionViewSource AnaliseTextSource     = ((CollectionViewSource)(this.FindResource("AnaliseTextSource")));
            CollectionViewSource DontDriveTextSource   = ((CollectionViewSource)(this.FindResource("DontDriveTextSource")));
            CollectionViewSource PatientRequiredSource = ((CollectionViewSource)(this.FindResource("PatientRequiredSource")));

            FViewDataContext.FlashTexts();

            MonitorTextSource.Source     = FViewDataContext.MonitorTextList;
            PriceDependenceSource.Source = FViewDataContext.PriceDependenceList;
            AnaliseTextSource.Source     = FViewDataContext.AnaliseTextList;
            DontDriveTextSource.Source   = FViewDataContext.DontDriveTextList;
            PatientRequiredSource.Source = FViewDataContext.PatientRequiredTextList;
        }
        partial void OnFatherNameChanged()
        {
            OnPropertyChanged("ShortName");
            var xFatherName = FatherName;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(this, doc => doc.FatherName = xFatherName);
        }
        private async void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var RVDataContext = new RealVisionDataContext();

            FDataHelper = new DataHelper();
            //var xPtntQuery = RVDataContext.tblPatients.Include("tblDocumentCommons").Where(ptnt => ptnt is tblPatientInfo).Take(10);
            //var xDocQuery = RVDataContext.tblDocumentCommons.Where(doc => ((doc.DateDelete == null) && (!doc.Printed))).OrderByDescending(doc => doc.DateCreate);
            //xPtntQuery.ToList();
            //xDocQuery.ToList();


            // TODO : загрузить последние карточки, в фоновом потоке
            FViewDataContext = ViewDataContext.Instance;

            //await FViewDataContext.SetDefaultDocsViewSource();
            await FViewDataContext.SetDefaultCardsViewSource();

            CollectionViewSource tblDefaultOfferViewSource = ((CollectionViewSource)(this.FindResource("tblDefaultOfferViewSource")));

            tblDefaultOfferViewSource.Source = FViewDataContext.DictDefaultOffers;

            CollectionViewSource tblEmployeeViewSource = ((CollectionViewSource)(FindResource("tblEmployeeViewSource")));

            tblEmployeeViewSource.Source = FViewDataContext.DictEmployees;

            pnlMainPanient.DateTimeLostEvent += pnlMainPanient_DateTimeLostEvent;
        }
        public Pictures()
        {
            InitializeComponent();

            DataContext = new ViewDataContext {
                ViewModel = ViewModel.PictureViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance()
            };
        }
        public Musics()
        {
            InitializeComponent();

            DataContext = new ViewDataContext {
                ViewModel = ViewModel.MusicViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance()
            };
        }
示例#6
0
 private void btnAddProtuctClick(object sender, RoutedEventArgs e)
 {
     if (!CheckBeforeAddDoc())
     {
         return;
     }
     ViewDataContext.AddDoc(GetManipulationConfig(false), () => new tblDocumentCommon[] { new tblDocumentProduct(), new tblDocumentSalesReceipt() });
 }
示例#7
0
        //private void AddService(tblManipulation manipulation)
        //{
        //    tblDocumentService xDoc = new tblDocumentService();
        //    ViewDataContext.PrepareDoc(xDoc, manipulation);
        //    FViewDataContext.Documents.Add(xDoc);
        //}

        //private void AddProuctDoc(tblManipulation manipulation)
        //{
        //    tblDocumentProduct xDoc = new tblDocumentProduct();
        //    ViewDataContext.PrepareDoc(xDoc, manipulation);
        //    FViewDataContext.Documents.Add(xDoc);
        //}

        //private void AddProuctSalesReceipt(tblManipulation manipulation)
        //{
        //    tblDocumentSalesReceipt xDoc = new tblDocumentSalesReceipt();
        //    ViewDataContext.PrepareDoc(xDoc, manipulation);
        //    FViewDataContext.Documents.Add(xDoc);
        //}


        private void btnAddServiceClick(object sender, RoutedEventArgs e)
        {
            if (!CheckBeforeAddDoc())
            {
                return;
            }
            ViewDataContext.AddDoc(GetManipulationConfig(true), () => new tblDocumentCommon[] { new tblDocumentService() });
        }
        public Playlists()
        {
            InitializeComponent();

            DataContext = new ViewDataContext
            {
                ViewModel = ViewModel.PlayListViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance(),
            };
        }
        public Playlists()
        {
            InitializeComponent();

            DataContext = new ViewDataContext
            {
                ViewModel = ViewModel.PlayListViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance(),
            };
        }
示例#10
0
 private void CardNavigation_Loaded(object sender, RoutedEventArgs e)
 {
     //Не загружайте свои данные во время разработки.
     if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
     {
         return;
     }
     FViewDataContext = ViewDataContext.Instance;
 }
        partial void OnPaspSeriyaChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xPaspSeriya = PaspSeriya;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.PaspSeriya = xPaspSeriya);
        }
        partial void OnPaspNumberChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xPaspNumber = PaspNumber;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.PaspNumber = xPaspNumber);
        }
        partial void OnPaspIssuingChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xPaspIssuing = PaspIssuing;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.PaspIssuing = xPaspIssuing);
        }
        partial void OnProductModelChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xProductModel = ProductModel;

            ViewDataContext.UpdateJoinDocs <IDocProduct>(tblManipulation, doc => doc.ProductModel = xProductModel);
        }
        partial void OnAddressChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xAddress = Address;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.Address = xAddress);
        }
        partial void OnPhonChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xPhon = Phon;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.Phon = xPhon);
        }
        partial void OnBirthDayChanged()
        {
            if (tblPatient == null)
            {
                return;
            }
            var xBirthDay = BirthDay;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.BirthDay = xBirthDay);
        }
        partial void OnNameChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xName = Name;

            ViewDataContext.UpdateJoinDocs <IDocService>(tblManipulation, doc => doc.Name = xName);
        }
        partial void OnEyeChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xEye = Eye;

            tblManipulation.Eye = xEye.HasValue ? xEye.Value : RVDataModel.Eye.No;
            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblManipulation, doc => doc.Eye = xEye);
        }
        partial void OnFatherNameChanged()
        {
            OnPropertyChanged("ShortName");
            if (tblPatient == null)
            {
                return;
            }
            var xFatherName = FatherName;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblPatient, doc => doc.FatherName = xFatherName);
        }
        partial void OnProductNameChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xProductName = ProductName;

            tblManipulation.OfferCustomText = xProductName;
            ViewDataContext.UpdateJoinDocs <IDocProduct>(tblManipulation, doc => doc.ProductName = xProductName);
        }
        public Menu()
        {
            InitializeComponent();

            List<Link> pages = new List<Link> {
                new Link { Name = Properties.Resources.playlists, Page = "Playlists.xaml" },
                new Link { Name = Properties.Resources.images, Page = "Pictures.xaml" },
                new Link { Name = Properties.Resources.musics, Page = "Musics.xaml" },
                new Link { Name = Properties.Resources.videos, Page = "Videos.xaml" }
            };

            DataContext = new ViewDataContext { CurrentPage = pages[0], Pages = pages };
        }
        partial void OnDateRealizationChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xDateRealization = DateRealization;

            if (xDateRealization.HasValue)
            {
                tblManipulation.DateRealization = xDateRealization.Value;
            }
            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblManipulation, doc => doc.DateRealization = xDateRealization);
        }
        partial void OnPriceChanged()
        {
            if (tblManipulation == null)
            {
                return;
            }
            var xPrice = Price;

            if (xPrice.HasValue)
            {
                tblManipulation.Price = xPrice.Value;
            }
            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(tblManipulation, doc => doc.Price = xPrice);
        }
示例#25
0
    protected override void Load(ContainerBuilder builder)
    {
        var cqrsAssembly             = typeof(IAssemblyMarker).Assembly;
        var sampleDataContextOptions = new DbContextOptionsBuilder <SampleDataContext>().UseInMemoryDatabase("SampleDataDb").Options;
        var sampleViewContextOptions = new DbContextOptionsBuilder <ViewDataContext>().UseInMemoryDatabase("ViewDataDb").Options;
        var sampleDataContext        = new SampleDataContext(sampleDataContextOptions);
        var viewDataContext          = new ViewDataContext(sampleViewContextOptions);

        builder.RegisterInstance(sampleDataContext).As <SampleDataContext>();
        builder.RegisterInstance(viewDataContext).As <ViewDataContext>();

        builder.RegisterCqrs(cqrsAssembly)
        .AddAutofacInMemoryMessaging()
        .RegisterAssemblyTypes(ThisAssembly, new[] { "Runner" });
    }
示例#26
0
        private void pnlDocuments_Loaded(object sender, RoutedEventArgs e)
        {
            //Не загружайте свои данные во время разработки.
            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }
            FViewDataContext = ViewDataContext.Instance;
            CollectionViewSource tblProductOfferViewSource = ((CollectionViewSource)(this.FindResource("tblProductOfferViewSource")));

            tblProductOfferViewSource.Source = FViewDataContext.DictProductOffers;
            CollectionViewSource tblOperationOfferViewSource = ((CollectionViewSource)(this.FindResource("tblOperationOfferViewSource")));

            tblOperationOfferViewSource.Source = FViewDataContext.DictOperationOffers;


            //cbbEye.Items = [ Eye.OS, Eye.OS, Eye.OU ]
        }
        public MainWindow()
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr");
            InitializeComponent();
            SwitchToFrench(null, null);

            List<Link> pages = new List<Link> {
                new Link { Name = Properties.Resources.player, Page = "MediaPlayer.xaml" },
                new Link { Name = Properties.Resources.category, Page = "Menu.xaml" }
            };

            DataContext = new ViewDataContext
            {
                CurrentPage = pages[0],
                Pages = pages,
                FrFlagIcon = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/frFlag_icon.png")),
                EnFlagIcon = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/enFlag_icon.png"))
            };
        }
        public MediaPlayer()
        {
            InitializeComponent();

            DataContext = new ViewDataContext
            {
                ViewModel      = ViewModel.MediaViewModel.getInstance(),
                SpeedDownIcon  = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/speed_down_icon.png")),
                PrevIcon       = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/prev_icon.png")),
                PlayIcon       = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/play_icon.png")),
                PauseIcon      = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/pause_icon.png")),
                StopIcon       = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/stop_icon.png")),
                NextIcon       = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/next_icon.png")),
                SpeedUpIcon    = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/speed_up_icon.png")),
                FullScreenIcon = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/full_screen_icon.png"))
            };

            App.Current.MainWindow.PreviewKeyDown += new KeyEventHandler(TurnOffFullScreen);
        }
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //Не загружайте свои данные во время разработки.
            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
            {
                return;
            }
            FViewDataContext = ViewDataContext.Instance;

            CollectionViewSource tblOfferViewSource = ((CollectionViewSource)(this.FindResource("tblOfferViewSource")));

            tblOfferViewSource.Source = FViewDataContext.DictDefaultOffers;

            CollectionViewSource tblEmployeeViewSource = ((CollectionViewSource)(this.FindResource("tblEmployeeViewSource")));

            tblEmployeeViewSource.Source = FViewDataContext.DictEmployees;

            //System.Windows.Data.CollectionViewSource tblReferralVendorViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("tblReferralVendorViewSource")));
            //tblReferralVendorViewSource.Source = FViewDataContext. ;
        }
        partial void OnOfferCustomTextChanged()
        {
            var xOfferCustomText = OfferCustomText;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(this, doc =>
            {
                if (doc is tblDocumentService)
                {
                    ((tblDocumentService)doc).Name = xOfferCustomText;
                }
                else if (doc is tblDocumentProduct)
                {
                    ((tblDocumentProduct)doc).ProductName = xOfferCustomText;
                }
                else if (doc is tblDocumentSalesReceipt)
                {
                    ((tblDocumentSalesReceipt)doc).ProductName = xOfferCustomText;
                }
            });
        }
示例#31
0
        public MainWindow()
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("fr");
            InitializeComponent();
            SwitchToFrench(null, null);

            List <Link> pages = new List <Link> {
                new Link {
                    Name = Properties.Resources.player, Page = "MediaPlayer.xaml"
                },
                new Link {
                    Name = Properties.Resources.category, Page = "Menu.xaml"
                }
            };

            DataContext = new ViewDataContext
            {
                CurrentPage = pages[0],
                Pages       = pages,
                FrFlagIcon  = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/frFlag_icon.png")),
                EnFlagIcon  = new System.Windows.Media.Imaging.BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + "../../images/enFlag_icon.png"))
            };
        }
        public Menu()
        {
            InitializeComponent();

            List <Link> pages = new List <Link> {
                new Link {
                    Name = Properties.Resources.playlists, Page = "Playlists.xaml"
                },
                new Link {
                    Name = Properties.Resources.images, Page = "Pictures.xaml"
                },
                new Link {
                    Name = Properties.Resources.musics, Page = "Musics.xaml"
                },
                new Link {
                    Name = Properties.Resources.videos, Page = "Videos.xaml"
                }
            };

            DataContext = new ViewDataContext {
                CurrentPage = pages[0], Pages = pages
            };
        }
        public Musics()
        {
            InitializeComponent();

            DataContext = new ViewDataContext { ViewModel = ViewModel.MusicViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance() };
        }
        public Pictures()
        {
            InitializeComponent();

            DataContext = new ViewDataContext { ViewModel = ViewModel.PictureViewModel.getInstance(), MediaViewModel = ViewModel.MediaViewModel.getInstance() };
        }
        partial void OnPhonChanged()
        {
            var xPhon = Phon;

            ViewDataContext.UpdateJoinDocs <tblDocumentCommon>(this, doc => doc.Phon = xPhon);
        }