Example #1
0
        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)
                {
                    DataTable dtReports = objQCReport_DL.Get_IsPackingQCPass(objBatch.BatchID, Convert.ToInt32(QCReport.ReportStatus.Accept), "Packing_Secondary");

                    if (dtReports.Rows.Count > 0)
                    {
                        objBatchActivity = objBatchActivity_DL.GetByID(Convert.ToInt32(dgvActivity.CurrentRow.Cells["BatchActID"].Value));

                        frmBatchActivity_Packing objForm = new frmBatchActivity_Packing(objBatchActivity);
                        objForm.ShowDialog(this);
                    }
                    else
                    {
                        MessageBox.Show(this, "Secondary QC Is Not Passed", "Wrong Attempt", MessageBoxButtons.OK);
                    }
                }

                Load_SecondaryActivityList();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Example #2
0
        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));

                    frmBatchActivity_Packing objForm = new frmBatchActivity_Packing(objBatchActivity);
                    objForm.ShowDialog(this);

                    if (dgvActivity.Rows.Count == 1)
                    {
                        objBatch_DL.Update_QCStatus(objBatch.BatchID, CurrentUser.EmployeeID, Batch.Status.Finished);

                        Load_Batch_List();
                    }
                }

                Load_Activity();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }