/// <summary>call search form by form type
        ///
        /// </summary>
        public void ShowSearchForm()
        {
            if (this.UC_Type == Type.Pattern)
            {
                frmPattern_List patternList = new frmPattern_List();
                patternList.ShowDialog();

                if (!string.IsNullOrWhiteSpace(patternList.PatternCD))
                {
                    txtCode.Text = patternList.PatternCD;
                    lblName.Text = patternList.PatternName;
                    txtCode.Focus();
                }
            }
            else if (this.UC_Type == Type.Maker)
            {
                frmMaker_List makerList = new frmMaker_List();
                makerList.ShowDialog();

                if (!string.IsNullOrWhiteSpace(makerList.MakerCD))
                {
                    txtCode.Text = makerList.MakerCD;
                    lblName.Text = makerList.MakerName;
                    txtCode.Focus();
                }
            }
            else if (this.UC_Type == Type.Brand)
            {
                frmBrand_List brandList = new frmBrand_List();
                brandList.ShowDialog();

                if (!string.IsNullOrWhiteSpace(brandList.brandCD))
                {
                    txtCode.Text = brandList.brandCD;
                    lblName.Text = brandList.brandName;
                    txtCode.Focus();
                }
            }
            else if (this.UC_Type == Type.Sports)
            {
                frmM_Sports_List sportslist = new frmM_Sports_List();
                sportslist.ShowDialog();

                if (!string.IsNullOrWhiteSpace(sportslist.nc_sports))
                {
                    txtCode.Text = sportslist.nc_sports;
                    lblName.Text = sportslist.vm_sports;
                    txtCode.Focus();
                }
            }
            else if (this.UC_Type == Type.Category)
            {
                frmM_Bunrui_List bunruilist = new frmM_Bunrui_List();
                bunruilist.ShowDialog();

                if (!string.IsNullOrWhiteSpace(bunruilist.nc_bunrui))
                {
                    txtCode.Text = bunruilist.nc_bunrui;
                    lblName.Text = bunruilist.vm_bunrui;
                    txtCode.Focus();
                }
            }
            else if ((this.UC_Type == Type.PCMN0101K) || (this.UC_Type == Type.MakerShohinCD) || (this.UC_Type == Type.MultiJANCD) || (this.UC_Type == Type.JANCD) || (this.UC_Type == Type.ITEM) || (this.UC_Type == Type.SKUCD))
            {
                Form frm = this.ParentForm as Form;
                if (frm.Controls.Find("lblSOperator", true).Count() > 0)
                {
                    Label lbl = frm.Controls.Find("lblSOperator", true)[0] as Label;

                    //frmPCMN0101K pcmn0101k = new frmPCMN0101K();
                    loginInfo.OperatorName = lbl.Text;
                    frmPCMN0101K pcmn0101k = new frmPCMN0101K(loginInfo, UC_Flag, false);
                    pcmn0101k.ShowDialog();

                    if (!string.IsNullOrWhiteSpace(pcmn0101k.result))
                    {
                        txtCode.Text = pcmn0101k.result;
                        txtCode.Focus();
                    }
                }
            }
        }
        private void dgvM_MakerZaiko_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            var senderGrid = (DataGridView)sender;

            if (e.RowIndex >= 0)
            {
                var row = this.dgvM_MakerZaiko.Rows[e.RowIndex];
                if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn)
                {
                    if (senderGrid.Columns[e.ColumnIndex].ReadOnly == false)
                    {
                        if (dgvM_MakerZaiko.Columns["btnMaker"].Index == e.ColumnIndex)
                        {
                            frmMaker_List ms = new frmMaker_List();
                            ms.ShowDialog();

                            if (!string.IsNullOrWhiteSpace(ms.MakerCD))
                            {
                                row.Cells[dgvM_MakerZaiko.Columns[e.ColumnIndex - 1].Index].Value = ms.MakerCD;
                                row.Cells[dgvM_MakerZaiko.Columns[e.ColumnIndex + 1].Index].Value = ms.MakerName;

                                if (!string.IsNullOrWhiteSpace(ucBrand.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandCD"].Index].Value   = ucBrand.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandName"].Index].Value = ucBrand.UC_Name;
                                }

                                CheckRowAdd(row);// to add new row
                            }
                        }

                        if (dgvM_MakerZaiko.Columns["btnBrand"].Index == e.ColumnIndex)
                        {
                            frmBrand_List frmbrand = new frmBrand_List();
                            frmbrand.ShowDialog();

                            if (!string.IsNullOrWhiteSpace(frmbrand.brandCD))
                            {
                                row.Cells[dgvM_MakerZaiko.Columns["colBrandCD"].Index].Value   = frmbrand.brandCD;
                                row.Cells[dgvM_MakerZaiko.Columns["colBrandName"].Index].Value = frmbrand.brandName;

                                if (!string.IsNullOrWhiteSpace(ucMaker.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerCD"].Index].Value   = ucMaker.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerName"].Index].Value = ucMaker.UC_Name;
                                }

                                CheckRowAdd(row);//to add new row
                            }
                        }

                        if (dgvM_MakerZaiko.Columns["btnData"].Index == e.ColumnIndex)
                        {
                            frmMaker_List ms = new frmMaker_List();
                            ms.ShowDialog();

                            if (!string.IsNullOrWhiteSpace(ms.MakerCD))
                            {
                                row.Cells[dgvM_MakerZaiko.Columns["colData"].Index].Value     = ms.MakerCD;
                                row.Cells[dgvM_MakerZaiko.Columns["colDataName"].Index].Value = ms.MakerName;

                                if (!string.IsNullOrWhiteSpace(ucMaker.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerCD"].Index].Value   = ucMaker.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerName"].Index].Value = ucMaker.UC_Name;
                                }

                                if (!string.IsNullOrWhiteSpace(ucBrand.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandCD"].Index].Value   = ucBrand.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandName"].Index].Value = ucBrand.UC_Name;
                                }

                                CheckRowAdd(row);//to add new row
                            }
                        }

                        if (dgvM_MakerZaiko.Columns["btnPattern"].Index == e.ColumnIndex)
                        {
                            frmPattern_List mzkh = new frmPattern_List();
                            mzkh.ShowDialog();

                            if (!string.IsNullOrWhiteSpace(mzkh.PatternCD))
                            {
                                row.Cells[dgvM_MakerZaiko.Columns["colPatternCD"].Index].Value   = mzkh.PatternCD;
                                row.Cells[dgvM_MakerZaiko.Columns["colPatternName"].Index].Value = mzkh.PatternName;

                                if (!string.IsNullOrWhiteSpace(ucMaker.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerCD"].Index].Value   = ucMaker.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colMakerName"].Index].Value = ucMaker.UC_Name;
                                }

                                if (!string.IsNullOrWhiteSpace(ucBrand.UC_Code))
                                {
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandCD"].Index].Value   = ucBrand.UC_Code;
                                    row.Cells[dgvM_MakerZaiko.Columns["colBrandName"].Index].Value = ucBrand.UC_Name;
                                }

                                CheckRowAdd(row);//to add new row
                            }
                        }
                    }
                }
            }
        }