Exemplo n.º 1
0
        private void simpleButton1_Click_1(object sender, EventArgs e)
        {
            FrmPurchasePlanImport fImport = new FrmPurchasePlanImport("", new List <string>());

            if (fImport.ShowDialog() == DialogResult.OK)
            {
                listCG.AddRange(fImport.listCG.ToArray());
                gridControl采购订单列表.DataSource = listCG;
                gridControl采购订单列表.RefreshDataSource();
            }
        }
        private void simpleButton1_Click_1(object sender, EventArgs e)
        {
            string brand = "";

            if (comBrand.SelectedItem != null)
            {
                TB_BrandModel model = comBrand.SelectedItem as TB_BrandModel;
                if (model != null)
                {
                    brand = model.FID;
                }
            }
            if (string.IsNullOrEmpty(brand))
            {
                System.Windows.Forms.MessageBox.Show("请选择品牌!");
                return;
            }
            var           list11    = this.gridView发货计划明细.DataSource as List <V_ICPOBILLENTRYMODEL>;
            List <string> lEntryIDs = new List <string>();

            if (list11 != null)
            {
                foreach (var sub in list11)
                {
                    if (!string.IsNullOrEmpty(sub.ICPRBILLENTRYIDS))
                    {
                        string[] arr = sub.ICPRBILLENTRYIDS.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
                        foreach (var subbb in arr)
                        {
                            lEntryIDs.Add(subbb);
                        }
                    }

                    if (!string.IsNullOrEmpty(sub.FPLANID))
                    {
                        lEntryIDs.Add(sub.FPLANID);
                    }
                }
            }

            try
            {
                FrmMainB MainForm             = (FrmMainB)this.Parent.Parent;
                FrmPurchasePlanImport fImport = new FrmPurchasePlanImport(brand, lEntryIDs);
                fImport.showAfter += FImport_showAfter;
                MainForm.OpenChildForm(fImport);
            }
            catch
            { }
        }