private void btPrint_Click(object sender, EventArgs e) { if (this.invoiceMasterBindingSource.Count== 0) return; MDataSet.InvoiceMasterRow _curentMasterRow = (this.invoiceMasterBindingSource.Current as DataRowView).Row as MDataSet.InvoiceMasterRow; if (_curentMasterRow==null) return; try { FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/InvoiceMasterByID"); ReportParameter ReceiptMasterRef = new ReportParameter("InvoiceMasterRef", _curentMasterRow.ID.ToString()); fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { ReceiptMasterRef }); fromDialog.ShowDialog(this); } catch (Exception err) { MessageBox.Show(err.Message); } }
private void btNewReport_Click(object sender, EventArgs e) { if ((this.ordersBindingSource.Current as DataRowView) != null) { int _tradePutletRef = ((this.ordersBindingSource.Current as DataRowView).Row as MDataSet.OrdersRow).TradePupletRef; FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/OrdersNew"); ReportParameter TradePutletRef = new ReportParameter("TradePutletRef", _tradePutletRef.ToString()); fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { TradePutletRef }); fromDialog.ShowDialog(this); } }
private void btReport_Click(object sender, EventArgs e) { if (this.mDataSet.HasChanges()) { MessageBox.Show("Есть несохраненные данные!"); return; } if (this.mDataSet.Orders.HasErrors) return; FormPrintDialog formDialog = new FormPrintDialog("/ReportRetailTrade/OrdersForReport"); DateTime time = DateTime.Now; formDialog.ShowDialog(this); // if (formDialog.ShowDialog(this) == DialogResult.OK) if( MessageBox.Show("Закрыть заказанные позиции?","Закрытие заказа",MessageBoxButtons.OKCancel,MessageBoxIcon.Asterisk)==DialogResult.OK ) { try {/*закрыть заявки*/ this.ordersTableAdapter.OrdersSetReservedCommand(time); this.ordersTableAdapter.Fill(this.mDataSet.Orders); } catch (Exception err) { MessageBox.Show(err.Message); } } }
private void btPrint_Click(object sender, EventArgs e) { MDataSet.ReceiptMasterRow row = (this.receiptMasterBindingSource.Current as DataRowView).Row as MDataSet.ReceiptMasterRow; FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/ReceiptMasterByID"); ReportParameter ReceiptMasterRef = new ReportParameter("ReceiptMasterRef", row.ID.ToString()); fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { ReceiptMasterRef }); fromDialog.ShowDialog(this); }
//Report public void ProductReport(int ProductRef) { FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/ProductReport"); ReportParameter _ProductRef = new ReportParameter("ProductRef", ProductRef.ToString()); fromDialog.reportViewer.ShowParameterPrompts = true; fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { _ProductRef }); fromDialog.ShowDialog(this); }
private void ReportPrint_Click(object sender, EventArgs e) { if ((sender as ToolStripMenuItem).Tag.ToString().Length == 0) return; string namereport = (sender as ToolStripMenuItem).Tag.ToString(); FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/" + namereport); fromDialog.ShowDialog(this); }
private void btStockRep_Click(object sender, EventArgs e) { try { FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/InvoiceMasterByIdForStock"); ReportParameter ReceiptMasterRef = new ReportParameter("InvoiceMasterRef", this._curentMasterRow.ID.ToString()); fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { ReceiptMasterRef }); fromDialog.ShowDialog(this); } catch (Exception err) { MessageBox.Show(err.Message); } }
private void btPrint_Click(object sender, EventArgs e) { FormPrintDialog fromDialog = new FormPrintDialog("/ReportRetailTrade/InvoiceMasterByID"); ReportParameter ReceiptMasterRef = new ReportParameter("InvoiceMasterRef", this._curentMasterRow.ID.ToString()); fromDialog.reportViewer.ServerReport.SetParameters(new ReportParameter[] { ReceiptMasterRef }); fromDialog.ShowDialog(this); }