コード例 #1
0
 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;
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 public CrearEntidad(MDIEntidad fEntidad)
 {
     InitializeComponent();
     this.fEntidad = fEntidad;
 }