public ModificarEntidad(Entidad entidad, MDIEntidad fEntidad) { InitializeComponent(); this.entidad = entidad; this.fEntidad = fEntidad; txtNombre.Text = entidad.Nombre; txtDireccion.Text = entidad.Direccion; txtEmail.Text = entidad.Email; txtTelefono.Text = entidad.Telefono; txtDNI.Text = entidad.DNI; txtCIF.Text = entidad.CIF; txtDescripcion.Text = entidad.Descripcion; txtWeb.Text = entidad.Web; }
private void button1_Click(object sender, EventArgs e) { //comprueba si ya esta abierto el formulario de entidades Form existe = Application.OpenForms.OfType <Form>().Where(pre => pre.Name == "MDIEntidades").SingleOrDefault <Form>(); if (existe == null) { if (ActiveMdiChild != null) { ActiveMdiChild.Close(); } this.LayoutMdi(MdiLayout.TileHorizontal); Form f = new MDIEntidad(); f.MdiParent = this; f.Show(); f.WindowState = FormWindowState.Minimized; f.WindowState = FormWindowState.Maximized; } }
public CrearEntidad(MDIEntidad fEntidad) { InitializeComponent(); this.fEntidad = fEntidad; }