public static void setLink_Articulo(HyperLink lnkUrlPagina, eArticulo oArticulo) { try { string titulo = oArticulo.Titulo.Replace("-", ""); lnkUrlPagina.Text = titulo; lnkUrlPagina.NavigateUrl = getEnlace_Articulo(oArticulo); string target = ParametroHelper.GetParametro_Valor(oArticulo.Parametro, "Target"); if (target != "") { lnkUrlPagina.Target = target; } else { if (oArticulo.TipoEnlace == 2 && !lnkUrlPagina.NavigateUrl.Contains("javascript:")) { lnkUrlPagina.Target = "_blank"; } } } catch { lnkUrlPagina.NavigateUrl = "javascript:;"; } }
public static String getEnlace_Articulo(eArticulo oArticulo) { string Url = getURLRoot(); if (oArticulo.TipoEnlace > 0) { switch (oArticulo.TipoEnlace) { case 1: if (oArticulo.IdArticuloEnlace != 0) { eArticulo oItem = cCMS.Articulo_item(oArticulo.IdArticuloEnlace); Url += (oItem != null) ? oItem.URLEstatica: ""; } break; case 2: if (ParametroHelper.GetParametro_Valor(oArticulo.Parametro, "Visualizar") == "2") { string width = ParametroHelper.GetParametro_Valor(oArticulo.Parametro, "Ancho de ventana"); string height = ParametroHelper.GetParametro_Valor(oArticulo.Parametro, "Alto de ventana"); Url = "javascript:PopupFrame('" + oArticulo.URLEnlace + "', '" + width + "', '" + height + "');"; } else { Url = Util.Cadena.ParseLink(oArticulo.URLEnlace); } break; //case 3: // UrlParams = (oArticulo.IdMenuWebEnlace == 0) ? "?wsID=" + IdWebSite : "?mwID=" + oArticulo.IdMenuWebEnlace.ToString(); // break; } } else { Url += oArticulo.URLEstatica; } return(Url); }
public bool validarAccesoReportes(eArticulo oArticulo) { UsuarioGrupos = GetUsuarioGrupos(); if (oArticulo.IdEsquema == 50 && !UsuarioGrupos.Contains("grpVendedor") && !UsuarioGrupos.Contains("grpSupervisor")) { //Validar modulo de Reportes string tipo_reporte = ParametroHelper.GetParametro_Valor(oArticulo.Parametro, "Tipo Reporte"); switch (tipo_reporte) { case "EJ": return(!oContacto.repEjecutivo.Equals(string.Empty)); case "EQ": return(!oContacto.repEquipos.Equals(string.Empty)); case "IN": return(!oContacto.repInforme.Equals(string.Empty)); } } return(true); }
public void ParseFormulario(eArticulo oArticulo) { LoadControlsPlantilla(); //Prepare all template controls oArticulo.IdArticulo = 0; if (txtSubTitulo != null) { oArticulo.SubTitulo = txtSubTitulo.Text; } if (txtSubTitulo2 != null) { oArticulo.SubTitulo2 = txtSubTitulo2.Text; } if (fckDescripcion != null) { oArticulo.Descripcion = fckDescripcion.Text; } if (fckDescripcion2 != null) { oArticulo.Descripcion2 = fckDescripcion2.Text; } if (fckResumen != null) { oArticulo.Resumen = fckResumen.Text; } if (txtImagen != null) { oArticulo.Imagen = txtImagen.Text; } if (txtImagen2 != null) { oArticulo.Imagen2 = txtImagen2.Text; } if (txtImagen3 != null) { oArticulo.Imagen3 = txtImagen3.Text; } if (txtVideo != null) { oArticulo.Video = txtVideo.Text.Replace("/watch?v=", "/v/"); //for youtube } if (txtVideo2 != null) { oArticulo.Video2 = txtVideo2.Text.Replace("/watch?v=", "/v/"); } if (txtVideo3 != null) { oArticulo.Video3 = txtVideo3.Text.Replace("/watch?v=", "/v/"); } if (txtDocumento != null) { oArticulo.Documento = txtDocumento.Text; } if (txtDocumento2 != null) { oArticulo.Documento2 = txtDocumento2.Text; } if (txtDocumento3 != null) { oArticulo.Documento3 = txtDocumento3.Text; } if (txtFecha != null) { oArticulo.Fecha = Convert.ToDateTime(txtFecha.Text); } if (txtFecha2 != null) { oArticulo.Fecha2 = Convert.ToDateTime(txtFecha2.Text); } if (drpTipoEnlace != null) { oArticulo.TipoEnlace = Convert.ToByte(drpTipoEnlace.SelectedValue); } if (drpArticuloEnlace != null && drpArticuloEnlace.Items.Count > 0) { oArticulo.IdArticuloEnlace = Convert.ToInt32(drpArticuloEnlace.SelectedValue); } if (txtURLEnlace != null) { oArticulo.URLEnlace = txtURLEnlace.Text; } if (txtURLEstatica != null) { oArticulo.URLEstatica = txtURLEstatica.Text; } //if (drpEstilo != null) oArticulo.Estilo = drpEstilo.SelectedValue; if (repParametro != null) { oArticulo.Parametro = ParametroHelper.ParseRepeaterControl(repParametro); } if (chkEnPortada != null) { oArticulo.EnPortada = chkEnPortada.Checked; } }
public void LoadFormulario(eArticulo oArticulo) { LoadControlsPlantilla(); //Prepare all template controls ClearFormulario(); //Cleaning all controls if (txtSubTitulo != null) { txtSubTitulo.Text = oArticulo.SubTitulo; } if (txtSubTitulo2 != null) { txtSubTitulo2.Text = oArticulo.SubTitulo2; } if (fckDescripcion != null) { fckDescripcion.Text = oArticulo.Descripcion; } if (fckDescripcion2 != null) { fckDescripcion2.Text = oArticulo.Descripcion2; } if (fckResumen != null) { fckResumen.Text = oArticulo.Resumen; } if (txtImagen != null) { txtImagen.Text = oArticulo.Imagen; } if (txtImagen2 != null) { txtImagen2.Text = oArticulo.Imagen2; } if (txtImagen3 != null) { txtImagen3.Text = oArticulo.Imagen3; } if (txtVideo != null) { txtVideo.Text = oArticulo.Video; } if (txtVideo2 != null) { txtVideo2.Text = oArticulo.Video2; } if (txtVideo3 != null) { txtVideo3.Text = oArticulo.Video3; } if (txtDocumento != null) { txtDocumento.Text = oArticulo.Documento; } if (txtDocumento2 != null) { txtDocumento2.Text = oArticulo.Documento2; } if (txtDocumento3 != null) { txtDocumento3.Text = oArticulo.Documento3; } if (txtFecha != null) { txtFecha.Text = oArticulo.Fecha.ToShortDateString(); } if (txtFecha2 != null) { txtFecha2.Text = oArticulo.Fecha2.ToShortDateString(); } if (drpTipoEnlace != null) { drpTipoEnlace.SelectedValue = oArticulo.TipoEnlace.ToString(); } if (drpArticuloEnlace != null) { drpArticuloEnlace.SelectedValue = oArticulo.IdArticuloEnlace.ToString(); } if (txtURLEnlace != null) { txtURLEnlace.Text = oArticulo.URLEnlace.ToString(); } if (txtURLEstatica != null) { txtURLEstatica.Text = oArticulo.URLEstatica.ToString(); } //if (drpEstilo != null) drpEstilo.SelectedValue = oArticulo.Estilo.ToString(); if (repParametro != null) { ParametroHelper.LoadRepeaterControl(repParametro, oArticulo.Parametro); } if (chkEnPortada != null) { chkEnPortada.Checked = oArticulo.EnPortada; } }
public void ClearFormulario() { if (txtSubTitulo != null) { txtSubTitulo.Text = ""; } if (txtSubTitulo2 != null) { txtSubTitulo2.Text = ""; } if (fckDescripcion != null) { fckDescripcion.Text = ""; } if (fckDescripcion2 != null) { fckDescripcion2.Text = ""; } if (fckResumen != null) { fckResumen.Text = ""; } if (txtImagen != null) { txtImagen.Text = ""; } if (txtImagen2 != null) { txtImagen2.Text = ""; } if (txtImagen3 != null) { txtImagen3.Text = ""; } if (txtVideo != null) { txtVideo.Text = ""; } if (txtVideo2 != null) { txtVideo2.Text = ""; } if (txtVideo3 != null) { txtVideo3.Text = ""; } if (txtDocumento != null) { txtDocumento.Text = ""; } if (txtDocumento2 != null) { txtDocumento2.Text = ""; } if (txtDocumento3 != null) { txtDocumento3.Text = ""; } if (txtFecha != null) { txtFecha.Text = ""; } if (txtFecha2 != null) { txtFecha2.Text = ""; } if (drpTipoEnlace != null) { drpTipoEnlace.SelectedIndex = -1; } if (drpArticuloEnlace != null) { drpArticuloEnlace.SelectedIndex = -1; } if (txtURLEnlace != null) { txtURLEnlace.Text = ""; } if (txtURLEstatica != null) { txtURLEstatica.Text = ""; } if (drpEstilo != null) { drpEstilo.SelectedIndex = -1; } if (repParametro != null) { ParametroHelper.ClearRepeaterControl(repParametro); } if (chkEnPortada != null) { chkEnPortada.Checked = false; } //usuarios if (hdnUsuarioID != null) { hdnUsuarioID.Value = ""; } if (rbtPersonaNatural != null) { rbtPersonaNatural.Checked = false; } if (rbtPersonaJuridica != null) { rbtPersonaJuridica.Checked = false; } if (ddlDni != null) { ddlDni.SelectedIndex = -1; } if (txtDni != null) { txtDni.Text = ""; } if (txtNombre != null) { txtNombre.Text = ""; } if (txtApellido != null) { txtApellido.Text = ""; } if (drpPais != null) { drpPais.SelectedIndex = -1; } if (drpDepartamento != null) { drpDepartamento.SelectedIndex = -1; } if (txtDireccion != null) { txtDireccion.Text = ""; } if (ddlTelefono != null) { ddlTelefono.SelectedIndex = -1; } if (txtTelefono != null) { txtTelefono.Text = ""; } if (txtEmail != null) { txtEmail.Text = ""; } if (txtContrasena != null) { txtContrasena.Text = ""; } if (txtConfirmacion != null) { txtConfirmacion.Text = ""; } if (drpProvincia != null) { drpProvincia.SelectedIndex = -1; } if (drpDistrito != null) { drpDistrito.SelectedIndex = -1; } if (txtReferencia != null) { txtReferencia.Text = ""; } if (txtCiudad != null) { txtCiudad.Text = ""; } if (txtCodigoPostal != null) { txtCodigoPostal.Text = ""; } //productos if (txtCodigo != null) { txtCodigo.Text = ""; } if (txtDescripcionModelo != null) { txtDescripcionModelo.Text = ""; } if (fckDescripcionProducto != null) { fckDescripcionProducto.Text = ""; } if (txtImagenProducto != null) { txtImagenProducto.Text = ""; } if (txtImagen2Producto != null) { txtImagen2Producto.Text = ""; } if (txtPrecio != null) { txtPrecio.Text = ""; } if (txtNombreProducto != null) { txtNombreProducto.Text = ""; } if (txtIdProducto != null) { txtIdProducto.Text = ""; } if (txtProductoCategoria != null) { txtProductoCategoria.Text = ""; } if (txtSOS != null) { txtSOS.Text = ""; } //direccion entrega if (txtNombreSede != null) { txtNombreSede.Text = ""; } if (txtDireccionEntrega != null) { txtDireccionEntrega.Text = ""; } if (txtTelefono01Entrega != null) { txtTelefono01Entrega.Text = ""; } if (txtTelefono02Entrega != null) { txtTelefono02Entrega.Text = ""; } if (txtTelefono03Entrega != null) { txtTelefono03Entrega.Text = ""; } if (txtTelefono04Entrega != null) { txtTelefono04Entrega.Text = ""; } }
public void ClearFormulario() { if (txtSubTitulo != null) { txtSubTitulo.Text = string.Empty; } if (txtSubTitulo2 != null) { txtSubTitulo2.Text = string.Empty; } if (fckDescripcion != null) { fckDescripcion.Text = string.Empty; } if (fckDescripcion2 != null) { fckDescripcion2.Text = string.Empty; } if (fckResumen != null) { fckResumen.Text = string.Empty; } if (txtImagen != null) { txtImagen.Text = string.Empty; } if (txtImagen2 != null) { txtImagen2.Text = string.Empty; } if (txtImagen3 != null) { txtImagen3.Text = string.Empty; } if (txtVideo != null) { txtVideo.Text = string.Empty; } if (txtVideo2 != null) { txtVideo2.Text = string.Empty; } if (txtVideo3 != null) { txtVideo3.Text = string.Empty; } if (txtDocumento != null) { txtDocumento.Text = string.Empty; } if (txtDocumento2 != null) { txtDocumento2.Text = string.Empty; } if (txtDocumento3 != null) { txtDocumento3.Text = string.Empty; } if (txtFecha != null) { txtFecha.Text = string.Empty; } if (txtFecha2 != null) { txtFecha2.Text = string.Empty; } if (drpTipoEnlace != null) { drpTipoEnlace.SelectedIndex = -1; } if (drpArticuloEnlace != null) { drpArticuloEnlace.SelectedIndex = -1; } if (drpMenuWebEnlace != null) { drpMenuWebEnlace.SelectedIndex = -1; } if (txtURLEnlace != null) { txtURLEnlace.Text = string.Empty; } if (txtURLEstatica != null) { txtURLEstatica.Text = string.Empty; } if (drpEstilo != null) { drpEstilo.SelectedIndex = -1; } if (repParametro != null) { ParametroHelper.ClearRepeaterControl(repParametro); } if (chkEnPortada != null) { chkEnPortada.Checked = false; } }