//private void btnFinishPacking_Click(object sender, EventArgs e) //{ // try // { // DialogResult dr = MessageBox.Show(this,"Do you want to finish the Activity","Confirmation",MessageBoxButtons.YesNo); // if(dr== DialogResult.Yes) // { // objBatchActivity = objBatchActivity_DL.GetByID(Convert.ToInt32(dgvActivity.CurrentRow.Cells["BatchActID"].Value)); // objBatchActivity.BatchActStatus = BatchActivity.Status.Finished; // objBatchActivity_DL.Update(objBatchActivity); // } // Load_Activity(); // } // catch (Exception ex) // { // MessageBox.Show(ex.Message.ToString()); // } //} private void btnSendtoPacking_Click(object sender, EventArgs e) { try { int theCount = 0; DataTable dtReports = objQCReport_DL.Get_IsPackingQCPass(dgvActivityz.CurrentRow.Cells["BatchID"].Value.ToString(), Convert.ToInt32(QCReport.ReportStatus.Accept), "Packing"); theCount = objFinishProduct_DL.Get_SecondaryProductList(dgvActivityz.CurrentRow.Cells["PrimaryFinishProduct"].Value.ToString()).Rows.Count; if (dtReports.Rows.Count > 0) { if (theCount > 0) { objBatchActivity.BatchActStatus = BatchActivity.Status.SecondaryPacking; } else { objBatchActivity.BatchActStatus = BatchActivity.Status.Finished; } objBatchActivity_DL.Update(objBatchActivity); objBatch_DL.Update_BatchPackingCost(objBatchActivity.BatchActID); Load_Activity(); } else { MessageBox.Show(this, "Packing QC is Not Passed", "Can not Proceed", MessageBoxButtons.OK); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void Load_ProductList() { try { if (dgvActivity.CurrentRow.Cells["InputCode"].Value != null) { dtProdutList = objFinishProduct_DL.Get_SecondaryProductList(dgvActivity.CurrentRow.Cells["InputCode"].Value.ToString()); objSourceProductList.DataSource = dtProdutList; cmbOutputCode.DataSource = objSourceProductList; } } catch (Exception) { MessageBox.Show(this, "Error occured while loading Labour Details", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void Load_SecondaryProductList() { try { objBatch = objBatch_DL.Get(dgvBatchList.CurrentRow.Cells["BatchID"].Value.ToString()); txtBatchID.Text = objBatch.BatchID; DataTable dt = objFinishProduct_DL.Get_SecondaryProductList(dgvBatchList.CurrentRow.Cells["OutputProduct"].Value.ToString()); objSourceSecondaryProduct.DataSource = dt; cmbFinishedProduct.DataSource = objSourceSecondaryProduct; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }