Exemple #1
0
        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);

            }
        }
Exemple #2
0
        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);

            }
        }
Exemple #3
0
        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);
                 }
                }
            

        }
Exemple #4
0
          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);

        }
Exemple #5
0
        //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);
        }
Exemple #6
0
        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);

        }
Exemple #7
0
        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);

            
            }
        }
Exemple #8
0
        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);
        }