Esempio n. 1
0
        private void llPropiedad_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (llPropiedad.Tag != null)
            {
                Propiedades.frmFichaPropiedad frm = new GI.UI.Propiedades.frmFichaPropiedad();
                frm.SoloLectura = SoloLectura;
                frm.Propiedad = (GI.BR.Propiedades.Propiedad)llPropiedad.Tag;
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    llPropiedad.Text = frm.Propiedad.Codigo.ToString();
                }

            }
        }
Esempio n. 2
0
        private void LinkPropiedad_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (LinkPropiedad.Text == "Seleccione una Propiedad")
            {
                Framework.frmSeleccionador frmSeleccionador = new GI.Framework.frmSeleccionador(new Propiedades.SeleccionadorPropiedades(typeof(GI.BR.Propiedades.Alquiler)));
                if (frmSeleccionador.ShowDialog() == DialogResult.OK)
                {
                    LinkPropiedad.Tag = (GI.BR.Propiedades.Propiedad)frmSeleccionador.ObjetoSeleccionado;
                    this.AdmAlquiler.Alquiler = (GI.BR.Propiedades.Alquiler)frmSeleccionador.ObjetoSeleccionado;
                    LinkPropiedad.Text = ((GI.BR.Propiedades.Propiedad)frmSeleccionador.ObjetoSeleccionado).Codigo.ToString();
                    ctrlDireccion1.Direccion = ((GI.BR.Propiedades.Propiedad)frmSeleccionador.ObjetoSeleccionado).Direccion;
                    if(((GI.BR.Propiedades.Propiedad)LinkPropiedad.Tag).Propietario != null)
                        cBoxEsPropietario.Enabled = true;
                }

            }
            else
            {
                if (LinkPropiedad.Tag != null)
                {
                    Propiedades.frmFichaPropiedad frm = new GI.UI.Propiedades.frmFichaPropiedad();
                    frm.SoloLectura = SoloLectura;
                    frm.Propiedad = (GI.BR.Propiedades.Propiedad)LinkPropiedad.Tag;
                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        LinkPropiedad.Text = frm.Propiedad.Codigo.ToString();
                    }

                }
            }
        }