Beispiel #1
0
    protected int getProblemsCount(int locationID, char type)
    {
        int counter;

        counter = RoundingFunctions.getProblems(locationID, type).Count;

        return(counter);
    }
Beispiel #2
0
    protected void populate_qc_problems(string location_id)
    {
        Table roundingTable = new Table();

        roundingTable.CssClass = "table table-bordered table-hover table-striped table-responsive";

        TableHeaderRow  thr       = new TableHeaderRow();
        TableHeaderCell thc_venue = new TableHeaderCell();

        thc_venue.Text = "Venue";
        TableHeaderCell thc_desc = new TableHeaderCell();

        thc_desc.Text = "Description";
        TableHeaderCell thc_shift = new TableHeaderCell();

        thc_shift.Text = "Shift";
        TableHeaderCell thc_date = new TableHeaderCell();

        thc_date.Text = "Date";
        TableHeaderCell thc_troubleshoot = new TableHeaderCell();

        thc_troubleshoot.Text = "Troubleshoot";

        thr.Cells.Add(thc_venue);
        thr.Cells.Add(thc_desc);
        thr.Cells.Add(thc_shift);
        thr.Cells.Add(thc_date);
        thr.Cells.Add(thc_troubleshoot);

        roundingTable.Rows.Add(thr);

        int locationID = int.Parse(location_id);

        foreach (problem prob in RoundingFunctions.getProblems(locationID, 'q'))
        {
            TableRow  newRow              = new TableRow();
            TableCell venueCell           = new TableCell();
            TableCell descCell            = new TableCell();
            TableCell shiftCell           = new TableCell();
            TableCell dateCell            = new TableCell();
            TableCell troubleshootBtnCell = new TableCell();

            venueCell.Text = prob.venue;
            descCell.Text  = prob.description;
            shiftCell.Text = prob.shift;
            dateCell.Text  = prob.date;

            Button troubleshootBtn = new Button();
            troubleshootBtn.ID       = prob.id.ToString();
            troubleshootBtn.Text     = "Troubleshoot";
            troubleshootBtn.CssClass = "btn-sm btn-warning";
            troubleshootBtnCell.Controls.Add(troubleshootBtn);

            troubleshootBtn.Click += new EventHandler(this.troubleshootBtn_Click);
            newRow.Cells.Add(venueCell);
            newRow.Cells.Add(descCell);
            newRow.Cells.Add(shiftCell);
            newRow.Cells.Add(dateCell);
            newRow.Cells.Add(troubleshootBtnCell);

            roundingTable.Rows.Add(newRow);
        }

        roundingProblems_ph.Controls.Add(roundingTable);
    }