Пример #1
0
        public MainWindow()
        {
            InitializeComponent();


            skTransaction tranobj = new skTransaction();



            tb1.Text = tranobj.GetTransactionList().FirstOrDefault().Description;
        }
Пример #2
0
        public TransactionManagerViewModel()
        {
            try
            {
                if (DesignerProperties.GetIsInDesignMode(new System.Windows.DependencyObject()))
                {
                    return;
                }

                Transaction  = new skTransaction();
                _NewPurchase = new Command(OpenNewPurchase);
                _UpdateList  = new AsynchronousCommand(SearchMethod);
                _TranDetails = new Command(OpenTranDetails);
                _Export      = new Command(ExportList);
                actionbar    = new ActionBar();
                _Loaded      = new AsynchronousCommand(SearchMethod);

                actionbar.Add(new ToolBarButton {
                    Content = "Add New Purchase", Command = _NewPurchase
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Transaction Details", Command = _TranDetails
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Refresh List", Command = _UpdateList
                });
                actionbar.Add(new ToolBarButton {
                    Content = "Export Current", Command = _Export
                });

                // SourceList = new List<dynamic>(Transaction.GetTransactionList());
                // QuickSearch = new QuickSearch(SourceList);
            }
            catch (Exception E)
            {
                ExepionLogger.Logger.LogException(E);
                ExepionLogger.Logger.Show(E);
            }
        }