Exemple #1
0
        private void PrintJobStatWithLeads(bool isPreview, int sortCode)
        {
            //*******************************************Added*****5/7
            if (IsDepartmentSelected() == false)
            {
                MessageBox.Show("Please select at least one Department", "Search Again", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (IsProjectSelected() == false)
            {
                MessageBox.Show("Please select at least one Lead", "Search Again", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //*************************************************************



            if (IsDepartmentAllChecked() == true)
            {
                MessageBox.Show("Unable to print project leads in multiple departments", "Multiple Departments", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            CPDrawingLog dl   = new CPDrawingLog();
            string       xml1 = "";
            string       xml2 = "";

            CreateDepartmentXMLList(ref xml1);
            CreateLeadXMLList(ref xml2);

            dl.PrintJobStatList(xml1, xml2, true, isPreview, sortCode);
        }
Exemple #2
0
        private void PrintDrawingLogWithProjects(bool isPreview, int sortCode, int drwgSpec)
        {
            //*******************************************Added*****5/7
            if (IsDepartmentSelected() == false)
            {
                MessageBox.Show("Please select at least one Department", "Search Again", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (IsProjectSelected() == false)
            {
                MessageBox.Show("Please select at least one Project", "Search Again", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            //*************************************************************


            CPDrawingLog dl   = new CPDrawingLog(); //*********************************MOved 9/11 to test !!!!!!!!!!!!!!!!!!!!!!
            string       xml1 = "";
            string       xml2 = "";



            if (IsDepartmentAllChecked() == true && IsProjectLeadAllChecked() == true)
            {
                MessageBox.Show("Please limit your search, selecting all departments and projects will return too large a result set", "Search Limit", MessageBoxButtons.OK, MessageBoxIcon.Information);
                CreateProjectXMLList(ref xml1); //*********************************Added 9/11 to test !!!!!!!!!!!!!!!!!!!!!!
                CreateDepartmentXMLList(ref xml1);
                return;
            }

            //CPDrawingLog dl = new CPDrawingLog();
            //string xml1 = "";
            //string xml2 = "";

            if (IsDepartmentAllChecked() == true)
            {
                CreateProjectXMLList(ref xml1);
                //CreateDepartmentXMLList(ref xml1); // *********************** Added to check

                dl.PrintDrawingLogList(xml1, false, isPreview, sortCode, drwgSpec);
            }
            else if (IsProjectLeadAllChecked() == true)
            {
                CreateDepartmentXMLList(ref xml1);
                //CreateProjectXMLList(ref xml1); // *********************** Added to check

                dl.PrintDrawingLogList(xml1, true, isPreview, sortCode, drwgSpec);
            }
            else
            {
                CreateDepartmentXMLList(ref xml1);
                CreateProjectXMLList(ref xml2);
                dl.PrintDrawingLogList(xml1, xml2, isPreview, sortCode, drwgSpec);
            }
        }
Exemple #3
0
        private void tbbJobStatPrint_Click(object sender, EventArgs e)
        {
            CPDrawingLog dl = new CPDrawingLog();

            dl.PrintJobStat(miCurrDept, miCurrProj);
        }