private void controlNavigator1_ButtonClick(object sender, NavigatorButtonClickEventArgs e) { if (e.Button.ButtonType == NavigatorButtonType.Append) { e.Handled = true; InsertRecord(); return; } if (e.Button.ButtonType == NavigatorButtonType.Custom) { if (e.Button.ImageIndex == 4) { e.Handled = true; UpdateRecord(); } else { if (e.Button.ImageIndex == 5) { if (GridView.FocusedRowHandle < 0) { MyLocalizer.XtraMessageBoxShow("Необходимо указать конденсатор.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } DataRowView drv = (DataRowView)(this.qCondenserTestBindingSource.Current); long id = Convert.ToInt64(drv.Row["CondenserID"]); long test_id = Convert.ToInt64(drv.Row["CondenserTestID"]); WaitingForm wf = new WaitingForm(); wf.m_CondenserID = id; wf.m_CondenserTestID = test_id; wf.ShowDialog(this); if (wf.m_Word != null) { wf.m_Word.SetVisible(true); wf.m_Word.DestroyWord(); } } } return; } if (e.Button.ButtonType == NavigatorButtonType.Remove) { e.Handled = true; DeleteRecord(); return; } }
private void btnReport_Click(object sender, EventArgs e) { if (MainGridView.FocusedRowHandle < 0) { MyLocalizer.XtraMessageBoxShow("Необходимо указать конденсатор.", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } DataRowView drv = (DataRowView)(qMainEquipmentsBindingSource.Current); long id = Convert.ToInt64(drv.Row["CondenserID"]); WaitingForm wf = new WaitingForm(); wf.m_CondenserID = id; wf.ShowDialog(this); if (wf.m_Word != null) { wf.m_Word.SetVisible(true); wf.m_Word.DestroyWord(); } }