示例#1
0
        protected void GridViewnovedades_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewRow gr      = Gridkardex.SelectedRow;
            string      idtabla = gr.Cells[1].Text;//coment
            String      bd      = Session["BD"].ToString();

            try
            {
                var registros16 = Controlasql.Cdelete_kardex(idtabla, bd);

                if (registros16 > 0)
                {
                    lblalerta.Visible  = true;
                    alertant.InnerText = registros16 + " Eliminado";
                    Listarsaldos();
                }
                else
                {
                    lblalerta.Visible  = true;
                    alertant.InnerText = "Sin Eliminar";
                    Listarsaldos();
                }
            }
            catch (Exception ex)
            {
                lblalerta.Visible  = true;
                alertant.InnerText = "Con excepcion interna :" + ex.Message;
            }
        }