示例#1
0
        private void dgvBatcList_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (dgvBatcList.Rows.Count > 0)
                {
                    objBatch         = objBatch_DL.Get(dgvBatcList.CurrentRow.Cells["BatchNo"].Value.ToString());
                    txtBatchID.Text  = objBatch.BatchID;
                    lblUnit.Text     = objBatch.StandardBatch.STDBatchBasicProduct.BasicProductUnit.UnitCode;
                    lblUnit1.Text    = objBatch.StandardBatch.STDBatchBasicProduct.BasicProductUnit.UnitCode;
                    objBatchActivity = objBatchActivity_DL.Get(objBatch.BatchID, objActivity.MainActID);

                    DataTable dt = objFinishProduct_DL.GetBy_TypeandBasicProduct(objBatch.StandardBatch.STDBatchBasicProduct.BasicProductCode, true, "Primary");

                    objSourceFinishedProducts.DataSource = dt;
                    cmbFinishedProduct.DataSource        = objSourceFinishedProducts;

                    Load_Activity();
                }
            }
            catch (Exception)
            {
                MessageBox.Show(this, "Error occured while loading Batch List", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }