Пример #1
0
        private void ExecuteAddCheckCommand(object obj)
        {
            try
            {
                if (SelectedTransaction != null && SelectedBusinessPartner != null)
                {
                    if (!string.IsNullOrEmpty(SelectedTransaction.FiscalNumber))
                    {
                        SelectedTransaction.BusinessPartnerId = SelectedBusinessPartner.Id;

                        _unitOfWork.Repository <TransactionHeaderDTO>().Update(SelectedTransaction);
                        _unitOfWork.Commit();

                        var myReport = new SingleTransaction();
                        myReport.SetDataSource(GetListDataSet());

                        var report = new ReportViewerCommon(myReport);
                        report.Show();

                        CloseWindow(obj);
                    }
                    else
                    {
                        MessageBox.Show("Fiscal Number can't be empty!");
                    }
                }
            }
            catch
            {
                MessageBox.Show("Got problem while getting Attachment!", "Attachment Problem");
            }
        }
Пример #2
0
        public void PrintTransaction(object obj)
        {
            var myReport = new SingleTransaction();

            myReport.SetDataSource(GetListDataSet2());

            var report = new ReportViewerCommon(myReport);

            report.Show();
        }
Пример #3
0
        public void GetAttachment(object obj)
        {
            var myReport = new SingleTransaction();
            var dSet     = GetAttachmentDataSet();

            if (dSet == null)
            {
                MessageBox.Show("No Data found to display!");
            }
            else
            {
                myReport.SetDataSource(dSet);
                var report = new ReportViewerCommon(myReport);
                report.Show();
            }
        }