Esempio n. 1
0
        private void bttPrint_Click(object sender, EventArgs e)
        {
            FPreview pv = new FPreview();

            bttPrint.Enabled = false;
            if (mbIsMasterList == true)
            {
                lblProcessing.Visible  = true;
                pv.OnProjectProcessed += new RevSol.PassDataString(pv_OnProjectProcessed);
                Application.DoEvents();
                pv.LoadReportForProjectRollup(lstProjects.Text, GetRprtCase(lstProjects.Text));
                // MessageBox.Show("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
                lblProcessing.Visible = false;
            }
            else
            {
                // MessageBox.Show("xxxxxxxxxxxxxx");
                pv.LoadReportForProject(lstProjects.Text, GetRprtCase(lstProjects.Text));
            }

            // MessageBox.Show("xxxxxxxxx....................................xxxxx");

            pv.ShowDialog();
            bttPrint.Enabled = true;
        }
Esempio n. 2
0
        private void bttPrint_Click(object sender, EventArgs e)
        {
            FPreview pv = new FPreview();

            bttPrint.Enabled = false;

            if (this.IsForPipeline == true) // ******************************This if block is added 12/8

            {
                //MessageBox.Show("this is for Pipeline............");

                try
                {
                    index = this.lvwItems.SelectedIndices[0];
                }
                catch { }

                if (mbIsMasterList == true)
                {
                    // MessageBox.Show("iiiiiiii");
                    lblProcessing.Visible  = true;
                    pv.OnProjectProcessed += new RevSol.PassDataString(pv_OnProjectProcessed);
                    Application.DoEvents();
                    pv.LoadReportForProjectRollup_Pipelines(lvwItems.Items[index].SubItems[1].Text, GetRprtCase(lvwItems.Items[index].SubItems[1].Text));         //*********************************************************
                    lblProcessing.Visible = false;
                }
                else
                {
                    // MessageBox.Show("mmmmmmmmmmmmmmmmmmmmmmmmmmmmm");
                    pv.LoadReportForProject_Pipelines(lvwItems.Items[index].SubItems[1].Text, GetRprtCase(lvwItems.Items[index].SubItems[1].Text));          //*********************************************************
                }

                pv.ShowDialog();
                bttPrint.Enabled = true;
            }
            else
            {
                //  MessageBox.Show("nooooooooooooooooooooooooo");

                // MessageBox.Show(lstProjects.Text); //******************Commented 6/16/15***11 am***MZ

                // int index = this.lvwItems.SelectedIndices[0];
                try
                {
                    index = this.lvwItems.SelectedIndices[0];
                }
                catch { }
                //MessageBox.Show(lvwItems.Items[index].SubItems[2].Text);
                // MessageBox.Show(lvwItems.SelectedItems[1].Text);


                if (mbIsMasterList == true)
                {
                    lblProcessing.Visible  = true;
                    pv.OnProjectProcessed += new RevSol.PassDataString(pv_OnProjectProcessed);
                    Application.DoEvents();
                    //pv.LoadReportForProjectRollup(lstProjects.Text, GetRprtCase(lstProjects.Text));

                    pv.LoadReportForProjectRollup(lvwItems.Items[index].SubItems[1].Text, GetRprtCase(lvwItems.Items[index].SubItems[1].Text)); //*********************************************************
                    lblProcessing.Visible = false;
                }
                else
                {
                    // pv.LoadReportForProject(lstProjects.Text, GetRprtCase(lstProjects.Text));
                    pv.LoadReportForProject(lvwItems.Items[index].SubItems[1].Text, GetRprtCase(lvwItems.Items[index].SubItems[1].Text));  //*********************************************************
                }



                pv.ShowDialog();
                bttPrint.Enabled = true;
            }
        }