Exemplo n.º 1
0
        private void linkLabelAgregarTasacion_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (Propiedad.IdPropiedad == 0)
            {

                Framework.General.GIMsgBox.Show("Debe primero guardar la propiedad para cargar una tasación", GI.Framework.General.enumTipoMensaje.Advertencia);
                return;
            }

            GI.BR.Propiedades.Tasacion t = new GI.BR.Propiedades.Tasacion();
            t.Comentarios = "";
            t.Fecha = DateTime.Now;
            t.IdPropiedad = Propiedad.IdPropiedad;
            t.ValorPublicacion = new GI.BR.Valor();
            t.ValorPublicacion.Importe = 0;
            t.ValorReal = new GI.BR.Valor();
            t.ValorReal.Importe = 0;

            Formularios.FrmTasacion frm = new GI.UI.Propiedades.Formularios.FrmTasacion(t);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ListViewItem item = generarLVI(t);
                lvTasaciones.Items.Add(item);
                if (Framework.General.GIMsgBox.Show("¿Desea usar los mismos valores para la ficha?", GI.Framework.General.enumTipoMensaje.Pregunta) == DialogResult.Yes)
                {
                    Propiedad.ValorMercado = t.ValorReal;
                    Propiedad.ValorPublicacion = t.ValorPublicacion;

                }

            }
        }
Exemplo n.º 2
0
        private void lvPedidos_DoubleClick(object sender, EventArgs e)
        {
            if (lvTasaciones.SelectedItems.Count != 1) return;

            GI.BR.Propiedades.Tasacion t = (GI.BR.Propiedades.Tasacion)lvTasaciones.SelectedItems[0].Tag;

            Formularios.FrmTasacion frm = new GI.UI.Propiedades.Formularios.FrmTasacion(t);
            frm.SoloLectura = this.SoloLectura;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                ListViewItem item = generarLVI(t);
                int index = lvTasaciones.SelectedIndices[0];
                lvTasaciones.Items.RemoveAt(index);
                lvTasaciones.Items.Insert(index, item);
            }
        }