Esempio n. 1
0
        public AdministratorMainWindow()
        {
            InitializeComponent();
            Title += " v" + Settings.version + ". Пользователь " + Auth.getInstance().Full_name + ". Режим администратора.";

            try
            {
                int updateTime = int.Parse(CRMSettingViewModel.instance().getByMashineName("bid_update_time").Setting_value) * 1000;
                if (updateTime != 0)
                {
                    Classes.UpdateTask.Start(Dispatcher,
                                             new Action(() => { BidViewModel.instance().reload(); }),
                                             updateTime,
                                             new Action(() => { updateNotification.Visibility = Visibility.Hidden; }),
                                             new Action(() => { updateNotification.Visibility = Visibility.Visible; }));
                }
            }
            catch {}

            menuOpenEquipmentWindow.Click += delegate
            {
                EquipmentWindow window = new EquipmentWindow();
                window.ShowDialog();
            };

            menuOpenComplectationItemWindow.Click += delegate
            {
                ComplectationItemWindow window = new ComplectationItemWindow();
                window.ShowDialog();
            };

            menuOpenBuyerWindow.Click += delegate
            {
                BuyerWindow window = new BuyerWindow();
                window.ShowDialog();
            };

            menuOpenSellerWindow.Click += delegate
            {
                SellerWindow window = new SellerWindow();
                window.ShowDialog();
            };

            menuOpenBidStatusWindow.Click += delegate
            {
                BidStatusWindow window = new BidStatusWindow();
                window.ShowDialog();
            };

            menuOpenPaymentStatusWindow.Click += delegate
            {
                PaymentStatusWindow window = new PaymentStatusWindow();
                window.ShowDialog();
            };

            menuOpenManagerWindow.Click += delegate
            {
                ManagerWindow window = new ManagerWindow();
                window.ShowDialog();
            };

            menuOpenTransportCompanyWindow.Click += delegate
            {
                TransportCompanyWindow window = new TransportCompanyWindow();
                window.ShowDialog();
            };

            menuOpenMessageTemplatesWindow.Click += delegate
            {
                MessageTemplatesWindow window = new MessageTemplatesWindow();
                window.ShowDialog();
            };

            tiCRMSetting.Content = new MainControlCRMSetting();
            tiBid.Content        = new MainControlBid();
        }
Esempio n. 2
0
        void MiOpenBuyerWindow_Click(object sender, RoutedEventArgs e)
        {
            BuyerWindow w = new BuyerWindow();

            w.ShowDialog();
        }