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; }
public frmMaterialReport(DAL.MaterialReportEntity re) { reportEntity = re; InitializeComponent(); dgvDetail.LoadComponentSettings(); bsMaterial.DataSource = reportEntity; bsMaterialDetails.DataSource = reportEntity.DetailsList; }
public frmReportViewer(DAL.MaterialReportEntity repEntity) { reportEntity = repEntity; InitializeComponent(); }