private void Display_Data()
        {
            D_Exclusive_JuchuuNO_Delete();

            HikiateHenkouShoukaiEntity entity = new HikiateHenkouShoukaiEntity();

            if (rdoAggregation.Checked)
            {
                entity.Representation = 0;
            }
            else if (rdoDetails.Checked)
            {
                entity.Representation = 1;
            }
            else
            {
                entity.Representation = 2;
            }
            entity.BrandCD        = txtBrand.Text;
            entity.ChakuniYoteiNO = txtChakuniYoteiNO.Text;
            entity.KanriNO        = txtKanriNO.Text;
            entity.YearTerm       = txtYearTerm.Text;
            entity.SeasonSS       = chkSeasonSS.Checked ? 1 : 0;
            entity.SeasonFW       = chkSeasonFW.Checked ? 1 : 0;
            entity.TokuisakiCD    = txtTokuisakiCD.Text;
            entity.SoukoCD        = txtSoukoCD.Text;
            entity.KouritenCD     = txtKouritenCD.Text;
            entity.PostalCode1    = txtPostalCode1.Text;
            entity.PostalCode2    = txtPostalCode2.Text;
            entity.Phoneno1       = txtPhoneNo1.Text;
            entity.Phoneno2       = txtPhoneNo2.Text;
            entity.Phoneno3       = txtPhoneNo3.Text;
            entity.Name           = txtName.Text;
            entity.Address        = txtAddress.Text;
            entity.ShouhinCD      = txtShouhinCD.Text;
            entity.JANCD          = txtJANCD.Text;
            entity.ColorNO        = txtColorNO.Text;
            entity.SizeNO         = txtSizeNO.Text;
            entity.ShouhinName    = txtShouhinName.Text;
            entity.Type1          = chkType1.Checked ? 1 : 0;
            entity.Type2          = chkType2.Checked ? 1 : 0;
            entity.OperatorCD     = base_entity.OperatorCD;
            entity.PC             = base_entity.PC;
            entity.ProgramID      = base_entity.ProgramID;
            dtMain = hbl.Select_DisplayData(entity);

            if (rdoAggregation.Checked)
            {
                gvAggregationDetails.DataSource = dtMain;
                gvAggregationDetails.Focus();

                if (dtMain.Rows.Count > 0)
                {
                    gvAggregationDetails.CurrentCell = gvAggregationDetails.Rows[0].Cells[3];
                    gvAggregationDetails.Select();
                    gvAggregationDetails.Memory_Row_Count   = dtMain.Rows.Count;
                    gvFreeInventoryDetails.Memory_Row_Count = dtMain.Rows.Count;
                    gvMainDetail.Memory_Row_Count           = dtMain.Rows.Count;
                }
            }
            else if (rdoDetails.Checked)
            {
                foreach (DataRow dr in dtMain.Rows)
                {
                    bool exists = false;
                    if (F8_dt1.Rows.Count > 0)
                    {
                        //重複行はDelete
                        string ShouhinCD = dr["ShouhinCD"].ToString();
                        string JuchuuNo  = dr["受注番号-行番号"].ToString();
                        string KanriNO   = dr["小売店名"].ToString();

                        DataRow existDr1 = F8_dt1.Select("([受注番号-行番号] ='" + JuchuuNo + "' OR [受注番号-行番号] IS NULL) AND 小売店名 = '" + KanriNO + "' AND ShouhinCD = '" + ShouhinCD + "'").SingleOrDefault();
                        if (existDr1 != null)
                        {
                            dr["表示順"] = "9";
                            exists    = true;
                        }
                    }

                    if (!string.IsNullOrWhiteSpace(dr["受注番号"].ToString()) && !exists)
                    {
                        string JuchuuNO = dr["受注番号"].ToString();
                        entity.DataKBN    = 1;
                        entity.Number     = JuchuuNO;
                        entity.ProgramID  = ProgramID;
                        entity.PC         = PCID;
                        entity.OperatorCD = OperatorCD;
                        DataTable dt = new DataTable();
                        dt = hbl.D_Exclusive_Lock_Check(entity);

                        if (dt.Rows[0]["MessageID"].ToString().Equals("S004"))
                        {
                            string Data1 = string.Empty, Data2 = string.Empty, Data3 = string.Empty;
                            Data1 = dt.Rows[0]["Program"].ToString();
                            Data2 = dt.Rows[0]["Operator"].ToString();
                            Data3 = dt.Rows[0]["PC"].ToString();

                            D_Exclusive_JuchuuNO_Delete();
                            bbl.ShowMessage("S004", Data1, Data2, Data3);
                            return;
                        }
                    }
                }

                DataRow[] select_dr1 = dtMain.Select("表示順 = '9'");
                foreach (DataRow dr in select_dr1)
                {
                    dtMain.Rows.Remove(dr);
                }

                //dtMain.Columns.RemoveAt(20);
                //dtMain.Columns.RemoveAt(19);
                gvMainDetail.DataSource = dtMain;

                gvMainDetail.Columns[19].Visible = false;
                gvMainDetail.Columns[20].Visible = false;
                gvMainDetail.Columns[21].Visible = false;
                gvMainDetail.Focus();
                if (dtMain.Rows.Count > 0)
                {
                    gvMainDetail.CurrentCell = gvMainDetail.Rows[0].Cells[11];
                    gvMainDetail.Select();
                }
                //gvMainDetail.Columns[gvMainDetail.Columns.Count - 1].Visible = false;
            }
            else
            {
                gvFreeInventoryDetails.DataSource = dtMain;
                gvFreeInventoryDetails.Focus();
                if (dtMain.Rows.Count > 0)
                {
                    gvFreeInventoryDetails.CurrentCell = gvFreeInventoryDetails.Rows[0].Cells[0];
                    gvFreeInventoryDetails.Select();
                    gvFreeInventoryDetails.Memory_Row_Count = dtMain.Rows.Count;
                    gvMainDetail.Memory_Row_Count           = dtMain.Rows.Count;
                    gvAggregationDetails.Memory_Row_Count   = dtMain.Rows.Count;
                }
            }

            if (dtTemp != null)
            {
                dtTemp.Clear();
            }
        }