private void btnStencilsReceived_Click(object sender, EventArgs e) { string message = "Did you receive the stencil(s) for Job Number: " + dgActiveWOR.Rows[quoteRow].Cells[1].Value.ToString() + "/" + dgActiveWOR.Rows[quoteRow].Cells[2].Value.ToString() + "?"; string caption = "Are you sure?"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result = MessageBox.Show(message, caption, buttons); if (result == System.Windows.Forms.DialogResult.Yes) { //Create a new db connection Classes.DataAccess.PurchasingDataAccess db = new Classes.DataAccess.PurchasingDataAccess(); //Set PartsReceived = True db.StencilsReceived(dgActiveWOR.Rows[quoteRow].Cells[1].Value.ToString(), dgActiveWOR.Rows[quoteRow].Cells[2].Value.ToString()); //Load Temp Lot Task for status calc Classes.LotTask tempLotTask = new Classes.LotTask(); tempLotTask.JobWOR = Int32.Parse(dgActiveWOR.Rows[quoteRow].Cells[1].Value.ToString()); tempLotTask.Lot = Int32.Parse(dgActiveWOR.Rows[quoteRow].Cells[2].Value.ToString()); //Update Quote Current Status Classes.StatusCalculation getStatus = new Classes.StatusCalculation(); getStatus.CalculateStatus(tempLotTask); //Refresh ShowLotNumbers(); } }
//Physical Events----------------------------------------------------------------------------------------------- private void btnRequestPartsReview_Click(object sender, EventArgs e) { string message = "Would you like to request a Parts Review for Job Number " + dgActiveQuotes.Rows[quoteRow].Cells[0].Value.ToString() + "?"; string caption = "Are you sure?"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result = MessageBox.Show(message, caption, buttons); if (result == System.Windows.Forms.DialogResult.Yes) { //Create a new db connection Classes.DataAccess.SalesDataAccess db = new Classes.DataAccess.SalesDataAccess(); //Set PartsReviewRequest to True, PartsReviewInProgress and PartsReviewComplete to False db.requestPartsReview(dgActiveQuotes.Rows[quoteRow].Cells[0].Value.ToString()); //Load Temp Lot Task for status calc Classes.LotTask tempLotTask = new Classes.LotTask(); tempLotTask.JobWOR = Int32.Parse(dgActiveQuotes.Rows[quoteRow].Cells[0].Value.ToString()); tempLotTask.Lot = 0; //Update Quote Current Status Classes.StatusCalculation getStatus = new Classes.StatusCalculation(); getStatus.CalculateStatus(tempLotTask); //Refresh ShowActiveQuotes(); } }
private void btnEnd_Click(object sender, EventArgs e) { //Grab an Instance of SalesDataAccess Classes.DataAccess.PurchasingDataAccess db = new Classes.DataAccess.PurchasingDataAccess(); //Prepare currentTask Classes.LotTask currentTask = new Classes.LotTask(); currentTask.JobWOR = Int32.Parse(dgTaskView[0, activeRow].Value.ToString()); currentTask.Lot = Int32.Parse(dgTaskView[1, activeRow].Value.ToString()); switch (dgTaskView[3, activeRow].Value.ToString()) { case "Parts Review In Progress": //Set PartsReviewComplete=True, PartsReviewRequest=False, PartsReviewInProgress=False; Eventually, Time-Tracking will happen here too... db.UpdatePartsReviewComplete(currentTask); break; } //Re-Calculate the JobStatus Classes.StatusCalculation getStatus = new Classes.StatusCalculation(); getStatus.CalculateStatus(currentTask); //Update the GridView populate(null, null); //Reset Buttons btnStart.Enabled = false; btnStart.Visible = true; btnStart.Text = "Start"; btnEnd.Enabled = false; btnEnd.Visible = false; btnEnd.Text = "End"; }
private void btnEnd_Click(object sender, EventArgs e) { //Grab an Instance of SalesDataAccess Classes.DataAccess.SalesDataAccess db = new Classes.DataAccess.SalesDataAccess(); //Prepare currentTask Classes.LotTask currentTask = new Classes.LotTask(); currentTask.JobWOR = Int32.Parse(dgTaskView[0, activeRow].Value.ToString()); currentTask.Lot = Int32.Parse(dgTaskView[1, activeRow].Value.ToString()); //Update LotStatus and Time-stamp LotTimeTracking.MasterReviewEnd db.UpdateReviewMasterComplete(currentTask); //Re-Calculate the JobStatus Classes.StatusCalculation getStatus = new Classes.StatusCalculation(); getStatus.CalculateStatus(currentTask); //Update the GridView updateData(null, null); //Reset Buttons btnStart.Enabled = false; btnStart.Visible = true; btnStart.Text = "Start"; btnEnd.Enabled = false; btnEnd.Visible = false; btnEnd.Text = "End"; }
private void btnStart_Click(object sender, EventArgs e) { //Grab an Instance of PurchasingDataAccess Classes.DataAccess.PurchasingDataAccess db = new Classes.DataAccess.PurchasingDataAccess(); //Prepare currentTask Classes.LotTask currentTask = new Classes.LotTask(); currentTask.JobWOR = Int32.Parse(dgTaskView[0, activeRow].Value.ToString()); currentTask.Lot = Int32.Parse(dgTaskView[1, activeRow].Value.ToString()); switch (dgTaskView[3, activeRow].Value.ToString()) { case "Parts Review Requested": //Change the PartsReviewInProgress Flag to True db.UpdatePartsReviewInProgress(currentTask); break; case "Order Parts": //Change the PartsOrdered Flag to True and Time-Stamp LotTimeTracking.PartsOrderedDate db.UpdatePartsOrdered(currentTask); break; case "Order PCBs": //Change the PCBOrdered Flag to True and Time-Stamp LotTimeTracking.PCBOrderDate db.UpdatePCBOrdered(currentTask); break; case "Order Stencils": //Change the StencilsOrdered Flag to True and Time-Stamp LotTimeTracking.StencilOrderDate db.UpdateStencilsOrdered(currentTask); break; } //Re-Calculate the JobStatus Classes.StatusCalculation getStatus = new Classes.StatusCalculation(); getStatus.CalculateStatus(currentTask); //Update the GridView populate(null, null); //Reset Buttons btnStart.Enabled = false; btnStart.Visible = true; btnStart.Text = "Start"; btnEnd.Enabled = false; btnEnd.Visible = false; btnEnd.Text = "End"; }