コード例 #1
0
    private void guardarUrlVimeo(int id_loteo)
    {
      try
      {
        var URL = new co_tg_urls { id_origen = id_loteo, id_tabla = Constantes.TABLA_LOTES };

        var UrlVimeo = new bf_tg_urls().obtenerUrlLote(URL);

        if (UrlVimeo == null)
        {
          URL.id_tipourl.id = Constantes.TABLA_LOTES;
          URL.url_recurso = txtVimeo.Text;
          new bf_tg_urls().Save(URL);
        }
        else
        {
          UrlVimeo.url_recurso = txtVimeo.Text;
          new bf_tg_urls().Save(UrlVimeo);
        }
      }
      catch (Exception ex)
      {
        throw new Exception(ex.Message);
      }
    }
コード例 #2
0
    private void CompletarValores(int idLoteo)
    {
      try
      {
        co_rl_loteos lote = new bf_rl_loteos().GetData(idLoteo);

        txtNroLote.Text = lote.lo_numero.ToString();
        txtCantidad.Text = lote.lo_cantidad.ToString();
        txtNombre.Text = lote.lo_titulo;
        txtDescripcion.Text = lote.lo_descripcion;
        txtMinimo.Text = lote.lo_minimo.ToString("N0");
        chkIva.Checked = NumInt.Init(lote.lo_iva) != 0;
        cmbMoneda.SeleccionarOpcion(lote.id_moneda.id.ToString());
        txtUnidadMedida.Text = lote.lo_unidad_medida;
        txtComision.Text = lote.lo_comision;
        txtDescripcionMonto.Text = lote.lo_descripcionMonto;
        txtGarantia.Text = lote.lo_garantia.ToString("N0");
        cmbMonedaGarantia.SeleccionarOpcion(lote.id_moneda_garantia.id.ToString());

        cmbEstado.SeleccionarOpcion(lote.id_loteoestado.id.ToString());
        cmbMandantes.SeleccionarOpcion(lote.id_mandante.id.ToString());
        cmbFamilias.SetValueAndFireSelect(lote.id_familia.id);
        cmbCategoria.SetValueAndFireSelect(lote.id_categoria.id);
        cmbSubCategoria.SetValueAndFireSelect(lote.id_subcategoria.id);

        //**VIMEO**
        var urlVimeo = new bf_tg_urls().obtenerUrlLote(new co_tg_urls
        {
          id_origen = lote.id_loteo,
          id_tipourl = { id = Constantes.TIPO_URL_VIMEO }

        });
        txtVimeo.Text = urlVimeo == null ? "" : urlVimeo.url_recurso;

        if (!string.IsNullOrEmpty(lote.lo_direccion))
        {
          cmbTipoDireccion.SetValueAndFireSelect("DIR");
          txtDireccion.Text = lote.lo_direccion;
        }
        else
        {
          cmbTipoDireccion.SetValueAndFireSelect("COR");
        }
        cmbRegion.SetValueAndFireSelect(lote.id_region.id);
        cmbComuna.SetValueAndFireSelect(lote.id_comuna.id);
        txtLatitud.Text = lote.lo_latitud;
        txtLongitud.Text = lote.lo_longitud;

        txtObservacion.Text = lote.lo_observacion;
        //txtDetalle.Text = lote.lo_detalle;
        editor.InnerHtml = lote.lo_detalle;
        CargarIncrementos(lote.id_loteo);
        CargarCanales(lote.id_loteo);
        CargarContactos(lote.id_loteo);

        txtCodigo.Text = lote.lo_codigo;
        txtSuperficieConstruida.Text = lote.lo_superficieConstruida.ToString("N2");
        txtSuperficieSitio.Text = lote.lo_superficieSitio.ToString("N2");
        if (lote.id_unidadSitio.id != 0)
        {
          cmbUniMedSupSitio.SeleccionarOpcion(lote.id_unidadSitio.id.ToString());
        }
        if (lote.id_unidadConstruida.id != 0)
        {
          cmbUniMedSupConstruida.SeleccionarOpcion(lote.id_unidadConstruida.id.ToString());
        }
        txtLugarExhibicion.Text = lote.lo_lugar_exhibicion;
        txtExhibicion.Text = lote.lo_exhibicion;


      }
      catch (Exception ex)
      {
        Mensajes.Error(ErrorText.ERROR_CARGAR_LOTE, "wf_rl_loteos_adm.CompletarValores", ex);
      }
    }