コード例 #1
0
        //-------------------------------------------

        //Form Display Functions---------------------
        private void DisplayLESWOs()
        {
            panel_pdfInput.Controls.Clear();
            panel_Contractors.Controls.Clear();

            Label label_WO = new Label();

            label_WO.Text = "Active Work Orders";
            panel_pdfInput.Controls.Add(label_WO);

            CheckedListBox checkedListBoxWOs = new CheckedListBox();

            checkedListBoxWOs.Size = new Size(checkedListBoxWOs.Size.Width, checkedListBoxWOs.Size.Height * 2);

            LESContract contract = (LESContract)settings.contractList.Find(x => x is LESContract && x.contractName == combo_contracts.Text);

            for (int i = 0; i < contract.woCount(); i++)
            {
                checkedListBoxWOs.Items.Add(contract.woAt(i), false);
            }

            checkedListBoxWOs.Location     = new System.Drawing.Point(5, 30);
            checkedListBoxWOs.BackColor    = System.Drawing.Color.FromName("Control");
            checkedListBoxWOs.BorderStyle  = BorderStyle.None;
            checkedListBoxWOs.CheckOnClick = false;
            //checkedListBoxWOs.Anchor = AnchorStyles.Bottom & AnchorStyles.Top & AnchorStyles.Left & AnchorStyles.Right;
            checkedListBoxWOs.Size = new Size(panel_pdfInput.Size.Width, panel_pdfInput.Size.Height);
            checkedListBoxWOs.SelectedIndexChanged += new EventHandler(LESWOCheckboxChanged);

            //CHANGE TO THIS 11/9/18
            //checkedListBoxWOs.ItemCheck += new EventHandler(LESWOCheckboxChanged);
            panel_pdfInput.Controls.Add(checkedListBoxWOs);
        }
コード例 #2
0
        private void BuildLES()
        {
            LESContract LES = new LESContract();

            LES.contractName = "LES 2018";

            LES.addWO("5028651");
            LES.addWO("5028652");
            LES.addWO("5028653");
            LES.addWO("5028657");
            LES.addWO("5028658");
            LES.addWO("5028661");
            LES.addWO("5028702");
            LES.addWO("5028704");
            LES.addWO("5028705");
            LES.addWO("5029268");
            LES.addWO("5031156");
            LES.addWO("5028659");
            LES.addWO("5028703");
            LES.addWO("5029267");
            LES.addWO("5028654");
            LES.addWO("5028660");

            LES.addContractor("CBT");
            LES.addContractor("Simon");
            LES.addContractor("Atlas");
            LES.addContractor("Vicomm");
            LES.addContractor("GPS");

            settings.contractList.Add(LES);

            LESContract LES2019 = new LESContract();

            LES2019.contractName = "LES 2019";
            LES2019.addWO("5031483");
            LES2019.addWO("5031499");
            LES2019.addContractor("CBT");
            LES2019.addContractor("Simon");
            LES2019.addContractor("Atlas");
            LES2019.addContractor("Vicomm");
            LES2019.addContractor("GPS");

            settings.contractList.Add(LES2019);
        }
コード例 #3
0
        private void DisplayLESInput()
        {
            panel_Contractors.Controls.Clear();
            LESContract contract = (LESContract)settings.contractList.Find(x => x is LESContract && x.contractName == combo_contracts.Text);

            CheckedListBox clb = null;

            for (int i = 0; i < panel_pdfInput.Controls.Count; i++)
            {
                if (panel_pdfInput.Controls[i] is CheckedListBox)
                {
                    clb = (CheckedListBox)panel_pdfInput.Controls[i];
                    break;
                }
            }
            if (clb.CheckedItems.Count > 0)
            {
                Panel    inputPanel;
                CheckBox checkBox;
                TextBox  textBox;
                Button   button;

                Label label = new Label();
                label.Text = "PDF Input";

                panel_Contractors.Controls.Add(label);
                String[] tjReportRequirements = new string[]
                {
                    "Cam", "Kevin", "Masoud", "LES Overall", "Retainage"
                };

                String[] tjReportRequirementDescriptions = new string[]
                {
                    "Report from Access, DD Cam (from beginning of week to billing date)",
                    "Report from Access, DD Kevin (from beginning of week to billing date)",
                    "Report from Access, DD Masoud (from beginning of week to billing date)",
                    "Report from Access, B Year to Date Overall (from 1/1/[year] to billing date)",
                    "PDF of Retainage Excel sheet"
                };

                String[] woRequirements = new String[]
                {
                    "Nielsen Invoice", "LES Invoice Excel",
                    "A LES by Date", "Production for WO",
                    "B Year To Date Remaining Balance",
                    "L Total"
                };

                String[] requirementDescriptions = new String[]
                {
                    "Invoice made from QB", "Invoice made from excel sheet",
                    "Report from Access, A LES by Date (beginning of week to end of week)",
                    "Production for the specific work order sent from Nielsen in Lincoln",
                    "Report from Access, B Year to Date Remaining Balance (from 1/1/[year] to billing date)",
                    "Report from Access, L Total"
                };


                for (int i = 0; i < clb.CheckedItems.Count; i++)
                {
                    label          = new Label();
                    label.Text     = clb.CheckedItems[i].ToString();
                    label.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + label.Size.Height * 2);

                    panel_Contractors.Controls.Add(label);


                    for (int j = 0; j < woRequirements.Length; j++)
                    {
                        inputPanel          = new Panel();
                        inputPanel.Anchor   = AnchorStyles.Top;
                        inputPanel.Size     = new Size(300, 25);
                        inputPanel.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + inputPanel.Size.Height);

                        checkBox                 = new CheckBox();
                        checkBox.Checked         = true;
                        checkBox.CheckedChanged += new EventHandler(checkbox_Custom_CheckChanged);
                        checkBox.Size            = new Size(20, 23);
                        checkBox.Location        = new System.Drawing.Point(10, 0);

                        ToolTip toolTip = new ToolTip();
                        toolTip.AutoPopDelay = 5000;
                        toolTip.InitialDelay = 1000;
                        toolTip.ReshowDelay  = 500;
                        toolTip.SetToolTip(checkBox, "Enables or disables the pdf in the report");

                        inputPanel.Controls.Add(checkBox);

                        textBox          = new TextBox();
                        textBox.Text     = woRequirements[j];
                        textBox.ReadOnly = true;
                        textBox.Location = new System.Drawing.Point(30, 0);
                        textBox.Width    = 100;
                        textBox.Height   = 23;

                        toolTip = new ToolTip();
                        toolTip.AutoPopDelay = 5000;
                        toolTip.InitialDelay = 1000;
                        toolTip.ReshowDelay  = 500;
                        toolTip.SetToolTip(textBox, requirementDescriptions[j]);

                        inputPanel.Controls.Add(textBox);

                        button          = new Button();
                        button.Text     = woRequirements[j];
                        button.Anchor   = AnchorStyles.Top;
                        button.Location = new System.Drawing.Point(135, 0);
                        button.Width    = 75;
                        button.Height   = 23;
                        button.Click   += new EventHandler(button_pdf1browse_Click);
                        button.Visible  = true;
                        button.Enabled  = true;

                        toolTip = new ToolTip();
                        toolTip.AutoPopDelay = 5000;
                        toolTip.InitialDelay = 1000;
                        toolTip.ReshowDelay  = 500;
                        toolTip.SetToolTip(button, requirementDescriptions[j]);

                        inputPanel.Controls.Add(button);
                        panel_Contractors.Controls.Add(inputPanel);
                    }
                }

                label          = new Label();
                label.Text     = "Contractors";
                label.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + label.Size.Height * 2);
                panel_Contractors.Controls.Add(label);

                for (int i = 0; i < contract.contractorCount(); i++)
                {
                    inputPanel          = new Panel();
                    inputPanel.Anchor   = AnchorStyles.Top;
                    inputPanel.Size     = new Size(300, 25);
                    inputPanel.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + inputPanel.Size.Height);

                    checkBox                 = new CheckBox();
                    checkBox.Checked         = true;
                    checkBox.CheckedChanged += new EventHandler(checkbox_Custom_CheckChanged);
                    checkBox.Size            = new Size(20, 23);
                    checkBox.Location        = new System.Drawing.Point(10, 0);

                    ToolTip toolTip = new ToolTip();
                    toolTip.AutoPopDelay = 5000;
                    toolTip.InitialDelay = 1000;
                    toolTip.ReshowDelay  = 500;
                    toolTip.SetToolTip(checkBox, "Enables or disables the pdf in the report");

                    inputPanel.Controls.Add(checkBox);

                    textBox          = new TextBox();
                    textBox.Text     = contract.contractorAt(i);
                    textBox.ReadOnly = true;
                    textBox.Location = new System.Drawing.Point(30, 0);
                    textBox.Width    = 100;
                    textBox.Height   = 23;
                    inputPanel.Controls.Add(textBox);

                    button          = new Button();
                    button.Text     = contract.contractorAt(i);
                    button.Anchor   = AnchorStyles.Top;
                    button.Location = new System.Drawing.Point(135, 0);
                    button.Width    = 75;
                    button.Height   = 23;
                    button.Click   += new EventHandler(button_pdf1browse_Click);
                    button.Visible  = true;
                    button.Enabled  = true;

                    toolTip = new ToolTip();
                    toolTip.AutoPopDelay = 5000;
                    toolTip.InitialDelay = 1000;
                    toolTip.ReshowDelay  = 500;
                    toolTip.SetToolTip(button, "Report from Access, C Sub by Sub Number and Date");

                    inputPanel.Controls.Add(button);
                    panel_Contractors.Controls.Add(inputPanel);
                }

                label          = new Label();
                label.Text     = "TJ Report";
                label.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + label.Size.Height * 2);
                panel_Contractors.Controls.Add(label);

                for (int i = 0; i < tjReportRequirements.Length; i++)
                {
                    inputPanel          = new Panel();
                    inputPanel.Anchor   = AnchorStyles.Top;
                    inputPanel.Size     = new Size(300, 25);
                    inputPanel.Location = new System.Drawing.Point(0, panel_Contractors.Controls[panel_Contractors.Controls.Count - 1].Location.Y + inputPanel.Size.Height);

                    checkBox                 = new CheckBox();
                    checkBox.Checked         = true;
                    checkBox.CheckedChanged += new EventHandler(checkbox_Custom_CheckChanged);
                    checkBox.Size            = new Size(20, 23);
                    checkBox.Location        = new System.Drawing.Point(10, 0);

                    ToolTip toolTip = new ToolTip();
                    toolTip.AutoPopDelay = 5000;
                    toolTip.InitialDelay = 1000;
                    toolTip.ReshowDelay  = 500;
                    toolTip.SetToolTip(checkBox, "Enables or disables the pdf in the report");

                    inputPanel.Controls.Add(checkBox);

                    textBox          = new TextBox();
                    textBox.Text     = tjReportRequirements[i];
                    textBox.ReadOnly = true;
                    textBox.Location = new System.Drawing.Point(30, 0);
                    textBox.Width    = 100;
                    textBox.Height   = 23;
                    inputPanel.Controls.Add(textBox);

                    button          = new Button();
                    button.Text     = tjReportRequirements[i];
                    button.Anchor   = AnchorStyles.Top;
                    button.Location = new System.Drawing.Point(135, 0);
                    button.Width    = 75;
                    button.Height   = 23;
                    button.Click   += new EventHandler(button_pdf1browse_Click);
                    button.Visible  = true;
                    button.Enabled  = true;

                    toolTip = new ToolTip();
                    toolTip.AutoPopDelay = 5000;
                    toolTip.InitialDelay = 1000;
                    toolTip.ReshowDelay  = 500;
                    toolTip.SetToolTip(button, tjReportRequirementDescriptions[i]);

                    inputPanel.Controls.Add(button);
                    panel_Contractors.Controls.Add(inputPanel);
                }
            }
        }