Esempio n. 1
0
        private void открытьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Cursor cursor = this.Cursor;

            this.Cursor = Cursors.WaitCursor;
            if (bsReportList.Position == -1)
            {
                return;
            }
            DataRowView current = bsReportList.Current as DataRowView;

            if (current != null)
            {
                int i = (int)current[0];
                try
                {
                    DAL.MaterialReportEntity reportEntity = DAL.MaterialReportEntity.GetEntity(i);
                    UI.frmMaterialReport     materialForm = new UI.frmMaterialReport(reportEntity);
                    materialForm.Show();
                }
                catch (OleDbException ex)
                {
                    MessageBox.Show(ex.Message, "Ошибка работы с базой данных");
                }
            }
            this.Cursor = cursor;
        }
Esempio n. 2
0
 public frmMaterialReport(DAL.MaterialReportEntity re)
 {
     reportEntity = re;
     InitializeComponent();
     dgvDetail.LoadComponentSettings();
     bsMaterial.DataSource        = reportEntity;
     bsMaterialDetails.DataSource = reportEntity.DetailsList;
 }
Esempio n. 3
0
 public frmReportViewer(DAL.MaterialReportEntity repEntity)
 {
     reportEntity = repEntity;
     InitializeComponent();
 }