Exemplo n.º 1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            add = true;
            InterfaceOfManagerA ima = new InterfaceOfManagerA();

            ima.db = db;
            DialogResult dr = ima.ShowDialog();

            if (dr == DialogResult.OK)
            {
                renterBindingSource.DataSource = db.Renter.ToList();
            }
        }
Exemplo n.º 2
0
        private void changeButton_Click(object sender, EventArgs e)
        {
            add = false;
            Renter renter           = (Renter)renterBindingSource.Current;
            InterfaceOfManagerA ima = new InterfaceOfManagerA();

            ima.db     = db;
            ima.renter = renter;
            DialogResult dr = ima.ShowDialog();

            if (dr == DialogResult.OK)
            {
                renterBindingSource.DataSource = db.Renter.ToList();
            }
        }