示例#1
0
        private void bGWorkerGetData_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            List <DataTable> tables = (List <DataTable>)e.Result;

            mColumnTable   = tables[0];
            mRequestsTable = tables[1];
            mContactTable  = tables[2];
            LoadColumnsComboBox();
            LoadContactsComboBox();
            mProgress.Close();
        }
示例#2
0
 private void bGWorkerLogFinished_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     int result = (int)e.Result;
     mProgress.Close();
     if (result == 0)
     {
         MessageBox.Show("Could not log as finished.");
     }
     this.Close();
 }
示例#3
0
        private void bGWGunParts_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            TableLayoutPanel tLP = (TableLayoutPanel)e.Result;

            this.SuspendLayout();
            tLP.MouseEnter += new System.EventHandler(tLP_MouseEnter);
            panelTLP.Controls.Add(tLP);
            tLP.HorizontalScroll.Enabled = false;
            this.ResumeLayout();
            progressForm.Close();
        }
示例#4
0
        private void bGWorkerFillTables_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            List <DataTable> dBTable = (List <DataTable>)e.Result;

            requestTable = new DataTable();
            requestTable = dBTable[0];
            contactTable = dBTable[1];


            requestTable.Columns["RequestedOn"].ColumnName  = "Requested";
            requestTable.Columns["StartedOn"].ColumnName    = "Started";
            requestTable.Columns["FinishedOn"].ColumnName   = "Finished";
            requestTable.Columns["SerialNumber"].ColumnName = "Serial #";
            requestTable.Columns["PartNumber"].ColumnName   = "Part #";
            requestTable.Columns["Email"].ColumnName        = "Contact";
            requestTable.Columns["Quantity"].ColumnName     = "Qty";
            queueTable     = new DataTable();
            queueTable     = requestTable.Clone();
            inProcessTable = new DataTable();
            inProcessTable = requestTable.Clone();
            finishedTable  = new DataTable();
            finishedTable  = requestTable.Clone();
            foreach (DataRow row in requestTable.Rows)
            {
                if (DBNull.Value.Equals(row["Started"]))
                {
                    queueTable.Rows.Add(row.ItemArray);
                }
                else if (DBNull.Value.Equals(row["Finished"]))
                {
                    inProcessTable.Rows.Add(row.ItemArray);
                }
                else
                {
                    if ((DateTime)row["Finished"] > DateTime.Today.AddDays(-2))
                    {
                        finishedTable.Rows.Add(row.ItemArray);
                    }
                }
            }
            InitQueueDGV();
            InitInProcessDGV();
            InitCompletedDGV();
            progressForm.Close();
        }
示例#5
0
        private void bGWDetails_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            List<DataTable> dBTable = (List<DataTable>)e.Result;
            requestTable = new DataTable();
            requestTable = dBTable[0];
            gunTable = dBTable[1];
            
            labelPart.Text = requestTable.Rows[0]["PartNumber"].ToString();
            labelDescription.Text = requestTable.Rows[0]["Description"].ToString();
            labelQty.Text = requestTable.Rows[0]["Quantity"].ToString();
            DateTime reqTime = (DateTime)requestTable.Rows[0]["RequestedOn"];
            labelRequestedOn.Text = reqTime.ToString("M/d/yyyy  @  h:mm tt");

            
            labelRequestor.Text = requestTable.Rows[0]["Requestor"].ToString();
            labelContact.Text = requestTable.Rows[0]["Email"].ToString();
            labelPO.Text = requestTable.Rows[0]["PO"].ToString();
            labelInstructions.Text = requestTable.Rows[0]["Instructions"].ToString();
            if (requestTable.Rows[0]["StartedOn"].Equals(DBNull.Value) || requestTable.Rows[0]["StartedOn"].Equals(""))
            {
                this.BackColor = Color.FromArgb(255, 255, 192);
            }
            else
            {
                DateTime startTime = (DateTime)requestTable.Rows[0]["StartedOn"];
                labelStartedOn.Text = startTime.ToString("M/d/yyyy  @  h:mm tt");
            }
            if (requestTable.Rows[0]["FinishedOn"].Equals(DBNull.Value) || requestTable.Rows[0]["FinishedOn"].Equals(""))
            {
                panelProcedures.Visible = false;
            }
            else
            {
                this.BackColor = Color.FromArgb(255, 224, 192);
                DateTime finTime = (DateTime)requestTable.Rows[0]["FinishedOn"];
                labelFinishedOn.Text = finTime.ToString("M/d/yyyy  @  h:mm tt");
                if (requestTable.Rows[0]["Decon"].Equals(true))
                    rBtnDecon.Checked = true;
                if (requestTable.Rows[0]["Ultrasonic"].Equals(true))
                    rBtnUltrasonic.Checked = true;
                if (requestTable.Rows[0]["Dishwasher"].Equals(true))
                    rBtnDW.Checked = true;
                if (requestTable.Rows[0]["WaterPik"].Equals(true))
                    rBtnWP.Checked = true;
                if (requestTable.Rows[0]["Crest10"].Equals(true))
                    rBtnC10.Checked = true;
                if (requestTable.Rows[0]["Crest20"].Equals(true))
                    rBtnC20.Checked = true;
                if (requestTable.Rows[0]["CrestLong"].Equals(true))
                    rBtnCLong.Checked = true;
            }
            if (requestTable.Rows[0]["Hot"].Equals(true))
            {
                lblHot.Text = "High Priority";
                pnlHot.BackColor = Color.Red;
                pnlHot.ForeColor = Color.White;
                pBFire.Visible = true;
                this.BackColor = Color.Black;
            }
            
            if (requestTable.Rows[0]["CR Ready"].Equals(true))
            {
                if (requestTable.Rows[0]["Bulk"].Equals(true))
                    lblCRR.Text = "Cleanroom Ready -Bulk-";
                else
                    lblCRR.Text = "Cleanroom Ready -Cage-";
                pnlCRReady.BackColor = Color.Green;
                pnlCRReady.ForeColor = Color.White;
            }
            foreach(DataRow row in gunTable.Rows)
            {
                if (requestTable.Rows[0]["PartNumber"].Equals(row["Type"].ToString()))
                {
                    btnDetails.Visible = true;
                }
            }
            progressForm.Close();
        }