Esempio n. 1
0
        private void toolStripMenuItem17_Click(object sender, EventArgs e)
        {
            Collectioner        coll             = new Collectioner();
            List <Collectioner> newCollectioners = new List <Collectioner>();

            try
            {
                coll.pictureType = toolStripTextBox1.Text;
                foreach (Collectioner c in art.collectioners)
                {
                    if (coll.pictureType == c.pictureType)
                    {
                        int k = art.collectioners.IndexOf(c);
                        newCollectioners.Add(art.collectioners[k]);
                        collectionerBindingSource.DataSource = newCollectioners;
                    }
                }
            }
            catch
            {
                newCollectioners = art.collectioners;
            }
            collectionerBindingSource.ResetBindings(false);
            art.isChangeData = true;
            art.Load();
            toolStripMenuItem20.Visible = true;
        }
Esempio n. 2
0
 //edit
 public AddCollectionerForm(Collectioner Collectioner) : this()
 {
     collectioner   = Collectioner;
     textBox1.Text  = Collectioner.collectionerName;
     textBox2.Text  = Collectioner.countryBirth;
     comboBox1.Text = Collectioner.favStyleDrawing;
     textBox5.Text  = Collectioner.pictureName;
     textBox4.Text  = Collectioner.pictureYear.ToString();
     comboBox2.Text = Collectioner.pictureType;
 }
Esempio n. 3
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (collectioner == null)
            {
                collectioner = new Collectioner();
            }

            collectioner.collectionerName = textBox1.Text;
            collectioner.countryBirth     = textBox2.Text;
            collectioner.favStyleDrawing  = comboBox1.Text;
            collectioner.pictureName      = textBox5.Text;
            collectioner.pictureYear      = int.Parse(textBox4.Text);
            collectioner.pictureType      = comboBox2.Text;
        }
Esempio n. 4
0
 public void AddCollectioner(Collectioner clr)
 {
     collectioners.Add(clr);
     isChangeData = false;
 }