private void addMallButton_Click(object sender, EventArgs e) { ManagerC.addchange = true; InterfaceMall im = new InterfaceMall(); im.db = db; DialogResult dr = im.ShowDialog(); if (dr == DialogResult.OK) { mallBindingSource.DataSource = db.Mall.ToList(); } }
private void changeMallButton_Click(object sender, EventArgs e) { ManagerC.addchange = false; InterfaceMall im = new InterfaceMall(); Mall mall = (Mall)mallBindingSource.Current; im.db = db; im.mall = mall; DialogResult dr = im.ShowDialog(); if (dr == DialogResult.OK) { mallBindingSource.DataSource = db.Mall.ToList(); } }