protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { UnidadDropDownList.DataSource = FeaEntidades.CodigosUnidad.CodigoUnidad.Lista(); IndicacionExentoGravadoDropDownList.DataSource = FeaEntidades.Indicacion.Indicacion.Lista(); AlicuotaIVADropDownList.DataSource = FeaEntidades.IVA.IVA.Lista(); DataBind(); if (Funciones.SessionTimeOut(Session)) { Response.Redirect("~/SessionTimeout.aspx"); } else { Entidades.Articulo articulo = (Entidades.Articulo)Session["Articulo"]; CUITTextBox.Text = articulo.Cuit; IdTextBox.Text = articulo.Id; DescrTextBox.Text = articulo.Descr; GTINTextBox.Text = articulo.GTIN; UnidadDropDownList.SelectedValue = articulo.Unidad.Id; UnidadDropDownList.SelectedItem.Text = articulo.Unidad.Descr; IndicacionExentoGravadoDropDownList.SelectedValue = articulo.IndicacionExentoGravado; AlicuotaIVADropDownList.SelectedValue = articulo.AlicuotaIVA.ToString(); CUITTextBox.Enabled = false; IdTextBox.Enabled = false; DescrTextBox.Focus(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { string a = HttpContext.Current.Request.Url.Query.ToString().Replace("?", String.Empty); switch (a) { case "Modificar": TituloPaginaLabel.Text = "Modificación de Lista de Precios"; ViewState["IrA"] = "~/ListaPrecioModificar.aspx"; break; case "Baja": TituloPaginaLabel.Text = "Baja/Anul.baja de Lista de Precios"; ViewState["IrA"] = "~/ListaPrecioBaja.aspx"; break; } if (Funciones.SessionTimeOut(Session)) { Response.Redirect("~/SessionTimeout.aspx"); } else { Entidades.Sesion sesion = (Entidades.Sesion)Session["Sesion"]; CUITTextBox.Text = sesion.Cuit.Nro; CUITTextBox.Enabled = false; DescrRadioButton.Checked = true; TipoBusquedaRadioButton_CheckedChanged(DescrRadioButton, new EventArgs()); DescrTextBox.Focus(); } } catch (Exception ex) { MensajeLabel.Text = EX.Funciones.Detalle(ex); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Funciones.SessionTimeOut(Session)) { Response.Redirect("~/SessionTimeout.aspx"); } else { Entidades.ListaPrecio listaPrecio = (Entidades.ListaPrecio)Session["ListaPrecio"]; CUITTextBox.Text = listaPrecio.Cuit; IdTextBox.Text = listaPrecio.Id; DescrTextBox.Text = listaPrecio.Descr; OrdenTextBox.Text = listaPrecio.Orden.ToString(); IdTipoListaPrecioDropDownList.SelectedValue = listaPrecio.IdTipo; CUITTextBox.Enabled = false; IdTextBox.Enabled = false; DescrTextBox.Focus(); } } }