Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CHM_ETAT_COMMANDE rpt = new CHM_ETAT_COMMANDE();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void BTN_Aperçu_cmd_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            try
            {
                if (buttonENREGISTRER.Enabled == false)
                {
                    Application.DoEvents();
                    //DataTable[] tab = CLIENT_APP_PARAM.GEST.P_COMMANDE.PRINT(CODE_COMMANDE.Text);
                    DataTable[] tab = CLIENT_APP_PARAM.gcws.PRINT_COMMANDE(CODE_COMMANDE.Text);
                    DataSet1    ds  = new DataSet1();
                    if (tab[2].Rows.Count != 0)
                    {
                        ds.SOCIETE.ImportRow(tab[2].Rows[0]);
                    }

                    if (tab[0].Rows.Count != 0)
                    {
                        ds.COMMANDE.ImportRow(tab[0].Rows[0]);
                    }

                    foreach (DataRow dr in tab[1].Rows)
                    {
                        ds.LIGNE_COMMANDE.ImportRow(dr);
                    }



                    CHM_ETAT_COMMANDE c = new CHM_ETAT_COMMANDE();
                    c.SetDataSource(ds);



                    CHM_ETATS etat = new CHM_ETATS();
                    etat.CHM_Aperçu_document.ReportSource = c;
                    etat.WindowState = FormWindowState.Maximized;
                    etat.MdiParent   = CLIENT_APP_PARAM.Fenetre_principale;
                    etat.Show();
                }
                else
                {
                    MessageBox.Show("Veuillez tout d'abord enregistrer la commande", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
            catch (Exception er)
            {
                MessageBox.Show(er.Message, "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Beispiel #3
0
        private void BTN_Aperçu_cmd_Click(object sender, EventArgs e)
        {
            if (bs.Current != null)
            {
                this.Cursor = Cursors.WaitCursor;

                try
                {
                    Application.DoEvents();
                    //DataTable[] tab = CLIENT_APP_PARAM.GEST.P_COMMANDE.PRINT((bs.Current as DataRowView)["CODE_COMMANDE"].ToString());
                    DataTable[] tab = CLIENT_APP_PARAM.gcws.PRINT_COMMANDE((bs.Current as DataRowView)["CODE_COMMANDE"].ToString());
                    DataSet1    ds  = new DataSet1();
                    if (tab[2].Rows.Count != 0)
                    {
                        ds.SOCIETE.ImportRow(tab[2].Rows[0]);
                    }

                    if (tab[0].Rows.Count != 0)
                    {
                        ds.COMMANDE.ImportRow(tab[0].Rows[0]);
                    }

                    foreach (DataRow dr in tab[1].Rows)
                    {
                        ds.LIGNE_COMMANDE.ImportRow(dr);
                    }



                    CHM_ETAT_COMMANDE c = new CHM_ETAT_COMMANDE();
                    c.SetDataSource(ds);



                    CHM_ETATS etat = new CHM_ETATS();
                    etat.CHM_Aperçu_document.ReportSource = c;
                    etat.Show();
                }
                catch (Exception er)
                {
                    MessageBox.Show(er.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }