예제 #1
0
        private void Load_Batch_List()
        {
            ManageButtons();
            PRPDBatch.PRPDType theType;


            try
            {
                objSourceInstructions.DataSource = null;
                objSourcePRPDBatches.DataSource  = null;
                PRPDBatch.PRPDBatchStatus state = (PRPDBatch.PRPDBatchStatus)Enum.Parse(typeof(PRPDBatch.PRPDBatchStatus), cmbPRPDBatchStatus.SelectedItem.ToString());
                if (rdbPP.Checked == true)
                {
                    theType = PRPDBatch.PRPDType.PrimaryPreperation;
                }
                else if (rdbPPRe.Checked == true)
                {
                    theType = PRPDBatch.PRPDType.PrimaryOutsource;
                }
                else
                {
                    theType = PRPDBatch.PRPDType.Rework;
                }
                dtPRPDBatches = objPRPDBatch_DL.GetDataByState_Type((PRPDBatch.PRPDBatchStatus)Enum.Parse(typeof(PRPDBatch.PRPDBatchStatus), cmbPRPDBatchStatus.SelectedValue.ToString()), theType);

                dgvPRPDbatchByState.AutoGenerateColumns = false;
                dgvPRPDbatchByState.DataSource          = objSourcePRPDBatches;
                objSourcePRPDBatches.DataSource         = dtPRPDBatches;
                objSourcePRPDBatches.ResetBindings(true);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }