Beispiel #1
0
 protected void Btnir_Click(object sender, EventArgs e)
 {
     try
     {
         String bd         = Session["BD"].ToString();
         var    registrosm = Controlasql.Clista_rmercancia(txtidfactura.Value, bd);
         if (registrosm.Tables[0].Rows.Count > 0)
         {
             GridViewnovedades.DataSource = registrosm;
             GridViewnovedades.DataBind();
         }
         else
         {
             GridViewnovedades.DataSource = null;
             GridViewnovedades.DataBind();
         }
     }
     catch (Exception ex)
     {
         alerta.MessageBox(this, "Excepcion controlada:" + ex.Message);
     }
     try
     {
         String bd         = Session["BD"].ToString();
         var    registrosm = Controlasql.Clista_devomercancia(txtidfactura.Value, bd);
         if (registrosm.Tables[0].Rows.Count > 0)
         {
             GridViewnovedades2.DataSource = registrosm;
             GridViewnovedades2.DataBind();
         }
         else
         {
             GridViewnovedades2.DataSource = null;
             GridViewnovedades2.DataBind();
         }
     }
     catch (Exception ex)
     {
         alerta.MessageBox(this, "Excepcion controlada:" + ex.Message);
     }
 }
Beispiel #2
0
 protected void listadorecogida()
 {
     try
     {
         var registrosm = Controlasql.listaRecogida(selectccosto.Value);
         if (registrosm.Tables[0].Rows.Count > 0)
         {
             GridViewnovedades.DataSource = registrosm;
             GridViewnovedades.DataBind();
         }
         else
         {
             GridViewnovedades.DataSource = null;
             GridViewnovedades.DataBind();
         }
     }
     catch (Exception ex)
     {
         alerta.MessageBox(this, "Excepcion Interna:" + ex.Message);
     }
 }