//Метод обновления view
        private void RefreshWindow()
        {
            var invoicesDbAcсess = _dataAccessFactory.CreateInvoicesDbAccess();

            _listOfInvoiceView.ListOfInvoices   = null;
            _listOfInvoiceView.ListOfInvoices   = invoicesDbAcсess.GetAllInvoices();
            _listOfInvoiceView.IsHistoryEnabled = false;
            _listOfInvoiceView.IsEditEnabled    = false;
            _listOfInvoiceView.IsDoneEnabled    = false;
        }
Beispiel #2
0
        private void UpdateExistingInvoice(Articles article)
        {
            //Получаем дату изменения
            string currentDate = DateTime.Now.ToString("yyyy/MM/dd HH:mm");

            var invoicesDb = _dataAccessFactory.CreateInvoicesDbAccess();

            //Обновляем существующую накладную
            invoicesDb.UpdateInvoice(_newInvoiceView.IdString, _newInvoiceView.StringOfType,
                                     _newInvoiceView.StringOfSender, _newInvoiceView.StringOfGetter,
                                     _currentUser.AuthorizedUser.UserName,
                                     article.nameOfArticle, article.amountFree, currentDate, article.articleId, _newInvoiceView.StringOfText);
        }