Esempio n. 1
0
        private void frmRPDBatchInitialize_Load(object sender, EventArgs e)
        {
            try
            {
                cmbBatchType.SelectedIndex = 0;
                Department objDep      = objDepartmentDL.GetByDepType("RPD");
                Department objStoreDep = objDepartmentDL.GetByDepType("Store");

                cmbActivityInstructions.DataSource = objMainActivityDL.GetByDepID(objDep.DepID);
                cmbMaterialList.DataSource         = objMaterialDL.GetDataViewByCategory("Processed", "", "", 1);

                Load_BatchList();

                txtQtyBasic.Text = objRPDBatch.RPDBatchQty.ToString();
                lblID.Text       = objRPDBatch.RPDBatchID;

                if (objRPDBatch.RPDBatchID != null)
                {
                    bindInstructions.DataSource = objRPDBatchActivityInstructionsDL.GetDataView(objRPDBatch.RPDBatchID);
                    bindProduction.DataSource   = objRPDBatchProductionDL.GetDataByBatchID(objRPDBatch.RPDBatchID);

                    if (objRPDBatch.RPDBatchMR.MRStatus == MR.Status.Reject)
                    {
                        btnCreate.Enabled = true;
                    }
                    else
                    {
                        btnCreate.Enabled = false;
                    }
                }
            }
            catch (Exception)
            {
                MessageBox.Show(this, "Error occcured while loading", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }