Ejemplo n.º 1
0
        protected void click_VerArticulos(object sender, EventArgs e)
        {
            GridViewRow gwr = GridViewDiferencias.SelectedRow;

            String pzona = Page.Server.HtmlDecode(gwr.Cells[2].Text);

            txtzona.Value = pzona;
            try
            {
                var registros = ControlaSql.Clista_Dif_Items_conteos(pzona);
                if (registros.Tables.Count > 0)
                {
                    Gridarticulos.DataSource = registros;
                    this.Page.Session["ds"]  = registros;
                    Gridarticulos.DataBind();
                    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "vistaArticulos", "$('#vistaArticulos').modal();", true);
                }
                else
                {
                    Gridarticulos.DataSource = null;
                    Gridarticulos.DataBind();
                }
            }
            catch (Exception ex)
            {
                alerta.MessageBox(this, $"{ex}");
                //  Response.Redirect("Exceptionnet.aspx");
            }
        }
Ejemplo n.º 2
0
 protected void Gridarticulos_RowEditing(object sender, GridViewEditEventArgs e)
 {
     Gridarticulos.EditIndex  = e.NewEditIndex;
     Gridarticulos.DataSource = this.Page.Session["ds"];
     Gridarticulos.DataBind();
 }